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

import (
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
)

type Workspace_Spec struct {
	// Identity: Identity of the workspace
	Identity *ManagedIdentity `json:"identity,omitempty"`

	// Location: The geo-location where the resource lives
	Location *string `json:"location,omitempty"`
	Name     string  `json:"name,omitempty"`

	// Properties: Workspace resource properties
	Properties *WorkspaceProperties `json:"properties,omitempty"`

	// Tags: Resource tags.
	Tags map[string]string `json:"tags,omitempty"`
}

var _ genruntime.ARMResourceSpec = &Workspace_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2021-06-01"
func (workspace Workspace_Spec) GetAPIVersion() string {
	return "2021-06-01"
}

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

// GetType returns the ARM Type of the resource. This is always "Microsoft.Synapse/workspaces"
func (workspace *Workspace_Spec) GetType() string {
	return "Microsoft.Synapse/workspaces"
}

// The workspace managed identity
type ManagedIdentity struct {
	// Type: The type of managed identity for the workspace
	Type                   *ManagedIdentity_Type                  `json:"type,omitempty"`
	UserAssignedIdentities map[string]UserAssignedIdentityDetails `json:"userAssignedIdentities,omitempty"`
}

// Workspace properties
type WorkspaceProperties struct {
	// AzureADOnlyAuthentication: Enable or Disable AzureADOnlyAuthentication on All Workspace subresource
	AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"`

	// CspWorkspaceAdminProperties: Initial workspace AAD admin properties for a CSP subscription
	CspWorkspaceAdminProperties *CspWorkspaceAdminProperties `json:"cspWorkspaceAdminProperties,omitempty"`

	// DefaultDataLakeStorage: Workspace default data lake storage account details
	DefaultDataLakeStorage *DataLakeStorageAccountDetails `json:"defaultDataLakeStorage,omitempty"`

	// Encryption: The encryption details of the workspace
	Encryption *EncryptionDetails `json:"encryption,omitempty"`

	// ManagedResourceGroupName: Workspace managed resource group. The resource group name uniquely identifies the resource
	// group within the user subscriptionId. The resource group name must be no longer than 90 characters long, and must be
	// alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note that the name cannot end with '.'
	ManagedResourceGroupName *string `json:"managedResourceGroupName,omitempty"`

	// ManagedVirtualNetwork: Setting this to 'default' will ensure that all compute for this workspace is in a virtual network
	// managed on behalf of the user.
	ManagedVirtualNetwork *string `json:"managedVirtualNetwork,omitempty"`

	// ManagedVirtualNetworkSettings: Managed Virtual Network Settings
	ManagedVirtualNetworkSettings *ManagedVirtualNetworkSettings `json:"managedVirtualNetworkSettings,omitempty"`

	// PublicNetworkAccess: Enable or Disable public network access to workspace
	PublicNetworkAccess *WorkspaceProperties_PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// PurviewConfiguration: Purview Configuration
	PurviewConfiguration *PurviewConfiguration `json:"purviewConfiguration,omitempty"`

	// SqlAdministratorLogin: Login for workspace SQL active directory administrator
	SqlAdministratorLogin *string `json:"sqlAdministratorLogin,omitempty"`

	// SqlAdministratorLoginPassword: SQL administrator login password
	SqlAdministratorLoginPassword *string `json:"sqlAdministratorLoginPassword,omitempty"`

	// TrustedServiceBypassEnabled: Is trustedServiceBypassEnabled for the workspace
	TrustedServiceBypassEnabled *bool `json:"trustedServiceBypassEnabled,omitempty"`

	// VirtualNetworkProfile: Virtual Network profile
	VirtualNetworkProfile *VirtualNetworkProfile `json:"virtualNetworkProfile,omitempty"`

	// WorkspaceRepositoryConfiguration: Git integration settings
	WorkspaceRepositoryConfiguration *WorkspaceRepositoryConfiguration `json:"workspaceRepositoryConfiguration,omitempty"`
}

// Initial workspace AAD admin properties for a CSP subscription
type CspWorkspaceAdminProperties struct {
	// InitialWorkspaceAdminObjectId: AAD object ID of initial workspace admin
	InitialWorkspaceAdminObjectId *string `json:"initialWorkspaceAdminObjectId,omitempty"`
}

// Details of the data lake storage account associated with the workspace
type DataLakeStorageAccountDetails struct {
	// AccountUrl: Account URL
	AccountUrl *string `json:"accountUrl,omitempty" optionalConfigMapPair:"AccountUrl"`

	// CreateManagedPrivateEndpoint: Create managed private endpoint to this storage account or not
	CreateManagedPrivateEndpoint *bool `json:"createManagedPrivateEndpoint,omitempty"`

	// Filesystem: Filesystem name
	Filesystem *string `json:"filesystem,omitempty"`

	// ResourceId: ARM resource Id of this storage account
	ResourceId *string `json:"resourceId,omitempty"`
}

