/* 
  AUTOGENERATED FILE
  Run "npm run generateARMClients" to regenerate
  Edting this file directly should be done with extreme caution as not to diverge from ARM REST specs

  Generated from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-03-01/workspace.json
*/

import { ARMResourceProperties } from "../cosmos/types";

/* Workspace active directory administrator properties */
export interface AadAdminProperties {
  /* Tenant ID of the workspace active directory administrator */
  tenantId?: string;
  /* Login of the workspace active directory administrator */
  login?: string;
  /* Workspace active directory administrator type */
  administratorType?: string;
  /* Object ID of the workspace active directory administrator */
  sid?: string;
}

/* List of workspaces */
export interface WorkspaceInfoListResult {
  /* Link to the next page of results */
  nextLink?: string;
  /* List of workspaces */
  value?: Workspace[];
}

/* Details of the data lake storage account associated with the workspace */
export interface DataLakeStorageAccountDetails {
  /* Account URL */
  accountUrl?: string;
  /* Filesystem name */
  filesystem?: string;
}

/* Details of the encryption associated with the workspace */
export interface EncryptionDetails {
  /* Double Encryption enabled */
  readonly doubleEncryptionEnabled?: boolean;
  /* Customer Managed Key Details */
  cmk?: CustomerManagedKeyDetails;
}

/* Details of the customer managed key associated with the workspace */
export interface CustomerManagedKeyDetails {
  /* The customer managed key status on the workspace */
  readonly status?: string;
  /* The key object of the workspace */
  key?: WorkspaceKeyDetails;
}

/* Details of the customer managed key associated with the workspace */
export interface WorkspaceKeyDetails {
  /* Workspace Key sub-resource name */
  name?: string;
  /* Workspace Key sub-resource key vault url */
  keyVaultUrl?: string;
}

/* The workspace managed identity */
export interface ManagedIdentity {
  /* The principal ID of the workspace managed identity */
  readonly principalId?: string;
  /* The tenant ID of the workspace managed identity */
  readonly tenantId?: string;
  /* The type of managed identity for the workspace */
  type?: "None" | "SystemAssigned";
}

/* Virtual Network Profile */
export interface VirtualNetworkProfile {
  /* Subnet ID used for computes in workspace */
  computeSubnetId?: string;
}

/* Managed Virtual Network Settings */
export interface ManagedVirtualNetworkSettings {
  /* Prevent Data Exfiltration */
  preventDataExfiltration?: boolean;
  /* Linked Access Check On Target Resource */
  linkedAccessCheckOnTargetResource?: boolean;
  /* Allowed Aad Tenant Ids For Linking */
  allowedAadTenantIdsForLinking?: unknown[];
}

/* Git integration settings */
export interface WorkspaceRepositoryConfiguration {
  /* Type of workspace repositoryID configuration. Example WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration */
  type?: string;
  /* GitHub Enterprise host name. For example: https://github.mydomain.com */
  hostName?: string;
  /* Account name */
  accountName?: string;
  /* VSTS project name */
  projectName?: string;
  /* Repository name */
  repositoryName?: string;
  /* Collaboration branch */
  collaborationBranch?: string;
  /* Root folder to use in the repository */
  rootFolder?: string;
  /* The last commit ID */
  lastCommitId?: string;
  /* The VSTS tenant ID */
  tenantId?: string;
}

/* Purview Configuration */
export interface PurviewConfiguration {
  /* Purview Resource ID */
  purviewResourceId?: string;
}

/* Workspace active directory administrator */
export type WorkspaceAadAdminInfo = ARMResourceProperties & {
  /* Workspace active directory administrator properties */
  properties?: AadAdminProperties;
};

/* A workspace */
export type Workspace = ARMResourceProperties & {
  /* Workspace resource properties */
  properties?: WorkspaceProperties;

  /* Identity of the workspace */
  identity?: ManagedIdentity;
};

