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

	// Properties: Properties of the Authorization Contract.
	Properties *AuthorizationContractProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &AuthorizationProvidersAuthorization_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.ApiManagement/service/authorizationProviders/authorizations"
func (authorization *AuthorizationProvidersAuthorization_Spec) GetType() string {
	return "Microsoft.ApiManagement/service/authorizationProviders/authorizations"
}

// Authorization details.
type AuthorizationContractProperties struct {
	// AuthorizationType: Authorization type options
	AuthorizationType *AuthorizationContractProperties_AuthorizationType `json:"authorizationType,omitempty"`

	// Oauth2GrantType: OAuth2 grant type options
	Oauth2GrantType *AuthorizationContractProperties_Oauth2GrantType `json:"oauth2grantType,omitempty"`

	// Parameters: Authorization parameters
	Parameters map[string]string `json:"parameters,omitempty"`
}

// +kubebuilder:validation:Enum={"OAuth2"}
type AuthorizationContractProperties_AuthorizationType string

const AuthorizationContractProperties_AuthorizationType_OAuth2 = AuthorizationContractProperties_AuthorizationType("OAuth2")

// Mapping from string to AuthorizationContractProperties_AuthorizationType
var authorizationContractProperties_AuthorizationType_Values = map[string]AuthorizationContractProperties_AuthorizationType{
	"oauth2": AuthorizationContractProperties_AuthorizationType_OAuth2,
}

// +kubebuilder:validation:Enum={"AuthorizationCode","ClientCredentials"}
type AuthorizationContractProperties_Oauth2GrantType string

const (
	AuthorizationContractProperties_Oauth2GrantType_AuthorizationCode = AuthorizationContractProperties_Oauth2GrantType("AuthorizationCode")
	AuthorizationContractProperties_Oauth2GrantType_ClientCredentials = AuthorizationContractProperties_Oauth2GrantType("ClientCredentials")
)

// Mapping from string to AuthorizationContractProperties_Oauth2GrantType
var authorizationContractProperties_Oauth2GrantType_Values = map[string]AuthorizationContractProperties_Oauth2GrantType{
	"authorizationcode": AuthorizationContractProperties_Oauth2GrantType_AuthorizationCode,
	"clientcredentials": AuthorizationContractProperties_Oauth2GrantType_ClientCredentials,
}
