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

import (
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets"
	"github.com/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

// +kubebuilder:rbac:groups=machinelearningservices.azure.com,resources=workspacesconnections,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=machinelearningservices.azure.com,resources={workspacesconnections/status,workspacesconnections/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,machinelearningservices}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity"
// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message"
// Storage version of v1api20240401.WorkspacesConnection
// Generator information:
// - Generated from: /machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/workspaceRP.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}
type WorkspacesConnection struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              WorkspacesConnection_Spec   `json:"spec,omitempty"`
	Status            WorkspacesConnection_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &WorkspacesConnection{}

// GetConditions returns the conditions of the resource
func (connection *WorkspacesConnection) GetConditions() conditions.Conditions {
	return connection.Status.Conditions
}

// SetConditions sets the conditions on the resource status
func (connection *WorkspacesConnection) SetConditions(conditions conditions.Conditions) {
	connection.Status.Conditions = conditions
}

var _ configmaps.Exporter = &WorkspacesConnection{}

// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property
func (connection *WorkspacesConnection) ConfigMapDestinationExpressions() []*core.DestinationExpression {
	if connection.Spec.OperatorSpec == nil {
		return nil
	}
	return connection.Spec.OperatorSpec.ConfigMapExpressions
}

var _ secrets.Exporter = &WorkspacesConnection{}

// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property
func (connection *WorkspacesConnection) SecretDestinationExpressions() []*core.DestinationExpression {
	if connection.Spec.OperatorSpec == nil {
		return nil
	}
	return connection.Spec.OperatorSpec.SecretExpressions
}

var _ genruntime.KubernetesResource = &WorkspacesConnection{}

// AzureName returns the Azure name of the resource
func (connection *WorkspacesConnection) AzureName() string {
	return connection.Spec.AzureName
}

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

// GetResourceScope returns the scope of the resource
func (connection *WorkspacesConnection) GetResourceScope() genruntime.ResourceScope {
	return genruntime.ResourceScopeResourceGroup
}

// GetSpec returns the specification of this resource
func (connection *WorkspacesConnection) GetSpec() genruntime.ConvertibleSpec {
	return &connection.Spec
}

// GetStatus returns the status of this resource
func (connection *WorkspacesConnection) GetStatus() genruntime.ConvertibleStatus {
	return &connection.Status
}

// GetSupportedOperations returns the operations supported by the resource
func (connection *WorkspacesConnection) GetSupportedOperations() []genruntime.ResourceOperation {
	return []genruntime.ResourceOperation{
		genruntime.ResourceOperationDelete,
		genruntime.ResourceOperationGet,
		genruntime.ResourceOperationPut,
	}
}

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

// NewEmptyStatus returns a new empty (blank) status
func (connection *WorkspacesConnection) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &WorkspacesConnection_STATUS{}
}

// Owner returns the ResourceReference of the owner
func (connection *WorkspacesConnection) Owner() *genruntime.ResourceReference {
	if connection.Spec.Owner == nil {
		return nil
	}

	group, kind := genruntime.LookupOwnerGroupKind(connection.Spec)
	return connection.Spec.Owner.AsResourceReference(group, kind)
}

// SetStatus sets the status of this resource
func (connection *WorkspacesConnection) SetStatus(status genruntime.ConvertibleStatus) error {
	// If we have exactly the right type of status, assign it
	if st, ok := status.(*WorkspacesConnection_STATUS); ok {
		connection.Status = *st
		return nil
	}

	// Convert status to required version
	var st WorkspacesConnection_STATUS
	err := status.ConvertStatusTo(&st)
	if err != nil {
		return eris.Wrap(err, "failed to convert status")
	}

	connection.Status = st
	return nil
}

// Hub marks that this WorkspacesConnection is the hub type for conversion
func (connection *WorkspacesConnection) Hub() {}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (connection *WorkspacesConnection) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: connection.Spec.OriginalVersion,
		Kind:    "WorkspacesConnection",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20240401.WorkspacesConnection
// Generator information:
// - Generated from: /machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/workspaceRP.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}
type WorkspacesConnectionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []WorkspacesConnection `json:"items"`
}

