// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package arm

import (
	"encoding/json"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
)

type WorkspacesConnection_Spec struct {
	Name       string                           `json:"name,omitempty"`
	Properties *WorkspaceConnectionPropertiesV2 `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &WorkspacesConnection_Spec{}

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

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.MachineLearningServices/workspaces/connections"
func (connection *WorkspacesConnection_Spec) GetType() string {
	return "Microsoft.MachineLearningServices/workspaces/connections"
}

type WorkspaceConnectionPropertiesV2 struct {
	// AAD: Mutually exclusive with all other properties
	AAD *AADAuthTypeWorkspaceConnectionProperties `json:"aad,omitempty"`

	// AccessKey: Mutually exclusive with all other properties
	AccessKey *AccessKeyAuthTypeWorkspaceConnectionProperties `json:"accessKey,omitempty"`

	// AccountKey: Mutually exclusive with all other properties
	AccountKey *AccountKeyAuthTypeWorkspaceConnectionProperties `json:"accountKey,omitempty"`

	// ApiKey: Mutually exclusive with all other properties
	ApiKey *ApiKeyAuthWorkspaceConnectionProperties `json:"apiKey,omitempty"`

	// CustomKeys: Mutually exclusive with all other properties
	CustomKeys *CustomKeysWorkspaceConnectionProperties `json:"customKeys,omitempty"`

	// ManagedIdentity: Mutually exclusive with all other properties
	ManagedIdentity *ManagedIdentityAuthTypeWorkspaceConnectionProperties `json:"managedIdentity,omitempty"`

	// None: Mutually exclusive with all other properties
	None *NoneAuthTypeWorkspaceConnectionProperties `json:"none,omitempty"`

	// OAuth2: Mutually exclusive with all other properties
	OAuth2 *OAuth2AuthTypeWorkspaceConnectionProperties `json:"oAuth2,omitempty"`

	// PAT: Mutually exclusive with all other properties
	PAT *PATAuthTypeWorkspaceConnectionProperties `json:"pat,omitempty"`

	// SAS: Mutually exclusive with all other properties
	SAS *SASAuthTypeWorkspaceConnectionProperties `json:"sas,omitempty"`

	// ServicePrincipal: Mutually exclusive with all other properties
	ServicePrincipal *ServicePrincipalAuthTypeWorkspaceConnectionProperties `json:"servicePrincipal,omitempty"`

	// UsernamePassword: Mutually exclusive with all other properties
	UsernamePassword *UsernamePasswordAuthTypeWorkspaceConnectionProperties `json:"usernamePassword,omitempty"`
}

// MarshalJSON defers JSON marshaling to the first non-nil property, because WorkspaceConnectionPropertiesV2 represents a discriminated union (JSON OneOf)
func (v2 WorkspaceConnectionPropertiesV2) MarshalJSON() ([]byte, error) {
	if v2.AAD != nil {
		return json.Marshal(v2.AAD)
	}

	if v2.AccessKey != nil {
		return json.Marshal(v2.AccessKey)
	}

	if v2.AccountKey != nil {
		return json.Marshal(v2.AccountKey)
	}

	if v2.ApiKey != nil {
		return json.Marshal(v2.ApiKey)
	}

	if v2.CustomKeys != nil {
		return json.Marshal(v2.CustomKeys)
	}

	if v2.ManagedIdentity != nil {
		return json.Marshal(v2.ManagedIdentity)
	}

	if v2.None != nil {
		return json.Marshal(v2.None)
	}

	if v2.OAuth2 != nil {
		return json.Marshal(v2.OAuth2)
	}

	if v2.PAT != nil {
		return json.Marshal(v2.PAT)
	}

	if v2.SAS != nil {
		return json.Marshal(v2.SAS)
	}

	if v2.ServicePrincipal != nil {
		return json.Marshal(v2.ServicePrincipal)
	}

	if v2.UsernamePassword != nil {
		return json.Marshal(v2.UsernamePassword)
	}

	return nil, nil
}

// UnmarshalJSON unmarshals the WorkspaceConnectionPropertiesV2
func (v2 *WorkspaceConnectionPropertiesV2) UnmarshalJSON(data []byte) error {
	var rawJson map[string]interface{}
	err := json.Unmarshal(data, &rawJson)
	if err != nil {
		return err
	}
	discriminator := rawJson["authType"]
	if discriminator == "AAD" {
		v2.AAD = &AADAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.AAD)
	}
	if discriminator == "AccessKey" {
		v2.AccessKey = &AccessKeyAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.AccessKey)
	}
	if discriminator == "AccountKey" {
		v2.AccountKey = &AccountKeyAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.AccountKey)
	}
	if discriminator == "ApiKey" {
		v2.ApiKey = &ApiKeyAuthWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.ApiKey)
	}
	if discriminator == "CustomKeys" {
		v2.CustomKeys = &CustomKeysWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.CustomKeys)
	}
	if discriminator == "ManagedIdentity" {
		v2.ManagedIdentity = &ManagedIdentityAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.ManagedIdentity)
	}
	if discriminator == "None" {
		v2.None = &NoneAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.None)
	}
	if discriminator == "OAuth2" {
		v2.OAuth2 = &OAuth2AuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.OAuth2)
	}
	if discriminator == "PAT" {
		v2.PAT = &PATAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.PAT)
	}
	if discriminator == "SAS" {
		v2.SAS = &SASAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.SAS)
	}
	if discriminator == "ServicePrincipal" {
		v2.ServicePrincipal = &ServicePrincipalAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.ServicePrincipal)
	}
	if discriminator == "UsernamePassword" {
		v2.UsernamePassword = &UsernamePasswordAuthTypeWorkspaceConnectionProperties{}
		return json.Unmarshal(data, v2.UsernamePassword)
	}

	// No error
	return nil
}

type AADAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType AADAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory `json:"category,omitempty"`
	ExpiryTime    *string             `json:"expiryTime,omitempty"`
	IsSharedToAll *bool               `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *AADAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type AccessKeyAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory           `json:"category,omitempty"`
	Credentials   *WorkspaceConnectionAccessKey `json:"credentials,omitempty"`
	ExpiryTime    *string                       `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                         `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type AccountKeyAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory            `json:"category,omitempty"`
	Credentials   *WorkspaceConnectionAccountKey `json:"credentials,omitempty"`
	ExpiryTime    *string                        `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                          `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type ApiKeyAuthWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType ApiKeyAuthWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category *ConnectionCategory `json:"category,omitempty"`

	// Credentials: Api key object for workspace connection credential.
	Credentials   *WorkspaceConnectionApiKey `json:"credentials,omitempty"`
	ExpiryTime    *string                    `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                      `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *ApiKeyAuthWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type CustomKeysWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType CustomKeysWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category *ConnectionCategory `json:"category,omitempty"`

	// Credentials: Custom Keys credential object
	Credentials   *CustomKeys `json:"credentials,omitempty"`
	ExpiryTime    *string     `json:"expiryTime,omitempty"`
	IsSharedToAll *bool       `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *CustomKeysWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory                 `json:"category,omitempty"`
	Credentials   *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"`
	ExpiryTime    *string                             `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                               `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type NoneAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType NoneAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory `json:"category,omitempty"`
	ExpiryTime    *string             `json:"expiryTime,omitempty"`
	IsSharedToAll *bool               `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *NoneAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type OAuth2AuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType OAuth2AuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category *ConnectionCategory `json:"category,omitempty"`

	// Credentials: ClientId and ClientSecret are required. Other properties are optional
	// depending on each OAuth2 provider's  implementation.
	Credentials   *WorkspaceConnectionOAuth2 `json:"credentials,omitempty"`
	ExpiryTime    *string                    `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                      `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type PATAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType PATAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory                     `json:"category,omitempty"`
	Credentials   *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"`
	ExpiryTime    *string                                 `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                                   `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *PATAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type SASAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType SASAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory                       `json:"category,omitempty"`
	Credentials   *WorkspaceConnectionSharedAccessSignature `json:"credentials,omitempty"`
	ExpiryTime    *string                                   `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                                     `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *SASAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type ServicePrincipalAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory                  `json:"category,omitempty"`
	Credentials   *WorkspaceConnectionServicePrincipal `json:"credentials,omitempty"`
	ExpiryTime    *string                              `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                                `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

type UsernamePasswordAuthTypeWorkspaceConnectionProperties struct {
	// AuthType: Authentication type of the connection target
	AuthType UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType `json:"authType,omitempty"`

	// Category: Category of the connection
	Category      *ConnectionCategory                  `json:"category,omitempty"`
	Credentials   *WorkspaceConnectionUsernamePassword `json:"credentials,omitempty"`
	ExpiryTime    *string                              `json:"expiryTime,omitempty"`
	IsSharedToAll *bool                                `json:"isSharedToAll,omitempty"`

	// Metadata: Store user metadata for this connection
	Metadata       map[string]string `json:"metadata,omitempty"`
	SharedUserList []string          `json:"sharedUserList,omitempty"`
	Target         *string           `json:"target,omitempty"`

	// Value: Value details of the workspace connection.
	Value *string `json:"value,omitempty"`

	// ValueFormat: format for the workspace connection value
	ValueFormat *UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat `json:"valueFormat,omitempty"`
}

// +kubebuilder:validation:Enum={"AAD"}
type AADAuthTypeWorkspaceConnectionProperties_AuthType string

const AADAuthTypeWorkspaceConnectionProperties_AuthType_AAD = AADAuthTypeWorkspaceConnectionProperties_AuthType("AAD")

// Mapping from string to AADAuthTypeWorkspaceConnectionProperties_AuthType
var aADAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]AADAuthTypeWorkspaceConnectionProperties_AuthType{
	"aad": AADAuthTypeWorkspaceConnectionProperties_AuthType_AAD,
}