// Details of the encryption associated with the workspace
type EncryptionDetails struct {
	// Cmk: Customer Managed Key Details
	Cmk *CustomerManagedKeyDetails `json:"cmk,omitempty"`
}

// +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned,UserAssigned"}
type ManagedIdentity_Type string

const (
	ManagedIdentity_Type_None                       = ManagedIdentity_Type("None")
	ManagedIdentity_Type_SystemAssigned             = ManagedIdentity_Type("SystemAssigned")
	ManagedIdentity_Type_SystemAssignedUserAssigned = ManagedIdentity_Type("SystemAssigned,UserAssigned")
)

// Mapping from string to ManagedIdentity_Type
var managedIdentity_Type_Values = map[string]ManagedIdentity_Type{
	"none":                        ManagedIdentity_Type_None,
	"systemassigned":              ManagedIdentity_Type_SystemAssigned,
	"systemassigned,userassigned": ManagedIdentity_Type_SystemAssignedUserAssigned,
}

// Managed Virtual Network Settings
type ManagedVirtualNetworkSettings struct {
	// AllowedAadTenantIdsForLinking: Allowed Aad Tenant Ids For Linking
	AllowedAadTenantIdsForLinking []string `json:"allowedAadTenantIdsForLinking,omitempty"`

	// LinkedAccessCheckOnTargetResource: Linked Access Check On Target Resource
	LinkedAccessCheckOnTargetResource *bool `json:"linkedAccessCheckOnTargetResource,omitempty"`

	// PreventDataExfiltration: Prevent Data Exfiltration
	PreventDataExfiltration *bool `json:"preventDataExfiltration,omitempty"`
}

// Purview Configuration
type PurviewConfiguration struct {
	// PurviewResourceId: Purview Resource ID
	PurviewResourceId *string `json:"purviewResourceId,omitempty"`
}

// Information about the user assigned identity for the resource
type UserAssignedIdentityDetails struct {
}

// Virtual Network Profile
type VirtualNetworkProfile struct {
	// ComputeSubnetId: Subnet ID used for computes in workspace
	ComputeSubnetId *string `json:"computeSubnetId,omitempty"`
}

// +kubebuilder:validation:Enum={"Disabled","Enabled"}
type WorkspaceProperties_PublicNetworkAccess string

const (
	WorkspaceProperties_PublicNetworkAccess_Disabled = WorkspaceProperties_PublicNetworkAccess("Disabled")
	WorkspaceProperties_PublicNetworkAccess_Enabled  = WorkspaceProperties_PublicNetworkAccess("Enabled")
)

// Mapping from string to WorkspaceProperties_PublicNetworkAccess
var workspaceProperties_PublicNetworkAccess_Values = map[string]WorkspaceProperties_PublicNetworkAccess{
	"disabled": WorkspaceProperties_PublicNetworkAccess_Disabled,
	"enabled":  WorkspaceProperties_PublicNetworkAccess_Enabled,
}

// Git integration settings
type WorkspaceRepositoryConfiguration struct {
	// AccountName: Account name
	AccountName *string `json:"accountName,omitempty"`

	// CollaborationBranch: Collaboration branch
	CollaborationBranch *string `json:"collaborationBranch,omitempty"`

	// HostName: GitHub Enterprise host name. For example: `https://github.mydomain.com`
	HostName *string `json:"hostName,omitempty"`

	// LastCommitId: The last commit ID
	LastCommitId *string `json:"lastCommitId,omitempty"`

	// ProjectName: VSTS project name
	ProjectName *string `json:"projectName,omitempty"`

	// RepositoryName: Repository name
	RepositoryName *string `json:"repositoryName,omitempty"`

	// RootFolder: Root folder to use in the repository
	RootFolder *string `json:"rootFolder,omitempty"`

	// TenantId: The VSTS tenant ID
	TenantId *string `json:"tenantId,omitempty"`

	// Type: Type of workspace repositoryID configuration. Example WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration
	Type *string `json:"type,omitempty"`
}

// Details of the customer managed key associated with the workspace
type CustomerManagedKeyDetails struct {
	// KekIdentity: Key encryption key
	KekIdentity *KekIdentityProperties `json:"kekIdentity,omitempty"`

	// Key: The key object of the workspace
	Key *WorkspaceKeyDetails `json:"key,omitempty"`
}

// Key encryption key properties
type KekIdentityProperties struct {
	// UseSystemAssignedIdentity: Boolean specifying whether to use system assigned identity or not
	UseSystemAssignedIdentity *v1.JSON `json:"useSystemAssignedIdentity,omitempty"`

	// UserAssignedIdentity: User assigned identity resource Id
	UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
}

// Details of the customer managed key associated with the workspace
type WorkspaceKeyDetails struct {
	// KeyVaultUrl: Workspace Key sub-resource key vault url
	KeyVaultUrl *string `json:"keyVaultUrl,omitempty"`

	// Name: Workspace Key sub-resource name
	Name *string `json:"name,omitempty"`
}
