// 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 TrafficManagerProfile_Spec struct {
	// Location: The Azure Region where the resource lives
	Location *string `json:"location,omitempty"`

	// Name: The name of the resource
	Name string `json:"name,omitempty"`

	// Properties: The properties of the Traffic Manager profile.
	Properties *ProfileProperties `json:"properties,omitempty"`

	// Tags: Resource tags.
	Tags map[string]string `json:"tags,omitempty"`

	// Type: The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles.
	Type *string `json:"type,omitempty"`
}

var _ genruntime.ARMResourceSpec = &TrafficManagerProfile_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2022-04-01"
func (profile TrafficManagerProfile_Spec) GetAPIVersion() string {
	return "2022-04-01"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/trafficmanagerprofiles"
func (profile *TrafficManagerProfile_Spec) GetType() string {
	return "Microsoft.Network/trafficmanagerprofiles"
}

// Class representing the Traffic Manager profile properties.
type ProfileProperties struct {
	// AllowedEndpointRecordTypes: The list of allowed endpoint record types.
	AllowedEndpointRecordTypes []AllowedEndpointRecordType `json:"allowedEndpointRecordTypes,omitempty"`

	// DnsConfig: The DNS settings of the Traffic Manager profile.
	DnsConfig *DnsConfig `json:"dnsConfig,omitempty"`

	// MaxReturn: Maximum number of endpoints to be returned for MultiValue routing type.
	MaxReturn *int `json:"maxReturn,omitempty"`

	// MonitorConfig: The endpoint monitoring settings of the Traffic Manager profile.
	MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"`

	// ProfileStatus: The status of the Traffic Manager profile.
	ProfileStatus *ProfileProperties_ProfileStatus `json:"profileStatus,omitempty"`

	// TrafficRoutingMethod: The traffic routing method of the Traffic Manager profile.
	TrafficRoutingMethod *ProfileProperties_TrafficRoutingMethod `json:"trafficRoutingMethod,omitempty"`

	// TrafficViewEnrollmentStatus: Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile.
	// Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile.
	TrafficViewEnrollmentStatus *ProfileProperties_TrafficViewEnrollmentStatus `json:"trafficViewEnrollmentStatus,omitempty"`
}

// The allowed type DNS record types for this profile.
// +kubebuilder:validation:Enum={"Any","DomainName","IPv4Address","IPv6Address"}
type AllowedEndpointRecordType string

const (
	AllowedEndpointRecordType_Any         = AllowedEndpointRecordType("Any")
	AllowedEndpointRecordType_DomainName  = AllowedEndpointRecordType("DomainName")
	AllowedEndpointRecordType_IPv4Address = AllowedEndpointRecordType("IPv4Address")
	AllowedEndpointRecordType_IPv6Address = AllowedEndpointRecordType("IPv6Address")
)

// Mapping from string to AllowedEndpointRecordType
var allowedEndpointRecordType_Values = map[string]AllowedEndpointRecordType{
	"any":         AllowedEndpointRecordType_Any,
	"domainname":  AllowedEndpointRecordType_DomainName,
	"ipv4address": AllowedEndpointRecordType_IPv4Address,
	"ipv6address": AllowedEndpointRecordType_IPv6Address,
}

// Class containing DNS settings in a Traffic Manager profile.
type DnsConfig struct {
	// RelativeName: The relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS domain
	// name used by Azure Traffic Manager to form the fully-qualified domain name (FQDN) of the profile.
	RelativeName *string `json:"relativeName,omitempty"`

	// Ttl: The DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS
	// responses provided by this Traffic Manager profile.
	Ttl *int `json:"ttl,omitempty"`
}

// Class containing endpoint monitoring settings in a Traffic Manager profile.
type MonitorConfig struct {
	// CustomHeaders: List of custom headers.
	CustomHeaders []MonitorConfig_CustomHeaders `json:"customHeaders,omitempty"`

	// ExpectedStatusCodeRanges: List of expected status code ranges.
	ExpectedStatusCodeRanges []MonitorConfig_ExpectedStatusCodeRanges `json:"expectedStatusCodeRanges,omitempty"`

	// IntervalInSeconds: The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager
	// will check the health of each endpoint in this profile.
	IntervalInSeconds *int `json:"intervalInSeconds,omitempty"`

	// Path: The path relative to the endpoint domain name used to probe for endpoint health.
	Path *string `json:"path,omitempty"`

	// Port: The TCP port used to probe for endpoint health.
	Port *int `json:"port,omitempty"`

	// ProfileMonitorStatus: The profile-level monitoring status of the Traffic Manager profile.
	ProfileMonitorStatus *MonitorConfig_ProfileMonitorStatus `json:"profileMonitorStatus,omitempty"`

	// Protocol: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
	Protocol *MonitorConfig_Protocol `json:"protocol,omitempty"`

	// TimeoutInSeconds: The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows
	// endpoints in this profile to response to the health check.
	TimeoutInSeconds *int `json:"timeoutInSeconds,omitempty"`

	// ToleratedNumberOfFailures: The number of consecutive failed health check that Traffic Manager tolerates before declaring
	// an endpoint in this profile Degraded after the next failed health check.
	ToleratedNumberOfFailures *int `json:"toleratedNumberOfFailures,omitempty"`
}

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

const (
	ProfileProperties_ProfileStatus_Disabled = ProfileProperties_ProfileStatus("Disabled")
	ProfileProperties_ProfileStatus_Enabled  = ProfileProperties_ProfileStatus("Enabled")
)

// Mapping from string to ProfileProperties_ProfileStatus
var profileProperties_ProfileStatus_Values = map[string]ProfileProperties_ProfileStatus{
	"disabled": ProfileProperties_ProfileStatus_Disabled,
	"enabled":  ProfileProperties_ProfileStatus_Enabled,
}

// +kubebuilder:validation:Enum={"Geographic","MultiValue","Performance","Priority","Subnet","Weighted"}
type ProfileProperties_TrafficRoutingMethod string

const (
	ProfileProperties_TrafficRoutingMethod_Geographic  = ProfileProperties_TrafficRoutingMethod("Geographic")
	ProfileProperties_TrafficRoutingMethod_MultiValue  = ProfileProperties_TrafficRoutingMethod("MultiValue")
	ProfileProperties_TrafficRoutingMethod_Performance = ProfileProperties_TrafficRoutingMethod("Performance")
	ProfileProperties_TrafficRoutingMethod_Priority    = ProfileProperties_TrafficRoutingMethod("Priority")
	ProfileProperties_TrafficRoutingMethod_Subnet      = ProfileProperties_TrafficRoutingMethod("Subnet")
	ProfileProperties_TrafficRoutingMethod_Weighted    = ProfileProperties_TrafficRoutingMethod("Weighted")
)

// Mapping from string to ProfileProperties_TrafficRoutingMethod
var profileProperties_TrafficRoutingMethod_Values = map[string]ProfileProperties_TrafficRoutingMethod{
	"geographic":  ProfileProperties_TrafficRoutingMethod_Geographic,
	"multivalue":  ProfileProperties_TrafficRoutingMethod_MultiValue,
	"performance": ProfileProperties_TrafficRoutingMethod_Performance,
	"priority":    ProfileProperties_TrafficRoutingMethod_Priority,
	"subnet":      ProfileProperties_TrafficRoutingMethod_Subnet,
	"weighted":    ProfileProperties_TrafficRoutingMethod_Weighted,
}

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

const (
	ProfileProperties_TrafficViewEnrollmentStatus_Disabled = ProfileProperties_TrafficViewEnrollmentStatus("Disabled")
	ProfileProperties_TrafficViewEnrollmentStatus_Enabled  = ProfileProperties_TrafficViewEnrollmentStatus("Enabled")
)

// Mapping from string to ProfileProperties_TrafficViewEnrollmentStatus
var profileProperties_TrafficViewEnrollmentStatus_Values = map[string]ProfileProperties_TrafficViewEnrollmentStatus{
	"disabled": ProfileProperties_TrafficViewEnrollmentStatus_Disabled,
	"enabled":  ProfileProperties_TrafficViewEnrollmentStatus_Enabled,
}

type MonitorConfig_CustomHeaders struct {
	// Name: Header name.
	Name *string `json:"name,omitempty"`

	// Value: Header value.
	Value *string `json:"value,omitempty"`
}

type MonitorConfig_ExpectedStatusCodeRanges struct {
	// Max: Max status code.
	Max *int `json:"max,omitempty"`

	// Min: Min status code.
	Min *int `json:"min,omitempty"`
}

// +kubebuilder:validation:Enum={"CheckingEndpoints","Degraded","Disabled","Inactive","Online"}
type MonitorConfig_ProfileMonitorStatus string

const (
	MonitorConfig_ProfileMonitorStatus_CheckingEndpoints = MonitorConfig_ProfileMonitorStatus("CheckingEndpoints")
	MonitorConfig_ProfileMonitorStatus_Degraded          = MonitorConfig_ProfileMonitorStatus("Degraded")
	MonitorConfig_ProfileMonitorStatus_Disabled          = MonitorConfig_ProfileMonitorStatus("Disabled")
	MonitorConfig_ProfileMonitorStatus_Inactive          = MonitorConfig_ProfileMonitorStatus("Inactive")
	MonitorConfig_ProfileMonitorStatus_Online            = MonitorConfig_ProfileMonitorStatus("Online")
)

// Mapping from string to MonitorConfig_ProfileMonitorStatus
var monitorConfig_ProfileMonitorStatus_Values = map[string]MonitorConfig_ProfileMonitorStatus{
	"checkingendpoints": MonitorConfig_ProfileMonitorStatus_CheckingEndpoints,
	"degraded":          MonitorConfig_ProfileMonitorStatus_Degraded,
	"disabled":          MonitorConfig_ProfileMonitorStatus_Disabled,
	"inactive":          MonitorConfig_ProfileMonitorStatus_Inactive,
	"online":            MonitorConfig_ProfileMonitorStatus_Online,
}

// +kubebuilder:validation:Enum={"HTTP","HTTPS","TCP"}
type MonitorConfig_Protocol string

const (
	MonitorConfig_Protocol_HTTP  = MonitorConfig_Protocol("HTTP")
	MonitorConfig_Protocol_HTTPS = MonitorConfig_Protocol("HTTPS")
	MonitorConfig_Protocol_TCP   = MonitorConfig_Protocol("TCP")
)

// Mapping from string to MonitorConfig_Protocol
var monitorConfig_Protocol_Values = map[string]MonitorConfig_Protocol{
	"http":  MonitorConfig_Protocol_HTTP,
	"https": MonitorConfig_Protocol_HTTPS,
	"tcp":   MonitorConfig_Protocol_TCP,
}