// +kubebuilder:validation:Enum={"JSON"}
type AADAuthTypeWorkspaceConnectionProperties_ValueFormat string

const AADAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = AADAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to AADAuthTypeWorkspaceConnectionProperties_ValueFormat
var aADAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]AADAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": AADAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"AccessKey"}
type AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType string

const AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType_AccessKey = AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType("AccessKey")

// Mapping from string to AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType
var accessKeyAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType{
	"accesskey": AccessKeyAuthTypeWorkspaceConnectionProperties_AuthType_AccessKey,
}

// +kubebuilder:validation:Enum={"JSON"}
type AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat string

const AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat
var accessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": AccessKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"AccountKey"}
type AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType string

const AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType_AccountKey = AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType("AccountKey")

// Mapping from string to AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType
var accountKeyAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType{
	"accountkey": AccountKeyAuthTypeWorkspaceConnectionProperties_AuthType_AccountKey,
}

// +kubebuilder:validation:Enum={"JSON"}
type AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat string

const AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat
var accountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": AccountKeyAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"ApiKey"}
type ApiKeyAuthWorkspaceConnectionProperties_AuthType string

const ApiKeyAuthWorkspaceConnectionProperties_AuthType_ApiKey = ApiKeyAuthWorkspaceConnectionProperties_AuthType("ApiKey")

