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

	// Properties: API entity create of update properties.
	Properties *ApiCreateOrUpdateProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Api_Spec{}

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

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

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

// API Create or Update Properties.
type ApiCreateOrUpdateProperties struct {
	// APIVersion: Indicates the version identifier of the API if the API is versioned
	APIVersion *string `json:"apiVersion,omitempty"`

	// ApiRevision: Describes the revision of the API. If no value is provided, default revision 1 is created
	ApiRevision *string `json:"apiRevision,omitempty"`

	// ApiRevisionDescription: Description of the API Revision.
	ApiRevisionDescription *string `json:"apiRevisionDescription,omitempty"`

	// ApiType: Type of API to create.
	// * `http` creates a REST API
	// * `soap` creates a SOAP pass-through API
	// * `websocket` creates websocket API
	// * `graphql` creates GraphQL API.
	ApiType *ApiCreateOrUpdateProperties_ApiType `json:"apiType,omitempty"`

	// ApiVersionDescription: Description of the API Version.
	ApiVersionDescription *string `json:"apiVersionDescription,omitempty"`

	// ApiVersionSet: Version set details
	ApiVersionSet *ApiVersionSetContractDetails `json:"apiVersionSet,omitempty"`

	// ApiVersionSetId: A resource identifier for the related ApiVersionSet.
	ApiVersionSetId *string `json:"apiVersionSetId,omitempty"`

	// AuthenticationSettings: Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`

	// Contact: Contact information for the API.
	Contact *ApiContactInformation `json:"contact,omitempty"`

	// Description: Description of the API. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// DisplayName: API name. Must be 1 to 300 characters long.
	DisplayName *string `json:"displayName,omitempty"`

	// Format: Format of the Content in which the API is getting imported.
	Format *ApiCreateOrUpdateProperties_Format `json:"format,omitempty"`

	// IsCurrent: Indicates if API revision is current api revision.
	IsCurrent *bool `json:"isCurrent,omitempty"`

	// License: License information for the API.
	License *ApiLicenseInformation `json:"license,omitempty"`

	// Path: Relative URL uniquely identifying this API and all of its resource paths within the API Management service
	// instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public
	// URL for this API.
	Path *string `json:"path,omitempty"`

	// Protocols: Describes on which protocols the operations in this API can be invoked.
	Protocols []ApiCreateOrUpdateProperties_Protocols `json:"protocols,omitempty"`

	// ServiceUrl: Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
	ServiceUrl *string `json:"serviceUrl,omitempty"`

	// SourceApiId: API identifier of the source API.
	SourceApiId *string `json:"sourceApiId,omitempty"`

	// SubscriptionKeyParameterNames: Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`

	// SubscriptionRequired: Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`

	// TermsOfServiceUrl:  A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceUrl *string `json:"termsOfServiceUrl,omitempty"`

	// TranslateRequiredQueryParameters: Strategy of translating required query parameters to template ones. By default has
	// value 'template'. Possible values: 'template', 'query'
	TranslateRequiredQueryParameters *ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters `json:"translateRequiredQueryParameters,omitempty"`

	// Type: Type of API.
	Type *ApiCreateOrUpdateProperties_Type `json:"type,omitempty"`

	// Value: Content value when Importing an API.
	Value *string `json:"value,omitempty"`

	// WsdlSelector: Criteria to limit import of WSDL to a subset of the document.
	WsdlSelector *ApiCreateOrUpdateProperties_WsdlSelector `json:"wsdlSelector,omitempty"`
}

// API contact information
type ApiContactInformation struct {
	// Email: The email address of the contact person/organization. MUST be in the format of an email address
	Email *string `json:"email,omitempty"`

	// Name: The identifying name of the contact person/organization
	Name *string `json:"name,omitempty"`

	// Url: The URL pointing to the contact information. MUST be in the format of a URL
	Url *string `json:"url,omitempty"`
}

