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

	// Properties: Properties of the Policy.
	Properties *PolicyContractProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Policy_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.ApiManagement/service/policies"
func (policy *Policy_Spec) GetType() string {
	return "Microsoft.ApiManagement/service/policies"
}

// Policy contract Properties.
type PolicyContractProperties struct {
	// Format: Format of the policyContent.
	Format *PolicyContractProperties_Format `json:"format,omitempty"`

	// Value: Contents of the Policy as defined by the format.
	Value *string `json:"value,omitempty"`
}

// +kubebuilder:validation:Enum={"rawxml","rawxml-link","xml","xml-link"}
type PolicyContractProperties_Format string

const (
	PolicyContractProperties_Format_Rawxml     = PolicyContractProperties_Format("rawxml")
	PolicyContractProperties_Format_RawxmlLink = PolicyContractProperties_Format("rawxml-link")
	PolicyContractProperties_Format_Xml        = PolicyContractProperties_Format("xml")
	PolicyContractProperties_Format_XmlLink    = PolicyContractProperties_Format("xml-link")
)

// Mapping from string to PolicyContractProperties_Format
var policyContractProperties_Format_Values = map[string]PolicyContractProperties_Format{
	"rawxml":      PolicyContractProperties_Format_Rawxml,
	"rawxml-link": PolicyContractProperties_Format_RawxmlLink,
	"xml":         PolicyContractProperties_Format_Xml,
	"xml-link":    PolicyContractProperties_Format_XmlLink,
}