// Mapping from string to ApiKeyAuthWorkspaceConnectionProperties_AuthType
var apiKeyAuthWorkspaceConnectionProperties_AuthType_Values = map[string]ApiKeyAuthWorkspaceConnectionProperties_AuthType{
	"apikey": ApiKeyAuthWorkspaceConnectionProperties_AuthType_ApiKey,
}

// +kubebuilder:validation:Enum={"JSON"}
type ApiKeyAuthWorkspaceConnectionProperties_ValueFormat string

const ApiKeyAuthWorkspaceConnectionProperties_ValueFormat_JSON = ApiKeyAuthWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to ApiKeyAuthWorkspaceConnectionProperties_ValueFormat
var apiKeyAuthWorkspaceConnectionProperties_ValueFormat_Values = map[string]ApiKeyAuthWorkspaceConnectionProperties_ValueFormat{
	"json": ApiKeyAuthWorkspaceConnectionProperties_ValueFormat_JSON,
}

// Category of the connection
// +kubebuilder:validation:Enum={"ADLSGen2","AIServices","AmazonMws","AmazonRdsForOracle","AmazonRdsForSqlServer","AmazonRedshift","AmazonS3Compatible","ApiKey","AzureBlob","AzureDataExplorer","AzureDatabricksDeltaLake","AzureMariaDb","AzureMySqlDb","AzureOneLake","AzureOpenAI","AzurePostgresDb","AzureSqlDb","AzureSqlMi","AzureSynapseAnalytics","AzureTableStorage","BingLLMSearch","Cassandra","CognitiveSearch","CognitiveService","Concur","ContainerRegistry","CosmosDb","CosmosDbMongoDbApi","Couchbase","CustomKeys","Db2","Drill","Dynamics","DynamicsAx","DynamicsCrm","Eloqua","FileServer","FtpServer","GenericContainerRegistry","GenericHttp","GenericRest","Git","GoogleAdWords","GoogleBigQuery","GoogleCloudStorage","Greenplum","Hbase","Hdfs","Hive","Hubspot","Impala","Informix","Jira","Magento","MariaDb","Marketo","MicrosoftAccess","MongoDbAtlas","MongoDbV2","MySql","Netezza","ODataRest","Odbc","Office365","OpenAI","Oracle","OracleCloudStorage","OracleServiceCloud","PayPal","Phoenix","PostgreSql","Presto","PythonFeed","QuickBooks","Redis","Responsys","S3","Salesforce","SalesforceMarketingCloud","SalesforceServiceCloud","SapBw","SapCloudForCustomer","SapEcc","SapHana","SapOpenHub","SapTable","Serp","Serverless","ServiceNow","Sftp","SharePointOnlineList","Shopify","Snowflake","Spark","SqlServer","Square","Sybase","Teradata","Vertica","WebTable","Xero","Zoho"}
type ConnectionCategory string