// Storage version of v1api20240401.WorkspacesConnection_Spec
type WorkspacesConnection_Spec struct {
	// AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it
	// doesn't have to be.
	AzureName       string                            `json:"azureName,omitempty"`
	OperatorSpec    *WorkspacesConnectionOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion string                            `json:"originalVersion,omitempty"`

	// +kubebuilder:validation:Required
	// Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also
	// controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a
	// reference to a machinelearningservices.azure.com/Workspace resource
	Owner       *genruntime.KnownResourceReference `group:"machinelearningservices.azure.com" json:"owner,omitempty" kind:"Workspace"`
	Properties  *WorkspaceConnectionPropertiesV2   `json:"properties,omitempty"`
	PropertyBag genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
}

var _ genruntime.ConvertibleSpec = &WorkspacesConnection_Spec{}

// ConvertSpecFrom populates our WorkspacesConnection_Spec from the provided source
func (connection *WorkspacesConnection_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	if source == connection {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return source.ConvertSpecTo(connection)
}

// ConvertSpecTo populates the provided destination from our WorkspacesConnection_Spec
func (connection *WorkspacesConnection_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	if destination == connection {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return destination.ConvertSpecFrom(connection)
}

// Storage version of v1api20240401.WorkspacesConnection_STATUS
type WorkspacesConnection_STATUS struct {
	Conditions  []conditions.Condition                  `json:"conditions,omitempty"`
	Id          *string                                 `json:"id,omitempty"`
	Name        *string                                 `json:"name,omitempty"`
	Properties  *WorkspaceConnectionPropertiesV2_STATUS `json:"properties,omitempty"`
	PropertyBag genruntime.PropertyBag                  `json:"$propertyBag,omitempty"`
	SystemData  *SystemData_STATUS                      `json:"systemData,omitempty"`
	Type        *string                                 `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &WorkspacesConnection_STATUS{}

// ConvertStatusFrom populates our WorkspacesConnection_STATUS from the provided source
func (connection *WorkspacesConnection_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	if source == connection {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return source.ConvertStatusTo(connection)
}

// ConvertStatusTo populates the provided destination from our WorkspacesConnection_STATUS
func (connection *WorkspacesConnection_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	if destination == connection {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return destination.ConvertStatusFrom(connection)
}

// Storage version of v1api20240401.WorkspaceConnectionPropertiesV2
type WorkspaceConnectionPropertiesV2 struct {
	AAD              *AADAuthTypeWorkspaceConnectionProperties              `json:"aad,omitempty"`
	AccessKey        *AccessKeyAuthTypeWorkspaceConnectionProperties        `json:"accessKey,omitempty"`
	AccountKey       *AccountKeyAuthTypeWorkspaceConnectionProperties       `json:"accountKey,omitempty"`
	ApiKey           *ApiKeyAuthWorkspaceConnectionProperties               `json:"apiKey,omitempty"`
	CustomKeys       *CustomKeysWorkspaceConnectionProperties               `json:"customKeys,omitempty"`
	ManagedIdentity  *ManagedIdentityAuthTypeWorkspaceConnectionProperties  `json:"managedIdentity,omitempty"`
	None             *NoneAuthTypeWorkspaceConnectionProperties             `json:"none,omitempty"`
	OAuth2           *OAuth2AuthTypeWorkspaceConnectionProperties           `json:"oAuth2,omitempty"`
	PAT              *PATAuthTypeWorkspaceConnectionProperties              `json:"pat,omitempty"`
	PropertyBag      genruntime.PropertyBag                                 `json:"$propertyBag,omitempty"`
	SAS              *SASAuthTypeWorkspaceConnectionProperties              `json:"sas,omitempty"`
	ServicePrincipal *ServicePrincipalAuthTypeWorkspaceConnectionProperties `json:"servicePrincipal,omitempty"`
	UsernamePassword *UsernamePasswordAuthTypeWorkspaceConnectionProperties `json:"usernamePassword,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionPropertiesV2_STATUS
type WorkspaceConnectionPropertiesV2_STATUS struct {
	AAD              *AADAuthTypeWorkspaceConnectionProperties_STATUS              `json:"aad,omitempty"`
	AccessKey        *AccessKeyAuthTypeWorkspaceConnectionProperties_STATUS        `json:"accessKey,omitempty"`
	AccountKey       *AccountKeyAuthTypeWorkspaceConnectionProperties_STATUS       `json:"accountKey,omitempty"`
	ApiKey           *ApiKeyAuthWorkspaceConnectionProperties_STATUS               `json:"apiKey,omitempty"`
	CustomKeys       *CustomKeysWorkspaceConnectionProperties_STATUS               `json:"customKeys,omitempty"`
	ManagedIdentity  *ManagedIdentityAuthTypeWorkspaceConnectionProperties_STATUS  `json:"managedIdentity,omitempty"`
	None             *NoneAuthTypeWorkspaceConnectionProperties_STATUS             `json:"none,omitempty"`
	OAuth2           *OAuth2AuthTypeWorkspaceConnectionProperties_STATUS           `json:"oAuth2,omitempty"`
	PAT              *PATAuthTypeWorkspaceConnectionProperties_STATUS              `json:"pat,omitempty"`
	PropertyBag      genruntime.PropertyBag                                        `json:"$propertyBag,omitempty"`
	SAS              *SASAuthTypeWorkspaceConnectionProperties_STATUS              `json:"sas,omitempty"`
	ServicePrincipal *ServicePrincipalAuthTypeWorkspaceConnectionProperties_STATUS `json:"servicePrincipal,omitempty"`
	UsernamePassword *UsernamePasswordAuthTypeWorkspaceConnectionProperties_STATUS `json:"usernamePassword,omitempty"`
}

// Storage version of v1api20240401.WorkspacesConnectionOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type WorkspacesConnectionOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`
	PropertyBag          genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression `json:"secretExpressions,omitempty"`
}

// Storage version of v1api20240401.AADAuthTypeWorkspaceConnectionProperties
type AADAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                `json:"authType,omitempty"`
	Category       *string                `json:"category,omitempty"`
	ExpiryTime     *string                `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                  `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string      `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SharedUserList []string               `json:"sharedUserList,omitempty"`
	Target         *string                `json:"target,omitempty"`
	Value          *string                `json:"value,omitempty"`
	ValueFormat    *string                `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.AADAuthTypeWorkspaceConnectionProperties_STATUS
type AADAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                `json:"authType,omitempty"`
	Category                *string                `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                `json:"createdByWorkspaceArmId,omitempty"`
	ExpiryTime              *string                `json:"expiryTime,omitempty"`
	Group                   *string                `json:"group,omitempty"`
	IsSharedToAll           *bool                  `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string      `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SharedUserList          []string               `json:"sharedUserList,omitempty"`
	Target                  *string                `json:"target,omitempty"`
	Value                   *string                `json:"value,omitempty"`
	ValueFormat             *string                `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.AccessKeyAuthTypeWorkspaceConnectionProperties
type AccessKeyAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                       `json:"authType,omitempty"`
	Category       *string                       `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionAccessKey `json:"credentials,omitempty"`
	ExpiryTime     *string                       `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                         `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string             `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SharedUserList []string                      `json:"sharedUserList,omitempty"`
	Target         *string                       `json:"target,omitempty"`
	Value          *string                       `json:"value,omitempty"`
	ValueFormat    *string                       `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.AccessKeyAuthTypeWorkspaceConnectionProperties_STATUS
type AccessKeyAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                              `json:"authType,omitempty"`
	Category                *string                              `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                              `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionAccessKey_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                              `json:"expiryTime,omitempty"`
	Group                   *string                              `json:"group,omitempty"`
	IsSharedToAll           *bool                                `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                    `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
	SharedUserList          []string                             `json:"sharedUserList,omitempty"`
	Target                  *string                              `json:"target,omitempty"`
	Value                   *string                              `json:"value,omitempty"`
	ValueFormat             *string                              `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.AccountKeyAuthTypeWorkspaceConnectionProperties
type AccountKeyAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                        `json:"authType,omitempty"`
	Category       *string                        `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionAccountKey `json:"credentials,omitempty"`
	ExpiryTime     *string                        `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                          `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string              `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	SharedUserList []string                       `json:"sharedUserList,omitempty"`
	Target         *string                        `json:"target,omitempty"`
	Value          *string                        `json:"value,omitempty"`
	ValueFormat    *string                        `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.AccountKeyAuthTypeWorkspaceConnectionProperties_STATUS
type AccountKeyAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                               `json:"authType,omitempty"`
	Category                *string                               `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                               `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionAccountKey_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                               `json:"expiryTime,omitempty"`
	Group                   *string                               `json:"group,omitempty"`
	IsSharedToAll           *bool                                 `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                     `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag                `json:"$propertyBag,omitempty"`
	SharedUserList          []string                              `json:"sharedUserList,omitempty"`
	Target                  *string                               `json:"target,omitempty"`
	Value                   *string                               `json:"value,omitempty"`
	ValueFormat             *string                               `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.ApiKeyAuthWorkspaceConnectionProperties
type ApiKeyAuthWorkspaceConnectionProperties struct {
	AuthType       *string                    `json:"authType,omitempty"`
	Category       *string                    `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionApiKey `json:"credentials,omitempty"`
	ExpiryTime     *string                    `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                      `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string          `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	SharedUserList []string                   `json:"sharedUserList,omitempty"`
	Target         *string                    `json:"target,omitempty"`
	Value          *string                    `json:"value,omitempty"`
	ValueFormat    *string                    `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.ApiKeyAuthWorkspaceConnectionProperties_STATUS
type ApiKeyAuthWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                           `json:"authType,omitempty"`
	Category                *string                           `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                           `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionApiKey_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                           `json:"expiryTime,omitempty"`
	Group                   *string                           `json:"group,omitempty"`
	IsSharedToAll           *bool                             `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                 `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag            `json:"$propertyBag,omitempty"`
	SharedUserList          []string                          `json:"sharedUserList,omitempty"`
	Target                  *string                           `json:"target,omitempty"`
	Value                   *string                           `json:"value,omitempty"`
	ValueFormat             *string                           `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.CustomKeysWorkspaceConnectionProperties
type CustomKeysWorkspaceConnectionProperties struct {
	AuthType       *string                `json:"authType,omitempty"`
	Category       *string                `json:"category,omitempty"`
	Credentials    *CustomKeys            `json:"credentials,omitempty"`
	ExpiryTime     *string                `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                  `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string      `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SharedUserList []string               `json:"sharedUserList,omitempty"`
	Target         *string                `json:"target,omitempty"`
	Value          *string                `json:"value,omitempty"`
	ValueFormat    *string                `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.CustomKeysWorkspaceConnectionProperties_STATUS
type CustomKeysWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                `json:"authType,omitempty"`
	Category                *string                `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *CustomKeys_STATUS     `json:"credentials,omitempty"`
	ExpiryTime              *string                `json:"expiryTime,omitempty"`
	Group                   *string                `json:"group,omitempty"`
	IsSharedToAll           *bool                  `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string      `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SharedUserList          []string               `json:"sharedUserList,omitempty"`
	Target                  *string                `json:"target,omitempty"`
	Value                   *string                `json:"value,omitempty"`
	ValueFormat             *string                `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.ManagedIdentityAuthTypeWorkspaceConnectionProperties
type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                             `json:"authType,omitempty"`
	Category       *string                             `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"`
	ExpiryTime     *string                             `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                               `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string                   `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag              `json:"$propertyBag,omitempty"`
	SharedUserList []string                            `json:"sharedUserList,omitempty"`
	Target         *string                             `json:"target,omitempty"`
	Value          *string                             `json:"value,omitempty"`
	ValueFormat    *string                             `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.ManagedIdentityAuthTypeWorkspaceConnectionProperties_STATUS
type ManagedIdentityAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                                    `json:"authType,omitempty"`
	Category                *string                                    `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                                    `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionManagedIdentity_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                                    `json:"expiryTime,omitempty"`
	Group                   *string                                    `json:"group,omitempty"`
	IsSharedToAll           *bool                                      `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                          `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag                     `json:"$propertyBag,omitempty"`
	SharedUserList          []string                                   `json:"sharedUserList,omitempty"`
	Target                  *string                                    `json:"target,omitempty"`
	Value                   *string                                    `json:"value,omitempty"`
	ValueFormat             *string                                    `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.NoneAuthTypeWorkspaceConnectionProperties
type NoneAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                `json:"authType,omitempty"`
	Category       *string                `json:"category,omitempty"`
	ExpiryTime     *string                `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                  `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string      `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SharedUserList []string               `json:"sharedUserList,omitempty"`
	Target         *string                `json:"target,omitempty"`
	Value          *string                `json:"value,omitempty"`
	ValueFormat    *string                `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.NoneAuthTypeWorkspaceConnectionProperties_STATUS
type NoneAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                `json:"authType,omitempty"`
	Category                *string                `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                `json:"createdByWorkspaceArmId,omitempty"`
	ExpiryTime              *string                `json:"expiryTime,omitempty"`
	Group                   *string                `json:"group,omitempty"`
	IsSharedToAll           *bool                  `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string      `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	SharedUserList          []string               `json:"sharedUserList,omitempty"`
	Target                  *string                `json:"target,omitempty"`
	Value                   *string                `json:"value,omitempty"`
	ValueFormat             *string                `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.OAuth2AuthTypeWorkspaceConnectionProperties
type OAuth2AuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                    `json:"authType,omitempty"`
	Category       *string                    `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionOAuth2 `json:"credentials,omitempty"`
	ExpiryTime     *string                    `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                      `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string          `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag     `json:"$propertyBag,omitempty"`
	SharedUserList []string                   `json:"sharedUserList,omitempty"`
	Target         *string                    `json:"target,omitempty"`
	Value          *string                    `json:"value,omitempty"`
	ValueFormat    *string                    `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.OAuth2AuthTypeWorkspaceConnectionProperties_STATUS
type OAuth2AuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                           `json:"authType,omitempty"`
	Category                *string                           `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                           `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionOAuth2_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                           `json:"expiryTime,omitempty"`
	Group                   *string                           `json:"group,omitempty"`
	IsSharedToAll           *bool                             `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                 `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag            `json:"$propertyBag,omitempty"`
	SharedUserList          []string                          `json:"sharedUserList,omitempty"`
	Target                  *string                           `json:"target,omitempty"`
	Value                   *string                           `json:"value,omitempty"`
	ValueFormat             *string                           `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.PATAuthTypeWorkspaceConnectionProperties
type PATAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                                 `json:"authType,omitempty"`
	Category       *string                                 `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"`
	ExpiryTime     *string                                 `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                                   `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string                       `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag                  `json:"$propertyBag,omitempty"`
	SharedUserList []string                                `json:"sharedUserList,omitempty"`
	Target         *string                                 `json:"target,omitempty"`
	Value          *string                                 `json:"value,omitempty"`
	ValueFormat    *string                                 `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.PATAuthTypeWorkspaceConnectionProperties_STATUS
type PATAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                                        `json:"authType,omitempty"`
	Category                *string                                        `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                                        `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionPersonalAccessToken_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                                        `json:"expiryTime,omitempty"`
	Group                   *string                                        `json:"group,omitempty"`
	IsSharedToAll           *bool                                          `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                              `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag                         `json:"$propertyBag,omitempty"`
	SharedUserList          []string                                       `json:"sharedUserList,omitempty"`
	Target                  *string                                        `json:"target,omitempty"`
	Value                   *string                                        `json:"value,omitempty"`
	ValueFormat             *string                                        `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.SASAuthTypeWorkspaceConnectionProperties
type SASAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                                   `json:"authType,omitempty"`
	Category       *string                                   `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionSharedAccessSignature `json:"credentials,omitempty"`
	ExpiryTime     *string                                   `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                                     `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string                         `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag                    `json:"$propertyBag,omitempty"`
	SharedUserList []string                                  `json:"sharedUserList,omitempty"`
	Target         *string                                   `json:"target,omitempty"`
	Value          *string                                   `json:"value,omitempty"`
	ValueFormat    *string                                   `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.SASAuthTypeWorkspaceConnectionProperties_STATUS
type SASAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                                          `json:"authType,omitempty"`
	Category                *string                                          `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                                          `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionSharedAccessSignature_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                                          `json:"expiryTime,omitempty"`
	Group                   *string                                          `json:"group,omitempty"`
	IsSharedToAll           *bool                                            `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                                `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag                           `json:"$propertyBag,omitempty"`
	SharedUserList          []string                                         `json:"sharedUserList,omitempty"`
	Target                  *string                                          `json:"target,omitempty"`
	Value                   *string                                          `json:"value,omitempty"`
	ValueFormat             *string                                          `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.ServicePrincipalAuthTypeWorkspaceConnectionProperties
type ServicePrincipalAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                              `json:"authType,omitempty"`
	Category       *string                              `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionServicePrincipal `json:"credentials,omitempty"`
	ExpiryTime     *string                              `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                                `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string                    `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
	SharedUserList []string                             `json:"sharedUserList,omitempty"`
	Target         *string                              `json:"target,omitempty"`
	Value          *string                              `json:"value,omitempty"`
	ValueFormat    *string                              `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.ServicePrincipalAuthTypeWorkspaceConnectionProperties_STATUS
type ServicePrincipalAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                                     `json:"authType,omitempty"`
	Category                *string                                     `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                                     `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionServicePrincipal_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                                     `json:"expiryTime,omitempty"`
	Group                   *string                                     `json:"group,omitempty"`
	IsSharedToAll           *bool                                       `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                           `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag                      `json:"$propertyBag,omitempty"`
	SharedUserList          []string                                    `json:"sharedUserList,omitempty"`
	Target                  *string                                     `json:"target,omitempty"`
	Value                   *string                                     `json:"value,omitempty"`
	ValueFormat             *string                                     `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.UsernamePasswordAuthTypeWorkspaceConnectionProperties
type UsernamePasswordAuthTypeWorkspaceConnectionProperties struct {
	AuthType       *string                              `json:"authType,omitempty"`
	Category       *string                              `json:"category,omitempty"`
	Credentials    *WorkspaceConnectionUsernamePassword `json:"credentials,omitempty"`
	ExpiryTime     *string                              `json:"expiryTime,omitempty"`
	IsSharedToAll  *bool                                `json:"isSharedToAll,omitempty"`
	Metadata       map[string]string                    `json:"metadata,omitempty"`
	PropertyBag    genruntime.PropertyBag               `json:"$propertyBag,omitempty"`
	SharedUserList []string                             `json:"sharedUserList,omitempty"`
	Target         *string                              `json:"target,omitempty"`
	Value          *string                              `json:"value,omitempty"`
	ValueFormat    *string                              `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.UsernamePasswordAuthTypeWorkspaceConnectionProperties_STATUS
type UsernamePasswordAuthTypeWorkspaceConnectionProperties_STATUS struct {
	AuthType                *string                                     `json:"authType,omitempty"`
	Category                *string                                     `json:"category,omitempty"`
	CreatedByWorkspaceArmId *string                                     `json:"createdByWorkspaceArmId,omitempty"`
	Credentials             *WorkspaceConnectionUsernamePassword_STATUS `json:"credentials,omitempty"`
	ExpiryTime              *string                                     `json:"expiryTime,omitempty"`
	Group                   *string                                     `json:"group,omitempty"`
	IsSharedToAll           *bool                                       `json:"isSharedToAll,omitempty"`
	Metadata                map[string]string                           `json:"metadata,omitempty"`
	PropertyBag             genruntime.PropertyBag                      `json:"$propertyBag,omitempty"`
	SharedUserList          []string                                    `json:"sharedUserList,omitempty"`
	Target                  *string                                     `json:"target,omitempty"`
	Value                   *string                                     `json:"value,omitempty"`
	ValueFormat             *string                                     `json:"valueFormat,omitempty"`
}

// Storage version of v1api20240401.CustomKeys
// Custom Keys credential object
type CustomKeys struct {
	Keys        *genruntime.SecretMapReference `json:"keys,omitempty"`
	PropertyBag genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.CustomKeys_STATUS
// Custom Keys credential object
type CustomKeys_STATUS struct {
	Keys        map[string]string      `json:"keys,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionAccessKey
type WorkspaceConnectionAccessKey struct {
	AccessKeyId     *string                     `json:"accessKeyId,omitempty"`
	PropertyBag     genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	SecretAccessKey *genruntime.SecretReference `json:"secretAccessKey,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionAccessKey_STATUS
type WorkspaceConnectionAccessKey_STATUS struct {
	AccessKeyId *string                `json:"accessKeyId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionAccountKey
type WorkspaceConnectionAccountKey struct {
	Key         *genruntime.SecretReference `json:"key,omitempty"`
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionAccountKey_STATUS
type WorkspaceConnectionAccountKey_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionApiKey
// Api key object for workspace connection credential.
type WorkspaceConnectionApiKey struct {
	Key         *genruntime.SecretReference `json:"key,omitempty"`
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionApiKey_STATUS
// Api key object for workspace connection credential.
type WorkspaceConnectionApiKey_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionManagedIdentity
type WorkspaceConnectionManagedIdentity struct {
	ClientId           *string                        `json:"clientId,omitempty" optionalConfigMapPair:"ClientId"`
	ClientIdFromConfig *genruntime.ConfigMapReference `json:"clientIdFromConfig,omitempty" optionalConfigMapPair:"ClientId"`
	PropertyBag        genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	ResourceReference  *genruntime.ResourceReference  `armReference:"ResourceId" json:"resourceReference,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionManagedIdentity_STATUS
type WorkspaceConnectionManagedIdentity_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ResourceId  *string                `json:"resourceId,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionOAuth2
// ClientId and ClientSecret are required. Other properties are optional
// depending on each OAuth2 provider's
// implementation.
type WorkspaceConnectionOAuth2 struct {
	AuthUrl            *string                        `json:"authUrl,omitempty"`
	ClientId           *string                        `json:"clientId,omitempty" optionalConfigMapPair:"ClientId"`
	ClientIdFromConfig *genruntime.ConfigMapReference `json:"clientIdFromConfig,omitempty" optionalConfigMapPair:"ClientId"`
	ClientSecret       *genruntime.SecretReference    `json:"clientSecret,omitempty"`
	DeveloperToken     *genruntime.SecretReference    `json:"developerToken,omitempty"`
	Password           *genruntime.SecretReference    `json:"password,omitempty"`
	PropertyBag        genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	RefreshToken       *genruntime.SecretReference    `json:"refreshToken,omitempty"`
	TenantId           *string                        `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"`
	TenantIdFromConfig *genruntime.ConfigMapReference `json:"tenantIdFromConfig,omitempty" optionalConfigMapPair:"TenantId"`
	Username           *string                        `json:"username,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionOAuth2_STATUS
// ClientId and ClientSecret are required. Other properties are optional
// depending on each OAuth2 provider's
// implementation.
type WorkspaceConnectionOAuth2_STATUS struct {
	AuthUrl     *string                `json:"authUrl,omitempty"`
	ClientId    *string                `json:"clientId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TenantId    *string                `json:"tenantId,omitempty"`
	Username    *string                `json:"username,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionPersonalAccessToken
type WorkspaceConnectionPersonalAccessToken struct {
	Pat         *genruntime.SecretReference `json:"pat,omitempty"`
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionPersonalAccessToken_STATUS
type WorkspaceConnectionPersonalAccessToken_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionServicePrincipal
type WorkspaceConnectionServicePrincipal struct {
	ClientId           *string                        `json:"clientId,omitempty" optionalConfigMapPair:"ClientId"`
	ClientIdFromConfig *genruntime.ConfigMapReference `json:"clientIdFromConfig,omitempty" optionalConfigMapPair:"ClientId"`
	ClientSecret       *genruntime.SecretReference    `json:"clientSecret,omitempty"`
	PropertyBag        genruntime.PropertyBag         `json:"$propertyBag,omitempty"`
	TenantId           *string                        `json:"tenantId,omitempty" optionalConfigMapPair:"TenantId"`
	TenantIdFromConfig *genruntime.ConfigMapReference `json:"tenantIdFromConfig,omitempty" optionalConfigMapPair:"TenantId"`
}

// Storage version of v1api20240401.WorkspaceConnectionServicePrincipal_STATUS
type WorkspaceConnectionServicePrincipal_STATUS struct {
	ClientId    *string                `json:"clientId,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	TenantId    *string                `json:"tenantId,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionSharedAccessSignature
type WorkspaceConnectionSharedAccessSignature struct {
	PropertyBag genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	Sas         *genruntime.SecretReference `json:"sas,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionSharedAccessSignature_STATUS
type WorkspaceConnectionSharedAccessSignature_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionUsernamePassword
type WorkspaceConnectionUsernamePassword struct {
	Password      *genruntime.SecretReference `json:"password,omitempty"`
	PropertyBag   genruntime.PropertyBag      `json:"$propertyBag,omitempty"`
	SecurityToken *genruntime.SecretReference `json:"securityToken,omitempty"`
	Username      *string                     `json:"username,omitempty"`
}

// Storage version of v1api20240401.WorkspaceConnectionUsernamePassword_STATUS
type WorkspaceConnectionUsernamePassword_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Username    *string                `json:"username,omitempty"`
}

func init() {
	SchemeBuilder.Register(&WorkspacesConnection{}, &WorkspacesConnectionList{})
}