/* Workspace properties */
export interface WorkspaceProperties {
  /* Workspace default data lake storage account details */
  defaultDataLakeStorage?: DataLakeStorageAccountDetails;

  /* SQL administrator login password */
  sqlAdministratorLoginPassword?: string;
  /* 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;
  /* Resource provisioning state */
  readonly provisioningState?: string;
  /* Login for workspace SQL active directory administrator */
  sqlAdministratorLogin?: string;
  /* Virtual Network profile */
  virtualNetworkProfile?: VirtualNetworkProfile;

  /* Connectivity endpoints */
  connectivityEndpoints?: unknown;

  /* 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;
  /* Private endpoint connections to the workspace */
  privateEndpointConnections?: unknown[];

  /* The encryption details of the workspace */
  encryption?: EncryptionDetails;

  /* The workspace unique identifier */
  readonly workspaceUID?: string;
  /* Workspace level configs and feature flags */
  readonly extraProperties?: unknown;

  /* Managed Virtual Network Settings */
  managedVirtualNetworkSettings?: ManagedVirtualNetworkSettings;

  /* Git integration settings */
  workspaceRepositoryConfiguration?: WorkspaceRepositoryConfiguration;

  /* Purview Configuration */
  purviewConfiguration?: PurviewConfiguration;

  /* The ADLA resource ID. */
  readonly adlaResourceId?: string;
  /* Enable or Disable public network access to workspace */
  publicNetworkAccess?: "Enabled" | "Disabled";
}

/* Workspace patch details */
export interface WorkspacePatchInfo {
  /* Resource tags */
  tags?: unknown;

  /* The identity of the workspace */
  identity?: ManagedIdentity;

  /* Workspace patch properties */
  properties?: WorkspacePatchProperties;
}

/* Workspace patch properties */
export interface WorkspacePatchProperties {
  /* SQL administrator login password */
  sqlAdministratorLoginPassword?: string;
  /* Managed Virtual Network Settings */
  managedVirtualNetworkSettings?: ManagedVirtualNetworkSettings;

  /* Git integration settings */
  workspaceRepositoryConfiguration?: WorkspaceRepositoryConfiguration;

  /* Purview Configuration */
  purviewConfiguration?: PurviewConfiguration;

  /* Resource provisioning state */
  readonly provisioningState?: string;
  /* The encryption details of the workspace */
  encryption?: EncryptionDetails;

  /* Enable or Disable public network access to workspace */
  publicNetworkAccess?: "Enabled" | "Disabled";
}

/* Sql Control Settings for workspace managed identity */
export type ManagedIdentitySqlControlSettingsModel = ARMResourceProperties & {
  /* Sql Control Settings for workspace managed identity */
  properties?: unknown;
};

/* The properties of a restorable dropped Sql pool */
export interface RestorableDroppedSqlPoolProperties {
  /* The name of the database */
  readonly databaseName?: string;
  /* The edition of the database */
  readonly edition?: string;
  /* The max size in bytes of the database */
  readonly maxSizeBytes?: string;
  /* The service level objective name of the database */
  readonly serviceLevelObjective?: string;
  /* The elastic pool name of the database */
  readonly elasticPoolName?: string;
  /* The creation date of the database (ISO8601 format) */
  readonly creationDate?: string;
  /* The deletion date of the database (ISO8601 format) */
  readonly deletionDate?: string;
  /* The earliest restore date of the database (ISO8601 format) */
  readonly earliestRestoreDate?: string;
}

/* A restorable dropped Sql pool */
export type RestorableDroppedSqlPool = ARMResourceProperties & {
  /* The geo-location where the resource lives */
  readonly location?: string;
  /* The properties of a restorable dropped Sql pool */
  properties?: RestorableDroppedSqlPoolProperties;
};

/* The response to a list restorable dropped Sql pools request */
export interface RestorableDroppedSqlPoolListResult {
  /* A list of restorable dropped Sql pools */
  value: RestorableDroppedSqlPool[];
}