const (
	ConnectionCategory_ADLSGen2                 = ConnectionCategory("ADLSGen2")
	ConnectionCategory_AIServices               = ConnectionCategory("AIServices")
	ConnectionCategory_AmazonMws                = ConnectionCategory("AmazonMws")
	ConnectionCategory_AmazonRdsForOracle       = ConnectionCategory("AmazonRdsForOracle")
	ConnectionCategory_AmazonRdsForSqlServer    = ConnectionCategory("AmazonRdsForSqlServer")
	ConnectionCategory_AmazonRedshift           = ConnectionCategory("AmazonRedshift")
	ConnectionCategory_AmazonS3Compatible       = ConnectionCategory("AmazonS3Compatible")
	ConnectionCategory_ApiKey                   = ConnectionCategory("ApiKey")
	ConnectionCategory_AzureBlob                = ConnectionCategory("AzureBlob")
	ConnectionCategory_AzureDataExplorer        = ConnectionCategory("AzureDataExplorer")
	ConnectionCategory_AzureDatabricksDeltaLake = ConnectionCategory("AzureDatabricksDeltaLake")
	ConnectionCategory_AzureMariaDb             = ConnectionCategory("AzureMariaDb")
	ConnectionCategory_AzureMySqlDb             = ConnectionCategory("AzureMySqlDb")
	ConnectionCategory_AzureOneLake             = ConnectionCategory("AzureOneLake")
	ConnectionCategory_AzureOpenAI              = ConnectionCategory("AzureOpenAI")
	ConnectionCategory_AzurePostgresDb          = ConnectionCategory("AzurePostgresDb")
	ConnectionCategory_AzureSqlDb               = ConnectionCategory("AzureSqlDb")
	ConnectionCategory_AzureSqlMi               = ConnectionCategory("AzureSqlMi")
	ConnectionCategory_AzureSynapseAnalytics    = ConnectionCategory("AzureSynapseAnalytics")
	ConnectionCategory_AzureTableStorage        = ConnectionCategory("AzureTableStorage")
	ConnectionCategory_BingLLMSearch            = ConnectionCategory("BingLLMSearch")
	ConnectionCategory_Cassandra                = ConnectionCategory("Cassandra")
	ConnectionCategory_CognitiveSearch          = ConnectionCategory("CognitiveSearch")
	ConnectionCategory_CognitiveService         = ConnectionCategory("CognitiveService")
	ConnectionCategory_Concur                   = ConnectionCategory("Concur")
	ConnectionCategory_ContainerRegistry        = ConnectionCategory("ContainerRegistry")
	ConnectionCategory_CosmosDb                 = ConnectionCategory("CosmosDb")
	ConnectionCategory_CosmosDbMongoDbApi       = ConnectionCategory("CosmosDbMongoDbApi")
	ConnectionCategory_Couchbase                = ConnectionCategory("Couchbase")
	ConnectionCategory_CustomKeys               = ConnectionCategory("CustomKeys")
	ConnectionCategory_Db2                      = ConnectionCategory("Db2")
	ConnectionCategory_Drill                    = ConnectionCategory("Drill")
	ConnectionCategory_Dynamics                 = ConnectionCategory("Dynamics")
	ConnectionCategory_DynamicsAx               = ConnectionCategory("DynamicsAx")
	ConnectionCategory_DynamicsCrm              = ConnectionCategory("DynamicsCrm")
	ConnectionCategory_Eloqua                   = ConnectionCategory("Eloqua")
	ConnectionCategory_FileServer               = ConnectionCategory("FileServer")
	ConnectionCategory_FtpServer                = ConnectionCategory("FtpServer")
	ConnectionCategory_GenericContainerRegistry = ConnectionCategory("GenericContainerRegistry")
	ConnectionCategory_GenericHttp              = ConnectionCategory("GenericHttp")
	ConnectionCategory_GenericRest              = ConnectionCategory("GenericRest")
	ConnectionCategory_Git                      = ConnectionCategory("Git")
	ConnectionCategory_GoogleAdWords            = ConnectionCategory("GoogleAdWords")
	ConnectionCategory_GoogleBigQuery           = ConnectionCategory("GoogleBigQuery")
	ConnectionCategory_GoogleCloudStorage       = ConnectionCategory("GoogleCloudStorage")
	ConnectionCategory_Greenplum                = ConnectionCategory("Greenplum")
	ConnectionCategory_Hbase                    = ConnectionCategory("Hbase")
	ConnectionCategory_Hdfs                     = ConnectionCategory("Hdfs")
	ConnectionCategory_Hive                     = ConnectionCategory("Hive")
	ConnectionCategory_Hubspot                  = ConnectionCategory("Hubspot")
	ConnectionCategory_Impala                   = ConnectionCategory("Impala")
	ConnectionCategory_Informix                 = ConnectionCategory("Informix")
	ConnectionCategory_Jira                     = ConnectionCategory("Jira")
	ConnectionCategory_Magento                  = ConnectionCategory("Magento")
	ConnectionCategory_MariaDb                  = ConnectionCategory("MariaDb")
	ConnectionCategory_Marketo                  = ConnectionCategory("Marketo")
	ConnectionCategory_MicrosoftAccess          = ConnectionCategory("MicrosoftAccess")
	ConnectionCategory_MongoDbAtlas             = ConnectionCategory("MongoDbAtlas")
	ConnectionCategory_MongoDbV2                = ConnectionCategory("MongoDbV2")
	ConnectionCategory_MySql                    = ConnectionCategory("MySql")
	ConnectionCategory_Netezza                  = ConnectionCategory("Netezza")
	ConnectionCategory_ODataRest                = ConnectionCategory("ODataRest")
	ConnectionCategory_Odbc                     = ConnectionCategory("Odbc")
	ConnectionCategory_Office365                = ConnectionCategory("Office365")
	ConnectionCategory_OpenAI                   = ConnectionCategory("OpenAI")
	ConnectionCategory_Oracle                   = ConnectionCategory("Oracle")
	ConnectionCategory_OracleCloudStorage       = ConnectionCategory("OracleCloudStorage")
	ConnectionCategory_OracleServiceCloud       = ConnectionCategory("OracleServiceCloud")
	ConnectionCategory_PayPal                   = ConnectionCategory("PayPal")
	ConnectionCategory_Phoenix                  = ConnectionCategory("Phoenix")
	ConnectionCategory_PostgreSql               = ConnectionCategory("PostgreSql")
	ConnectionCategory_Presto                   = ConnectionCategory("Presto")
	ConnectionCategory_PythonFeed               = ConnectionCategory("PythonFeed")
	ConnectionCategory_QuickBooks               = ConnectionCategory("QuickBooks")
	ConnectionCategory_Redis                    = ConnectionCategory("Redis")
	ConnectionCategory_Responsys                = ConnectionCategory("Responsys")
	ConnectionCategory_S3                       = ConnectionCategory("S3")
	ConnectionCategory_Salesforce               = ConnectionCategory("Salesforce")
	ConnectionCategory_SalesforceMarketingCloud = ConnectionCategory("SalesforceMarketingCloud")
	ConnectionCategory_SalesforceServiceCloud   = ConnectionCategory("SalesforceServiceCloud")
	ConnectionCategory_SapBw                    = ConnectionCategory("SapBw")
	ConnectionCategory_SapCloudForCustomer      = ConnectionCategory("SapCloudForCustomer")
	ConnectionCategory_SapEcc                   = ConnectionCategory("SapEcc")
	ConnectionCategory_SapHana                  = ConnectionCategory("SapHana")
	ConnectionCategory_SapOpenHub               = ConnectionCategory("SapOpenHub")
	ConnectionCategory_SapTable                 = ConnectionCategory("SapTable")
	ConnectionCategory_Serp                     = ConnectionCategory("Serp")
	ConnectionCategory_Serverless               = ConnectionCategory("Serverless")
	ConnectionCategory_ServiceNow               = ConnectionCategory("ServiceNow")
	ConnectionCategory_Sftp                     = ConnectionCategory("Sftp")
	ConnectionCategory_SharePointOnlineList     = ConnectionCategory("SharePointOnlineList")
	ConnectionCategory_Shopify                  = ConnectionCategory("Shopify")
	ConnectionCategory_Snowflake                = ConnectionCategory("Snowflake")
	ConnectionCategory_Spark                    = ConnectionCategory("Spark")
	ConnectionCategory_SqlServer                = ConnectionCategory("SqlServer")
	ConnectionCategory_Square                   = ConnectionCategory("Square")
	ConnectionCategory_Sybase                   = ConnectionCategory("Sybase")
	ConnectionCategory_Teradata                 = ConnectionCategory("Teradata")
	ConnectionCategory_Vertica                  = ConnectionCategory("Vertica")
	ConnectionCategory_WebTable                 = ConnectionCategory("WebTable")
	ConnectionCategory_Xero                     = ConnectionCategory("Xero")
	ConnectionCategory_Zoho                     = ConnectionCategory("Zoho")
)

