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

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

var _ genruntime.ARMResourceSpec = &AuthorizationProvider_Spec{}

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

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

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

// Authorization Provider details.
type AuthorizationProviderContractProperties struct {
	// DisplayName: Authorization Provider name. Must be 1 to 300 characters long.
	DisplayName *string `json:"displayName,omitempty"`

	// IdentityProvider: Identity provider name. Must be 1 to 300 characters long.
	IdentityProvider *string `json:"identityProvider,omitempty"`

	// Oauth2: OAuth2 settings
	Oauth2 *AuthorizationProviderOAuth2Settings `json:"oauth2,omitempty"`
}

// OAuth2 settings details
type AuthorizationProviderOAuth2Settings struct {
	// GrantTypes: OAuth2 settings
	GrantTypes *AuthorizationProviderOAuth2GrantTypes `json:"grantTypes,omitempty"`

	// RedirectUrl: Redirect URL to be set in the OAuth application.
	RedirectUrl *string `json:"redirectUrl,omitempty"`
}

// Authorization Provider oauth2 grant types settings
type AuthorizationProviderOAuth2GrantTypes struct {
	// AuthorizationCode: OAuth2 authorization code grant parameters
	AuthorizationCode map[string]string `json:"authorizationCode,omitempty"`

	// ClientCredentials: OAuth2 client credential grant parameters
	ClientCredentials map[string]string `json:"clientCredentials,omitempty"`
}