// +kubebuilder:validation:Enum={"graphql","http","soap","websocket"}
type ApiCreateOrUpdateProperties_ApiType string

const (
	ApiCreateOrUpdateProperties_ApiType_Graphql   = ApiCreateOrUpdateProperties_ApiType("graphql")
	ApiCreateOrUpdateProperties_ApiType_Http      = ApiCreateOrUpdateProperties_ApiType("http")
	ApiCreateOrUpdateProperties_ApiType_Soap      = ApiCreateOrUpdateProperties_ApiType("soap")
	ApiCreateOrUpdateProperties_ApiType_Websocket = ApiCreateOrUpdateProperties_ApiType("websocket")
)

// Mapping from string to ApiCreateOrUpdateProperties_ApiType
var apiCreateOrUpdateProperties_ApiType_Values = map[string]ApiCreateOrUpdateProperties_ApiType{
	"graphql":   ApiCreateOrUpdateProperties_ApiType_Graphql,
	"http":      ApiCreateOrUpdateProperties_ApiType_Http,
	"soap":      ApiCreateOrUpdateProperties_ApiType_Soap,
	"websocket": ApiCreateOrUpdateProperties_ApiType_Websocket,
}

// +kubebuilder:validation:Enum={"graphql-link","openapi","openapi+json","openapi+json-link","openapi-link","swagger-json","swagger-link-json","wadl-link-json","wadl-xml","wsdl","wsdl-link"}
type ApiCreateOrUpdateProperties_Format string

const (
	ApiCreateOrUpdateProperties_Format_GraphqlLink     = ApiCreateOrUpdateProperties_Format("graphql-link")
	ApiCreateOrUpdateProperties_Format_Openapi         = ApiCreateOrUpdateProperties_Format("openapi")
	ApiCreateOrUpdateProperties_Format_OpenapiJson     = ApiCreateOrUpdateProperties_Format("openapi+json")
	ApiCreateOrUpdateProperties_Format_OpenapiJsonLink = ApiCreateOrUpdateProperties_Format("openapi+json-link")
	ApiCreateOrUpdateProperties_Format_OpenapiLink     = ApiCreateOrUpdateProperties_Format("openapi-link")
	ApiCreateOrUpdateProperties_Format_SwaggerJson     = ApiCreateOrUpdateProperties_Format("swagger-json")
	ApiCreateOrUpdateProperties_Format_SwaggerLinkJson = ApiCreateOrUpdateProperties_Format("swagger-link-json")
	ApiCreateOrUpdateProperties_Format_WadlLinkJson    = ApiCreateOrUpdateProperties_Format("wadl-link-json")
	ApiCreateOrUpdateProperties_Format_WadlXml         = ApiCreateOrUpdateProperties_Format("wadl-xml")
	ApiCreateOrUpdateProperties_Format_Wsdl            = ApiCreateOrUpdateProperties_Format("wsdl")
	ApiCreateOrUpdateProperties_Format_WsdlLink        = ApiCreateOrUpdateProperties_Format("wsdl-link")
)

// Mapping from string to ApiCreateOrUpdateProperties_Format
var apiCreateOrUpdateProperties_Format_Values = map[string]ApiCreateOrUpdateProperties_Format{
	"graphql-link":      ApiCreateOrUpdateProperties_Format_GraphqlLink,
	"openapi":           ApiCreateOrUpdateProperties_Format_Openapi,
	"openapi+json":      ApiCreateOrUpdateProperties_Format_OpenapiJson,
	"openapi+json-link": ApiCreateOrUpdateProperties_Format_OpenapiJsonLink,
	"openapi-link":      ApiCreateOrUpdateProperties_Format_OpenapiLink,
	"swagger-json":      ApiCreateOrUpdateProperties_Format_SwaggerJson,
	"swagger-link-json": ApiCreateOrUpdateProperties_Format_SwaggerLinkJson,
	"wadl-link-json":    ApiCreateOrUpdateProperties_Format_WadlLinkJson,
	"wadl-xml":          ApiCreateOrUpdateProperties_Format_WadlXml,
	"wsdl":              ApiCreateOrUpdateProperties_Format_Wsdl,
	"wsdl-link":         ApiCreateOrUpdateProperties_Format_WsdlLink,
}