// Mapping from string to ConnectionCategory
var connectionCategory_Values = map[string]ConnectionCategory{
	"adlsgen2":                 ConnectionCategory_ADLSGen2,
	"aiservices":               ConnectionCategory_AIServices,
	"amazonmws":                ConnectionCategory_AmazonMws,
	"amazonrdsfororacle":       ConnectionCategory_AmazonRdsForOracle,
	"amazonrdsforsqlserver":    ConnectionCategory_AmazonRdsForSqlServer,
	"amazonredshift":           ConnectionCategory_AmazonRedshift,
	"amazons3compatible":       ConnectionCategory_AmazonS3Compatible,
	"apikey":                   ConnectionCategory_ApiKey,
	"azureblob":                ConnectionCategory_AzureBlob,
	"azuredataexplorer":        ConnectionCategory_AzureDataExplorer,
	"azuredatabricksdeltalake": ConnectionCategory_AzureDatabricksDeltaLake,
	"azuremariadb":             ConnectionCategory_AzureMariaDb,
	"azuremysqldb":             ConnectionCategory_AzureMySqlDb,
	"azureonelake":             ConnectionCategory_AzureOneLake,
	"azureopenai":              ConnectionCategory_AzureOpenAI,
	"azurepostgresdb":          ConnectionCategory_AzurePostgresDb,
	"azuresqldb":               ConnectionCategory_AzureSqlDb,
	"azuresqlmi":               ConnectionCategory_AzureSqlMi,
	"azuresynapseanalytics":    ConnectionCategory_AzureSynapseAnalytics,
	"azuretablestorage":        ConnectionCategory_AzureTableStorage,
	"bingllmsearch":            ConnectionCategory_BingLLMSearch,
	"cassandra":                ConnectionCategory_Cassandra,
	"cognitivesearch":          ConnectionCategory_CognitiveSearch,
	"cognitiveservice":         ConnectionCategory_CognitiveService,
	"concur":                   ConnectionCategory_Concur,
	"containerregistry":        ConnectionCategory_ContainerRegistry,
	"cosmosdb":                 ConnectionCategory_CosmosDb,
	"cosmosdbmongodbapi":       ConnectionCategory_CosmosDbMongoDbApi,
	"couchbase":                ConnectionCategory_Couchbase,
	"customkeys":               ConnectionCategory_CustomKeys,
	"db2":                      ConnectionCategory_Db2,
	"drill":                    ConnectionCategory_Drill,
	"dynamics":                 ConnectionCategory_Dynamics,
	"dynamicsax":               ConnectionCategory_DynamicsAx,
	"dynamicscrm":              ConnectionCategory_DynamicsCrm,
	"eloqua":                   ConnectionCategory_Eloqua,
	"fileserver":               ConnectionCategory_FileServer,
	"ftpserver":                ConnectionCategory_FtpServer,
	"genericcontainerregistry": ConnectionCategory_GenericContainerRegistry,
	"generichttp":              ConnectionCategory_GenericHttp,
	"genericrest":              ConnectionCategory_GenericRest,
	"git":                      ConnectionCategory_Git,
	"googleadwords":            ConnectionCategory_GoogleAdWords,
	"googlebigquery":           ConnectionCategory_GoogleBigQuery,
	"googlecloudstorage":       ConnectionCategory_GoogleCloudStorage,
	"greenplum":                ConnectionCategory_Greenplum,
	"hbase":                    ConnectionCategory_Hbase,
	"hdfs":                     ConnectionCategory_Hdfs,
	"hive":                     ConnectionCategory_Hive,
	"hubspot":                  ConnectionCategory_Hubspot,
	"impala":                   ConnectionCategory_Impala,
	"informix":                 ConnectionCategory_Informix,
	"jira":                     ConnectionCategory_Jira,
	"magento":                  ConnectionCategory_Magento,
	"mariadb":                  ConnectionCategory_MariaDb,
	"marketo":                  ConnectionCategory_Marketo,
	"microsoftaccess":          ConnectionCategory_MicrosoftAccess,
	"mongodbatlas":             ConnectionCategory_MongoDbAtlas,
	"mongodbv2":                ConnectionCategory_MongoDbV2,
	"mysql":                    ConnectionCategory_MySql,
	"netezza":                  ConnectionCategory_Netezza,
	"odatarest":                ConnectionCategory_ODataRest,
	"odbc":                     ConnectionCategory_Odbc,
	"office365":                ConnectionCategory_Office365,
	"openai":                   ConnectionCategory_OpenAI,
	"oracle":                   ConnectionCategory_Oracle,
	"oraclecloudstorage":       ConnectionCategory_OracleCloudStorage,
	"oracleservicecloud":       ConnectionCategory_OracleServiceCloud,
	"paypal":                   ConnectionCategory_PayPal,
	"phoenix":                  ConnectionCategory_Phoenix,
	"postgresql":               ConnectionCategory_PostgreSql,
	"presto":                   ConnectionCategory_Presto,
	"pythonfeed":               ConnectionCategory_PythonFeed,
	"quickbooks":               ConnectionCategory_QuickBooks,
	"redis":                    ConnectionCategory_Redis,
	"responsys":                ConnectionCategory_Responsys,
	"s3":                       ConnectionCategory_S3,
	"salesforce":               ConnectionCategory_Salesforce,
	"salesforcemarketingcloud": ConnectionCategory_SalesforceMarketingCloud,
	"salesforceservicecloud":   ConnectionCategory_SalesforceServiceCloud,
	"sapbw":                    ConnectionCategory_SapBw,
	"sapcloudforcustomer":      ConnectionCategory_SapCloudForCustomer,
	"sapecc":                   ConnectionCategory_SapEcc,
	"saphana":                  ConnectionCategory_SapHana,
	"sapopenhub":               ConnectionCategory_SapOpenHub,
	"saptable":                 ConnectionCategory_SapTable,
	"serp":                     ConnectionCategory_Serp,
	"serverless":               ConnectionCategory_Serverless,
	"servicenow":               ConnectionCategory_ServiceNow,
	"sftp":                     ConnectionCategory_Sftp,
	"sharepointonlinelist":     ConnectionCategory_SharePointOnlineList,
	"shopify":                  ConnectionCategory_Shopify,
	"snowflake":                ConnectionCategory_Snowflake,
	"spark":                    ConnectionCategory_Spark,
	"sqlserver":                ConnectionCategory_SqlServer,
	"square":                   ConnectionCategory_Square,
	"sybase":                   ConnectionCategory_Sybase,
	"teradata":                 ConnectionCategory_Teradata,
	"vertica":                  ConnectionCategory_Vertica,
	"webtable":                 ConnectionCategory_WebTable,
	"xero":                     ConnectionCategory_Xero,
	"zoho":                     ConnectionCategory_Zoho,
}

