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

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

var _ genruntime.ARMResourceSpec = &AfdOrigin_Spec{}

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

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

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

// The JSON object that contains the properties of the origin.
type AFDOriginProperties struct {
	// AzureOrigin: Resource reference to the Azure origin resource.
	AzureOrigin *ResourceReference `json:"azureOrigin,omitempty"`

	// EnabledState: Whether to enable health probes to be made against backends defined under backendPools. Health probes can
	// only be disabled if there is a single enabled backend in single enabled backend pool.
	EnabledState *AFDOriginProperties_EnabledState `json:"enabledState,omitempty"`

	// EnforceCertificateNameCheck: Whether to enable certificate name check at origin level
	EnforceCertificateNameCheck *bool `json:"enforceCertificateNameCheck,omitempty"`

	// HostName: The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be
	// unique across all origins in an endpoint.
	HostName *string `json:"hostName,omitempty" optionalConfigMapPair:"HostName"`

	// HttpPort: The value of the HTTP port. Must be between 1 and 65535.
	HttpPort *int `json:"httpPort,omitempty"`

	// HttpsPort: The value of the HTTPS port. Must be between 1 and 65535.
	HttpsPort *int `json:"httpsPort,omitempty"`

	// OriginHostHeader: The host header value sent to the origin with each request. If you leave this blank, the request
	// hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require
	// this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint
	OriginHostHeader *string `json:"originHostHeader,omitempty"`

	// Priority: Priority of origin in given origin group for load balancing. Higher priorities will not be used for load
	// balancing if any lower priority origin is healthy.Must be between 1 and 5
	Priority *int `json:"priority,omitempty"`

	// SharedPrivateLinkResource: The properties of the private link resource for private origin.
	SharedPrivateLinkResource *SharedPrivateLinkResourceProperties `json:"sharedPrivateLinkResource,omitempty"`

	// Weight: Weight of the origin in given origin group for load balancing. Must be between 1 and 1000
	Weight *int `json:"weight,omitempty"`
}

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

const (
	AFDOriginProperties_EnabledState_Disabled = AFDOriginProperties_EnabledState("Disabled")
	AFDOriginProperties_EnabledState_Enabled  = AFDOriginProperties_EnabledState("Enabled")
)

// Mapping from string to AFDOriginProperties_EnabledState
var aFDOriginProperties_EnabledState_Values = map[string]AFDOriginProperties_EnabledState{
	"disabled": AFDOriginProperties_EnabledState_Disabled,
	"enabled":  AFDOriginProperties_EnabledState_Enabled,
}

// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin.
type SharedPrivateLinkResourceProperties struct {
	// GroupId: The group id from the provider of resource the shared private link resource is for.
	GroupId *string `json:"groupId,omitempty"`

	// PrivateLink: The resource id of the resource the shared private link resource is for.
	PrivateLink *ResourceReference `json:"privateLink,omitempty"`

	// PrivateLinkLocation: The location of the shared private link resource
	PrivateLinkLocation *string `json:"privateLinkLocation,omitempty"`

	// RequestMessage: The request message for requesting approval of the shared private link resource.
	RequestMessage *string `json:"requestMessage,omitempty"`

	// Status: Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.
	Status *SharedPrivateLinkResourceProperties_Status `json:"status,omitempty"`
}

// +kubebuilder:validation:Enum={"Approved","Disconnected","Pending","Rejected","Timeout"}
type SharedPrivateLinkResourceProperties_Status string

const (
	SharedPrivateLinkResourceProperties_Status_Approved     = SharedPrivateLinkResourceProperties_Status("Approved")
	SharedPrivateLinkResourceProperties_Status_Disconnected = SharedPrivateLinkResourceProperties_Status("Disconnected")
	SharedPrivateLinkResourceProperties_Status_Pending      = SharedPrivateLinkResourceProperties_Status("Pending")
	SharedPrivateLinkResourceProperties_Status_Rejected     = SharedPrivateLinkResourceProperties_Status("Rejected")
	SharedPrivateLinkResourceProperties_Status_Timeout      = SharedPrivateLinkResourceProperties_Status("Timeout")
)

// Mapping from string to SharedPrivateLinkResourceProperties_Status
var sharedPrivateLinkResourceProperties_Status_Values = map[string]SharedPrivateLinkResourceProperties_Status{
	"approved":     SharedPrivateLinkResourceProperties_Status_Approved,
	"disconnected": SharedPrivateLinkResourceProperties_Status_Disconnected,
	"pending":      SharedPrivateLinkResourceProperties_Status_Pending,
	"rejected":     SharedPrivateLinkResourceProperties_Status_Rejected,
	"timeout":      SharedPrivateLinkResourceProperties_Status_Timeout,
}
