// 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 VirtualNetworksSubnet_Spec struct {
	// Name: The name of the resource that is unique within a resource group. This name can be used to access the resource.
	Name string `json:"name,omitempty"`

	// Properties: Properties of the subnet.
	Properties *SubnetPropertiesFormat_VirtualNetworks_Subnet_SubResourceEmbedded `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &VirtualNetworksSubnet_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-03-01"
func (subnet VirtualNetworksSubnet_Spec) GetAPIVersion() string {
	return "2024-03-01"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/virtualNetworks/subnets"
func (subnet *VirtualNetworksSubnet_Spec) GetType() string {
	return "Microsoft.Network/virtualNetworks/subnets"
}

// Properties of the subnet.
type SubnetPropertiesFormat_VirtualNetworks_Subnet_SubResourceEmbedded struct {
	// AddressPrefix: The address prefix for the subnet.
	AddressPrefix *string `json:"addressPrefix,omitempty"`

	// AddressPrefixes: List of address prefixes for the subnet.
	AddressPrefixes []string `json:"addressPrefixes,omitempty"`

	// ApplicationGatewayIPConfigurations: Application gateway IP configurations of virtual network resource.
	ApplicationGatewayIPConfigurations []ApplicationGatewayIPConfiguration_VirtualNetworks_Subnet_SubResourceEmbedded `json:"applicationGatewayIPConfigurations,omitempty"`

	// DefaultOutboundAccess: Set this property to false to disable default outbound connectivity for all VMs in the subnet.
	// This property can only be set at the time of subnet creation and cannot be updated for an existing subnet.
	DefaultOutboundAccess *bool `json:"defaultOutboundAccess,omitempty"`

	// Delegations: An array of references to the delegations on the subnet.
	Delegations []Delegation `json:"delegations,omitempty"`

	// IpAllocations: Array of IpAllocation which reference this subnet.
	IpAllocations []SubResource `json:"ipAllocations,omitempty"`

	// NatGateway: Nat gateway associated with this subnet.
	NatGateway *SubResource `json:"natGateway,omitempty"`

	// NetworkSecurityGroup: The reference to the NetworkSecurityGroup resource.
	NetworkSecurityGroup *NetworkSecurityGroupSpec_VirtualNetworks_Subnet_SubResourceEmbedded `json:"networkSecurityGroup,omitempty"`

	// PrivateEndpointNetworkPolicies: Enable or Disable apply network policies on private end point in the subnet.
	PrivateEndpointNetworkPolicies *SubnetPropertiesFormat_PrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"`

	// PrivateLinkServiceNetworkPolicies: Enable or Disable apply network policies on private link service in the subnet.
	PrivateLinkServiceNetworkPolicies *SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"`

	// RouteTable: The reference to the RouteTable resource.
	RouteTable *RouteTableSpec_VirtualNetworks_Subnet_SubResourceEmbedded `json:"routeTable,omitempty"`

	// ServiceEndpointPolicies: An array of service endpoint policies.
	ServiceEndpointPolicies []ServiceEndpointPolicySpec_VirtualNetworks_Subnet_SubResourceEmbedded `json:"serviceEndpointPolicies,omitempty"`

	// ServiceEndpoints: An array of service endpoints.
	ServiceEndpoints []ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`

	// SharingScope: Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This
	// property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty.
	SharingScope *SubnetPropertiesFormat_SharingScope `json:"sharingScope,omitempty"`
}

// IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed.
type ApplicationGatewayIPConfiguration_VirtualNetworks_Subnet_SubResourceEmbedded struct {
	// Id: Resource ID.
	Id *string `json:"id,omitempty"`
}

// Details the service to which the subnet is delegated.
type Delegation struct {
	// Name: The name of the resource that is unique within a subnet. This name can be used to access the resource.
	Name *string `json:"name,omitempty"`

	// Properties: Properties of the subnet.
	Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
}

// NetworkSecurityGroup resource.
type NetworkSecurityGroupSpec_VirtualNetworks_Subnet_SubResourceEmbedded struct {
	// Id: Resource ID.
	Id *string `json:"id,omitempty"`
}

// Route table resource.
type RouteTableSpec_VirtualNetworks_Subnet_SubResourceEmbedded struct {
	// Id: Resource ID.
	Id *string `json:"id,omitempty"`
}

// Service End point policy resource.
type ServiceEndpointPolicySpec_VirtualNetworks_Subnet_SubResourceEmbedded struct {
	// Id: Resource ID.
	Id *string `json:"id,omitempty"`
}

// The service endpoint properties.
type ServiceEndpointPropertiesFormat struct {
	// Locations: A list of locations.
	Locations []string `json:"locations,omitempty"`

	// NetworkIdentifier: SubResource as network identifier.
	NetworkIdentifier *SubResource `json:"networkIdentifier,omitempty"`

	// Service: The type of the endpoint service.
	Service *string `json:"service,omitempty"`
}

// +kubebuilder:validation:Enum={"Disabled","Enabled","NetworkSecurityGroupEnabled","RouteTableEnabled"}
type SubnetPropertiesFormat_PrivateEndpointNetworkPolicies string

const (
	SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_Disabled                    = SubnetPropertiesFormat_PrivateEndpointNetworkPolicies("Disabled")
	SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_Enabled                     = SubnetPropertiesFormat_PrivateEndpointNetworkPolicies("Enabled")
	SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_NetworkSecurityGroupEnabled = SubnetPropertiesFormat_PrivateEndpointNetworkPolicies("NetworkSecurityGroupEnabled")
	SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_RouteTableEnabled           = SubnetPropertiesFormat_PrivateEndpointNetworkPolicies("RouteTableEnabled")
)

// Mapping from string to SubnetPropertiesFormat_PrivateEndpointNetworkPolicies
var subnetPropertiesFormat_PrivateEndpointNetworkPolicies_Values = map[string]SubnetPropertiesFormat_PrivateEndpointNetworkPolicies{
	"disabled":                    SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_Disabled,
	"enabled":                     SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_Enabled,
	"networksecuritygroupenabled": SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_NetworkSecurityGroupEnabled,
	"routetableenabled":           SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_RouteTableEnabled,
}

// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies string

const (
	SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Disabled = SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies("Disabled")
	SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Enabled  = SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies("Enabled")
)

// Mapping from string to SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies
var subnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Values = map[string]SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies{
	"disabled": SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Disabled,
	"enabled":  SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Enabled,
}

// +kubebuilder:validation:Enum={"DelegatedServices","Tenant"}
type SubnetPropertiesFormat_SharingScope string

const (
	SubnetPropertiesFormat_SharingScope_DelegatedServices = SubnetPropertiesFormat_SharingScope("DelegatedServices")
	SubnetPropertiesFormat_SharingScope_Tenant            = SubnetPropertiesFormat_SharingScope("Tenant")
)

// Mapping from string to SubnetPropertiesFormat_SharingScope
var subnetPropertiesFormat_SharingScope_Values = map[string]SubnetPropertiesFormat_SharingScope{
	"delegatedservices": SubnetPropertiesFormat_SharingScope_DelegatedServices,
	"tenant":            SubnetPropertiesFormat_SharingScope_Tenant,
}

// Properties of a service delegation.
type ServiceDelegationPropertiesFormat struct {
	// ServiceName: The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
	ServiceName *string `json:"serviceName,omitempty"`
}