// Custom Keys credential object
type CustomKeys struct {
	Keys map[string]string `json:"keys,omitempty"`
}

// +kubebuilder:validation:Enum={"CustomKeys"}
type CustomKeysWorkspaceConnectionProperties_AuthType string

const CustomKeysWorkspaceConnectionProperties_AuthType_CustomKeys = CustomKeysWorkspaceConnectionProperties_AuthType("CustomKeys")

// Mapping from string to CustomKeysWorkspaceConnectionProperties_AuthType
var customKeysWorkspaceConnectionProperties_AuthType_Values = map[string]CustomKeysWorkspaceConnectionProperties_AuthType{
	"customkeys": CustomKeysWorkspaceConnectionProperties_AuthType_CustomKeys,
}

// +kubebuilder:validation:Enum={"JSON"}
type CustomKeysWorkspaceConnectionProperties_ValueFormat string

const CustomKeysWorkspaceConnectionProperties_ValueFormat_JSON = CustomKeysWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to CustomKeysWorkspaceConnectionProperties_ValueFormat
var customKeysWorkspaceConnectionProperties_ValueFormat_Values = map[string]CustomKeysWorkspaceConnectionProperties_ValueFormat{
	"json": CustomKeysWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"ManagedIdentity"}
type ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType string

const ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType_ManagedIdentity = ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType("ManagedIdentity")

