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

	// Properties: The JSON object that contains the properties of the domain to create.
	Properties *AFDDomainProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &AfdCustomDomain_Spec{}

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

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

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

// The JSON object that contains the properties of the domain to create.
type AFDDomainProperties struct {
	// AzureDnsZone: Resource reference to the Azure DNS zone
	AzureDnsZone *ResourceReference `json:"azureDnsZone,omitempty"`

	// ExtendedProperties: Key-Value pair representing migration properties for domains.
	ExtendedProperties map[string]string `json:"extendedProperties,omitempty"`

	// HostName: The host name of the domain. Must be a domain name.
	HostName *string `json:"hostName,omitempty"`

	// PreValidatedCustomDomainResourceId: Resource reference to the Azure resource where custom domain ownership was
	// prevalidated
	PreValidatedCustomDomainResourceId *ResourceReference `json:"preValidatedCustomDomainResourceId,omitempty"`

	// TlsSettings: The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate
	// or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.
	TlsSettings *AFDDomainHttpsParameters `json:"tlsSettings,omitempty"`
}

// The JSON object that contains the properties to secure a domain.
type AFDDomainHttpsParameters struct {
	// CertificateType: Defines the source of the SSL certificate.
	CertificateType *AFDDomainHttpsParameters_CertificateType `json:"certificateType,omitempty"`

	// MinimumTlsVersion: TLS protocol version that will be used for Https
	MinimumTlsVersion *AFDDomainHttpsParameters_MinimumTlsVersion `json:"minimumTlsVersion,omitempty"`

	// Secret: Resource reference to the secret. ie. subs/rg/profile/secret
	Secret *ResourceReference `json:"secret,omitempty"`
}

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

// +kubebuilder:validation:Enum={"AzureFirstPartyManagedCertificate","CustomerCertificate","ManagedCertificate"}
type AFDDomainHttpsParameters_CertificateType string

const (
	AFDDomainHttpsParameters_CertificateType_AzureFirstPartyManagedCertificate = AFDDomainHttpsParameters_CertificateType("AzureFirstPartyManagedCertificate")
	AFDDomainHttpsParameters_CertificateType_CustomerCertificate               = AFDDomainHttpsParameters_CertificateType("CustomerCertificate")
	AFDDomainHttpsParameters_CertificateType_ManagedCertificate                = AFDDomainHttpsParameters_CertificateType("ManagedCertificate")
)

// Mapping from string to AFDDomainHttpsParameters_CertificateType
var aFDDomainHttpsParameters_CertificateType_Values = map[string]AFDDomainHttpsParameters_CertificateType{
	"azurefirstpartymanagedcertificate": AFDDomainHttpsParameters_CertificateType_AzureFirstPartyManagedCertificate,
	"customercertificate":               AFDDomainHttpsParameters_CertificateType_CustomerCertificate,
	"managedcertificate":                AFDDomainHttpsParameters_CertificateType_ManagedCertificate,
}

// +kubebuilder:validation:Enum={"TLS10","TLS12"}
type AFDDomainHttpsParameters_MinimumTlsVersion string

const (
	AFDDomainHttpsParameters_MinimumTlsVersion_TLS10 = AFDDomainHttpsParameters_MinimumTlsVersion("TLS10")
	AFDDomainHttpsParameters_MinimumTlsVersion_TLS12 = AFDDomainHttpsParameters_MinimumTlsVersion("TLS12")
)

// Mapping from string to AFDDomainHttpsParameters_MinimumTlsVersion
var aFDDomainHttpsParameters_MinimumTlsVersion_Values = map[string]AFDDomainHttpsParameters_MinimumTlsVersion{
	"tls10": AFDDomainHttpsParameters_MinimumTlsVersion_TLS10,
	"tls12": AFDDomainHttpsParameters_MinimumTlsVersion_TLS12,
}
