// 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 AfdOriginGroup_Spec struct {
	Name string `json:"name,omitempty"`

	// Properties: The JSON object that contains the properties of the origin group.
	Properties *AFDOriginGroupProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &AfdOriginGroup_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2023-05-01"
func (group AfdOriginGroup_Spec) GetAPIVersion() string {
	return "2023-05-01"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Cdn/profiles/originGroups"
func (group *AfdOriginGroup_Spec) GetType() string {
	return "Microsoft.Cdn/profiles/originGroups"
}

// The JSON object that contains the properties of the origin group.
type AFDOriginGroupProperties struct {
	// HealthProbeSettings: Health probe settings to the origin that is used to determine the health of the origin.
	HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"`

	// LoadBalancingSettings: Load balancing settings for a backend pool
	LoadBalancingSettings *LoadBalancingSettingsParameters `json:"loadBalancingSettings,omitempty"`

	// SessionAffinityState: Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
	SessionAffinityState *AFDOriginGroupProperties_SessionAffinityState `json:"sessionAffinityState,omitempty"`

	// TrafficRestorationTimeToHealedOrNewEndpointsInMinutes: Time in minutes to shift the traffic to the endpoint gradually
	// when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not
	// supported.
	TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"`
}

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

const (
	AFDOriginGroupProperties_SessionAffinityState_Disabled = AFDOriginGroupProperties_SessionAffinityState("Disabled")
	AFDOriginGroupProperties_SessionAffinityState_Enabled  = AFDOriginGroupProperties_SessionAffinityState("Enabled")
)

// Mapping from string to AFDOriginGroupProperties_SessionAffinityState
var aFDOriginGroupProperties_SessionAffinityState_Values = map[string]AFDOriginGroupProperties_SessionAffinityState{
	"disabled": AFDOriginGroupProperties_SessionAffinityState_Disabled,
	"enabled":  AFDOriginGroupProperties_SessionAffinityState_Enabled,
}

// The JSON object that contains the properties to send health probes to origin.
type HealthProbeParameters struct {
	// ProbeIntervalInSeconds: The number of seconds between health probes.Default is 240sec.
	ProbeIntervalInSeconds *int `json:"probeIntervalInSeconds,omitempty"`

	// ProbePath: The path relative to the origin that is used to determine the health of the origin.
	ProbePath *string `json:"probePath,omitempty"`

	// ProbeProtocol: Protocol to use for health probe.
	ProbeProtocol *HealthProbeParameters_ProbeProtocol `json:"probeProtocol,omitempty"`

	// ProbeRequestType: The type of health probe request that is made.
	ProbeRequestType *HealthProbeParameters_ProbeRequestType `json:"probeRequestType,omitempty"`
}

// Round-Robin load balancing settings for a backend pool
type LoadBalancingSettingsParameters struct {
	// AdditionalLatencyInMilliseconds: The additional latency in milliseconds for probes to fall into the lowest latency bucket
	AdditionalLatencyInMilliseconds *int `json:"additionalLatencyInMilliseconds,omitempty"`

	// SampleSize: The number of samples to consider for load balancing decisions
	SampleSize *int `json:"sampleSize,omitempty"`

	// SuccessfulSamplesRequired: The number of samples within the sample period that must succeed
	SuccessfulSamplesRequired *int `json:"successfulSamplesRequired,omitempty"`
}

// +kubebuilder:validation:Enum={"Http","Https","NotSet"}
type HealthProbeParameters_ProbeProtocol string

const (
	HealthProbeParameters_ProbeProtocol_Http   = HealthProbeParameters_ProbeProtocol("Http")
	HealthProbeParameters_ProbeProtocol_Https  = HealthProbeParameters_ProbeProtocol("Https")
	HealthProbeParameters_ProbeProtocol_NotSet = HealthProbeParameters_ProbeProtocol("NotSet")
)

// Mapping from string to HealthProbeParameters_ProbeProtocol
var healthProbeParameters_ProbeProtocol_Values = map[string]HealthProbeParameters_ProbeProtocol{
	"http":   HealthProbeParameters_ProbeProtocol_Http,
	"https":  HealthProbeParameters_ProbeProtocol_Https,
	"notset": HealthProbeParameters_ProbeProtocol_NotSet,
}

// +kubebuilder:validation:Enum={"GET","HEAD","NotSet"}
type HealthProbeParameters_ProbeRequestType string

const (
	HealthProbeParameters_ProbeRequestType_GET    = HealthProbeParameters_ProbeRequestType("GET")
	HealthProbeParameters_ProbeRequestType_HEAD   = HealthProbeParameters_ProbeRequestType("HEAD")
	HealthProbeParameters_ProbeRequestType_NotSet = HealthProbeParameters_ProbeRequestType("NotSet")
)

// Mapping from string to HealthProbeParameters_ProbeRequestType
var healthProbeParameters_ProbeRequestType_Values = map[string]HealthProbeParameters_ProbeRequestType{
	"get":    HealthProbeParameters_ProbeRequestType_GET,
	"head":   HealthProbeParameters_ProbeRequestType_HEAD,
	"notset": HealthProbeParameters_ProbeRequestType_NotSet,
}