// +kubebuilder:validation:Enum={"http","https","ws","wss"}
type ApiCreateOrUpdateProperties_Protocols string

const (
	ApiCreateOrUpdateProperties_Protocols_Http  = ApiCreateOrUpdateProperties_Protocols("http")
	ApiCreateOrUpdateProperties_Protocols_Https = ApiCreateOrUpdateProperties_Protocols("https")
	ApiCreateOrUpdateProperties_Protocols_Ws    = ApiCreateOrUpdateProperties_Protocols("ws")
	ApiCreateOrUpdateProperties_Protocols_Wss   = ApiCreateOrUpdateProperties_Protocols("wss")
)

// Mapping from string to ApiCreateOrUpdateProperties_Protocols
var apiCreateOrUpdateProperties_Protocols_Values = map[string]ApiCreateOrUpdateProperties_Protocols{
	"http":  ApiCreateOrUpdateProperties_Protocols_Http,
	"https": ApiCreateOrUpdateProperties_Protocols_Https,
	"ws":    ApiCreateOrUpdateProperties_Protocols_Ws,
	"wss":   ApiCreateOrUpdateProperties_Protocols_Wss,
}

// +kubebuilder:validation:Enum={"query","template"}
type ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters string

const (
	ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Query    = ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters("query")
	ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Template = ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters("template")
)

// Mapping from string to ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters
var apiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Values = map[string]ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters{
	"query":    ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Query,
	"template": ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Template,
}

// +kubebuilder:validation:Enum={"graphql","http","soap","websocket"}
type ApiCreateOrUpdateProperties_Type string

const (
	ApiCreateOrUpdateProperties_Type_Graphql   = ApiCreateOrUpdateProperties_Type("graphql")
	ApiCreateOrUpdateProperties_Type_Http      = ApiCreateOrUpdateProperties_Type("http")
	ApiCreateOrUpdateProperties_Type_Soap      = ApiCreateOrUpdateProperties_Type("soap")
	ApiCreateOrUpdateProperties_Type_Websocket = ApiCreateOrUpdateProperties_Type("websocket")
)

// Mapping from string to ApiCreateOrUpdateProperties_Type
var apiCreateOrUpdateProperties_Type_Values = map[string]ApiCreateOrUpdateProperties_Type{
	"graphql":   ApiCreateOrUpdateProperties_Type_Graphql,
	"http":      ApiCreateOrUpdateProperties_Type_Http,
	"soap":      ApiCreateOrUpdateProperties_Type_Soap,
	"websocket": ApiCreateOrUpdateProperties_Type_Websocket,
}

type ApiCreateOrUpdateProperties_WsdlSelector struct {
	// WsdlEndpointName: Name of endpoint(port) to import from WSDL
	WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"`

	// WsdlServiceName: Name of service to import from WSDL
	WsdlServiceName *string `json:"wsdlServiceName,omitempty"`
}

// API license information
type ApiLicenseInformation struct {
	// Name: The license name used for the API
	Name *string `json:"name,omitempty"`

	// Url: A URL to the license used for the API. MUST be in the format of a URL
	Url *string `json:"url,omitempty"`
}

// An API Version Set contains the common configuration for a set of API Versions relating
type ApiVersionSetContractDetails struct {
	// Description: Description of API Version Set.
	Description *string `json:"description,omitempty"`

	// Id: Identifier for existing API Version Set. Omit this value to create a new Version Set.
	Id *string `json:"id,omitempty"`

	// Name: The display Name of the API Version Set.
	Name *string `json:"name,omitempty"`

	// VersionHeaderName: Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.
	VersionHeaderName *string `json:"versionHeaderName,omitempty"`

	// VersionQueryName: Name of query parameter that indicates the API Version if versioningScheme is set to `query`.
	VersionQueryName *string `json:"versionQueryName,omitempty"`

	// VersioningScheme: An value that determines where the API Version identifier will be located in a HTTP request.
	VersioningScheme *ApiVersionSetContractDetails_VersioningScheme `json:"versioningScheme,omitempty"`
}