// Mapping from string to ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType
var managedIdentityAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType{
	"managedidentity": ManagedIdentityAuthTypeWorkspaceConnectionProperties_AuthType_ManagedIdentity,
}

// +kubebuilder:validation:Enum={"JSON"}
type ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat string

const ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat
var managedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": ManagedIdentityAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"None"}
type NoneAuthTypeWorkspaceConnectionProperties_AuthType string

const NoneAuthTypeWorkspaceConnectionProperties_AuthType_None = NoneAuthTypeWorkspaceConnectionProperties_AuthType("None")

// Mapping from string to NoneAuthTypeWorkspaceConnectionProperties_AuthType
var noneAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]NoneAuthTypeWorkspaceConnectionProperties_AuthType{
	"none": NoneAuthTypeWorkspaceConnectionProperties_AuthType_None,
}

// +kubebuilder:validation:Enum={"JSON"}
type NoneAuthTypeWorkspaceConnectionProperties_ValueFormat string

const NoneAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = NoneAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to NoneAuthTypeWorkspaceConnectionProperties_ValueFormat
var noneAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]NoneAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": NoneAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

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

const OAuth2AuthTypeWorkspaceConnectionProperties_AuthType_OAuth2 = OAuth2AuthTypeWorkspaceConnectionProperties_AuthType("OAuth2")

// Mapping from string to OAuth2AuthTypeWorkspaceConnectionProperties_AuthType
var oAuth2AuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]OAuth2AuthTypeWorkspaceConnectionProperties_AuthType{
	"oauth2": OAuth2AuthTypeWorkspaceConnectionProperties_AuthType_OAuth2,
}

// +kubebuilder:validation:Enum={"JSON"}
type OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat string

const OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat
var oAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": OAuth2AuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"PAT"}
type PATAuthTypeWorkspaceConnectionProperties_AuthType string

const PATAuthTypeWorkspaceConnectionProperties_AuthType_PAT = PATAuthTypeWorkspaceConnectionProperties_AuthType("PAT")

// Mapping from string to PATAuthTypeWorkspaceConnectionProperties_AuthType
var pATAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]PATAuthTypeWorkspaceConnectionProperties_AuthType{
	"pat": PATAuthTypeWorkspaceConnectionProperties_AuthType_PAT,
}

