// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package arm

import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"

type LoadBalancersInboundNatRule_Spec struct {
	// Name: The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name
	// can be used to access the resource.
	Name string `json:"name,omitempty"`

	// Properties: Properties of load balancer inbound nat rule.
	Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &LoadBalancersInboundNatRule_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2020-11-01"
func (rule LoadBalancersInboundNatRule_Spec) GetAPIVersion() string {
	return "2020-11-01"
}

// GetName returns the Name of the resource
func (rule *LoadBalancersInboundNatRule_Spec) GetName() string {
	return rule.Name
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/loadBalancers/inboundNatRules"
func (rule *LoadBalancersInboundNatRule_Spec) GetType() string {
	return "Microsoft.Network/loadBalancers/inboundNatRules"
}

// Properties of the inbound NAT rule.
type InboundNatRulePropertiesFormat struct {
	// BackendPort: The port used for the internal endpoint. Acceptable values range from 1 to 65535.
	BackendPort *int `json:"backendPort,omitempty"`

	// EnableFloatingIP: Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL
	// AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server.
	// This setting can't be changed after you create the endpoint.
	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`

	// EnableTcpReset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This
	// element is only used when the protocol is set to TCP.
	EnableTcpReset *bool `json:"enableTcpReset,omitempty"`

	// FrontendIPConfiguration: A reference to frontend IP addresses.
	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`

	// FrontendPort: The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer.
	// Acceptable values range from 1 to 65534.
	FrontendPort *int `json:"frontendPort,omitempty"`

	// IdleTimeoutInMinutes: The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The
	// default value is 4 minutes. This element is only used when the protocol is set to TCP.
	IdleTimeoutInMinutes *int `json:"idleTimeoutInMinutes,omitempty"`

	// Protocol: The reference to the transport protocol used by the load balancing rule.
	Protocol *TransportProtocol `json:"protocol,omitempty"`
}

// Reference to another subresource.
type SubResource struct {
	// Id: Resource ID.
	Id *string `json:"id,omitempty"`
}

// The transport protocol for the endpoint.
// +kubebuilder:validation:Enum={"All","Tcp","Udp"}
type TransportProtocol string

const (
	TransportProtocol_All = TransportProtocol("All")
	TransportProtocol_Tcp = TransportProtocol("Tcp")
	TransportProtocol_Udp = TransportProtocol("Udp")
)

// Mapping from string to TransportProtocol
var transportProtocol_Values = map[string]TransportProtocol{
	"all": TransportProtocol_All,
	"tcp": TransportProtocol_Tcp,
	"udp": TransportProtocol_Udp,
}