// API Authentication Settings.
type AuthenticationSettingsContract struct {
	// OAuth2: OAuth2 Authentication settings
	OAuth2 *OAuth2AuthenticationSettingsContract `json:"oAuth2,omitempty"`

	// OAuth2AuthenticationSettings: Collection of OAuth2 authentication settings included into this API.
	OAuth2AuthenticationSettings []OAuth2AuthenticationSettingsContract `json:"oAuth2AuthenticationSettings,omitempty"`

	// Openid: OpenID Connect Authentication Settings
	Openid *OpenIdAuthenticationSettingsContract `json:"openid,omitempty"`

	// OpenidAuthenticationSettings: Collection of Open ID Connect authentication settings included into this API.
	OpenidAuthenticationSettings []OpenIdAuthenticationSettingsContract `json:"openidAuthenticationSettings,omitempty"`
}

// Subscription key parameter names details.
type SubscriptionKeyParameterNamesContract struct {
	// Header: Subscription key header name.
	Header *string `json:"header,omitempty"`

	// Query: Subscription key query string parameter name.
	Query *string `json:"query,omitempty"`
}

// +kubebuilder:validation:Enum={"Header","Query","Segment"}
type ApiVersionSetContractDetails_VersioningScheme string

const (
	ApiVersionSetContractDetails_VersioningScheme_Header  = ApiVersionSetContractDetails_VersioningScheme("Header")
	ApiVersionSetContractDetails_VersioningScheme_Query   = ApiVersionSetContractDetails_VersioningScheme("Query")
	ApiVersionSetContractDetails_VersioningScheme_Segment = ApiVersionSetContractDetails_VersioningScheme("Segment")
)

// Mapping from string to ApiVersionSetContractDetails_VersioningScheme
var apiVersionSetContractDetails_VersioningScheme_Values = map[string]ApiVersionSetContractDetails_VersioningScheme{
	"header":  ApiVersionSetContractDetails_VersioningScheme_Header,
	"query":   ApiVersionSetContractDetails_VersioningScheme_Query,
	"segment": ApiVersionSetContractDetails_VersioningScheme_Segment,
}

// API OAuth2 Authentication settings details.
type OAuth2AuthenticationSettingsContract struct {
	// AuthorizationServerId: OAuth authorization server identifier.
	AuthorizationServerId *string `json:"authorizationServerId,omitempty"`

	// Scope: operations scope.
	Scope *string `json:"scope,omitempty"`
}

// API OAuth2 Authentication settings details.
type OpenIdAuthenticationSettingsContract struct {
	// BearerTokenSendingMethods: How to send token to the server.
	BearerTokenSendingMethods []BearerTokenSendingMethodsContract `json:"bearerTokenSendingMethods,omitempty"`

	// OpenidProviderId: OAuth authorization server identifier.
	OpenidProviderId *string `json:"openidProviderId,omitempty"`
}

// Form of an authorization grant, which the client uses to request the access token.
// +kubebuilder:validation:Enum={"authorizationHeader","query"}
type BearerTokenSendingMethodsContract string

const (
	BearerTokenSendingMethodsContract_AuthorizationHeader = BearerTokenSendingMethodsContract("authorizationHeader")
	BearerTokenSendingMethodsContract_Query               = BearerTokenSendingMethodsContract("query")
)

// Mapping from string to BearerTokenSendingMethodsContract
var bearerTokenSendingMethodsContract_Values = map[string]BearerTokenSendingMethodsContract{
	"authorizationheader": BearerTokenSendingMethodsContract_AuthorizationHeader,
	"query":               BearerTokenSendingMethodsContract_Query,
}