// +kubebuilder:validation:Enum={"JSON"}
type PATAuthTypeWorkspaceConnectionProperties_ValueFormat string

const PATAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = PATAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to PATAuthTypeWorkspaceConnectionProperties_ValueFormat
var pATAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]PATAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": PATAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"SAS"}
type SASAuthTypeWorkspaceConnectionProperties_AuthType string

const SASAuthTypeWorkspaceConnectionProperties_AuthType_SAS = SASAuthTypeWorkspaceConnectionProperties_AuthType("SAS")

// Mapping from string to SASAuthTypeWorkspaceConnectionProperties_AuthType
var sASAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]SASAuthTypeWorkspaceConnectionProperties_AuthType{
	"sas": SASAuthTypeWorkspaceConnectionProperties_AuthType_SAS,
}

// +kubebuilder:validation:Enum={"JSON"}
type SASAuthTypeWorkspaceConnectionProperties_ValueFormat string

const SASAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = SASAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to SASAuthTypeWorkspaceConnectionProperties_ValueFormat
var sASAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]SASAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": SASAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"ServicePrincipal"}
type ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType string

const ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType_ServicePrincipal = ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType("ServicePrincipal")

// Mapping from string to ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType
var servicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType{
	"serviceprincipal": ServicePrincipalAuthTypeWorkspaceConnectionProperties_AuthType_ServicePrincipal,
}

// +kubebuilder:validation:Enum={"JSON"}
type ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat string

const ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat
var servicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": ServicePrincipalAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

// +kubebuilder:validation:Enum={"UsernamePassword"}
type UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType string

const UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType_UsernamePassword = UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType("UsernamePassword")

// Mapping from string to UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType
var usernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType_Values = map[string]UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType{
	"usernamepassword": UsernamePasswordAuthTypeWorkspaceConnectionProperties_AuthType_UsernamePassword,
}

// +kubebuilder:validation:Enum={"JSON"}
type UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat string

const UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON = UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat("JSON")

// Mapping from string to UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat
var usernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat_Values = map[string]UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat{
	"json": UsernamePasswordAuthTypeWorkspaceConnectionProperties_ValueFormat_JSON,
}

type WorkspaceConnectionAccessKey struct {
	AccessKeyId     *string `json:"accessKeyId,omitempty"`
	SecretAccessKey *string `json:"secretAccessKey,omitempty"`
}

type WorkspaceConnectionAccountKey struct {
	Key *string `json:"key,omitempty"`
}

// Api key object for workspace connection credential.
type WorkspaceConnectionApiKey struct {
	Key *string `json:"key,omitempty"`
}

type WorkspaceConnectionManagedIdentity struct {
	ClientId   *string `json:"clientId,omitempty" optionalConfigMapPair:"ClientId"`
	ResourceId *string `json:"resourceId,omitempty"`
}

// ClientId and ClientSecret are required. Other properties are optional
// depending on each OAuth2 provider's
// implementation.
type WorkspaceConnectionOAuth2 struct {
	// AuthUrl: Required by Concur connection category
	AuthUrl *string `json:"authUrl,omitempty"`

	// ClientId: Client id in the format of UUID
	ClientId     *string `json:"clientId,omitempty" optionalConfigMapPair:"ClientId"`
	ClientSecret *string `json:"clientSecret,omitempty"`

	// DeveloperToken: Required by GoogleAdWords connection category
	DeveloperToken *string `json:"developerToken,omitempty"`
	Password       *string `json:"password,omitempty"`

	// RefreshToken: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho
	// where user needs to get RefreshToken offline
	RefreshToken *string `json:"refreshToken,omitempty"`

	// TenantId: Required by QuickBooks and Xero connection categories
	TenantId *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"`

	// Username: Concur, ServiceNow auth server AccessToken grant type is 'Password'
	// which requires UsernamePassword
	Username *string `json:"username,omitempty"`
}

type WorkspaceConnectionPersonalAccessToken struct {
	Pat *string `json:"pat,omitempty"`
}

type WorkspaceConnectionServicePrincipal struct {
	ClientId     *string `json:"clientId,omitempty" optionalConfigMapPair:"ClientId"`
	ClientSecret *string `json:"clientSecret,omitempty"`
	TenantId     *string `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"`
}

type WorkspaceConnectionSharedAccessSignature struct {
	Sas *string `json:"sas,omitempty"`
}

type WorkspaceConnectionUsernamePassword struct {
	Password *string `json:"password,omitempty"`

	// SecurityToken: Optional, required by connections like SalesForce for extra security in addition to UsernamePassword
	SecurityToken *string `json:"securityToken,omitempty"`
	Username      *string `json:"username,omitempty"`
}
