Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support-non-exhaustive-enum #2584

Merged
merged 6 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/rlc-common/src/buildSchemaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function generateModelFiles(
importedModels,
schemaContext
);

if (
objectTypeAliases.length ||
objectsDefinitions.length ||
Expand Down
1 change: 1 addition & 0 deletions packages/rlc-common/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ export interface RLCOptions {
enableModelNamespace?: boolean;
hierarchyClient?: boolean;
compatibilityMode?: boolean;
experimentalExtensibleEnums?: boolean;
}

export interface ServiceInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,106 @@ export interface KeyVaultInfo {
keyVaultUrl: string;
}

// @public (undocumented)
export enum KnownActionType {
// (undocumented)
Internal = "Internal"
}

// @public (undocumented)
export enum KnownControlState {
// (undocumented)
Disabled = "Disabled",
// (undocumented)
Enabled = "Enabled"
}

// @public (undocumented)
export enum KnownCreatedByType {
// (undocumented)
Application = "Application",
// (undocumented)
Key = "Key",
// (undocumented)
ManagedIdentity = "ManagedIdentity",
// (undocumented)
User = "User"
}

// @public (undocumented)
export enum KnownDataProductUserRole {
// (undocumented)
Reader = "Reader",
// (undocumented)
SensitiveReader = "SensitiveReader"
}

// @public (undocumented)
export enum KnownDataTypeState {
// (undocumented)
Running = "Running",
// (undocumented)
Stopped = "Stopped"
}

// @public (undocumented)
export enum KnownDefaultAction {
// (undocumented)
Allow = "Allow",
// (undocumented)
Deny = "Deny"
}

// @public (undocumented)
export enum KnownManagedServiceIdentityType {
// (undocumented)
"SystemAssigned, UserAssigned" = "SystemAssigned, UserAssigned",
// (undocumented)
None = "None",
// (undocumented)
SystemAssigned = "SystemAssigned",
// (undocumented)
UserAssigned = "UserAssigned"
}

// @public (undocumented)
export enum KnownOrigin {
// (undocumented)
"user,system" = "user,system",
// (undocumented)
system = "system",
// (undocumented)
user = "user"
}

// @public (undocumented)
export enum KnownProvisioningState {
// (undocumented)
Accepted = "Accepted",
// (undocumented)
Canceled = "Canceled",
// (undocumented)
Deleting = "Deleting",
// (undocumented)
Failed = "Failed",
// (undocumented)
Provisioning = "Provisioning",
// (undocumented)
Succeeded = "Succeeded",
// (undocumented)
Updating = "Updating"
}

// @public (undocumented)
export enum KnownResourceProvisioningState {
// (undocumented)
Canceled = "Canceled",
// (undocumented)
Failed = "Failed",
// (undocumented)
Succeeded = "Succeeded"
}

// @public
export interface ListRoleAssignments {
count: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,25 @@ export {
Resource,
SystemData,
CreatedByType,
KnownCreatedByType,
TrackedResource,
DataProduct,
DataProductProperties,
ProvisioningState,
KnownProvisioningState,
ControlState,
KnownControlState,
EncryptionKeyDetails,
DataProductNetworkAcls,
VirtualNetworkRule,
IPRules,
DefaultAction,
KnownDefaultAction,
ManagedResourceGroupConfiguration,
ConsumptionEndpointsProperties,
ManagedServiceIdentity,
ManagedServiceIdentityType,
KnownManagedServiceIdentityType,
UserAssignedIdentity,
UserAssignedIdentities,
ErrorResponse,
Expand All @@ -33,18 +38,21 @@ export {
DataProductUpdateProperties,
ArmOperationStatus,
ResourceProvisioningState,
KnownResourceProvisioningState,
AccountSas,
AccountSasToken,
KeyVaultInfo,
RoleAssignmentCommonProperties,
DataProductUserRole,
KnownDataProductUserRole,
RoleAssignmentDetail,
ListRoleAssignments,
DataProductListResult,
ProxyResource,
DataType,
DataTypeProperties,
DataTypeState,
KnownDataTypeState,
DataTypeUpdate,
DataTypeUpdateProperties,
ContainerSaS,
Expand All @@ -60,7 +68,9 @@ export {
Operation,
OperationDisplay,
Origin,
KnownOrigin,
ActionType,
KnownActionType,
Versions,
OperationsListOptionalParams,
DataProductsCatalogsGetOptionalParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@ export {
Resource,
SystemData,
CreatedByType,
KnownCreatedByType,
TrackedResource,
DataProduct,
DataProductProperties,
ProvisioningState,
KnownProvisioningState,
ControlState,
KnownControlState,
EncryptionKeyDetails,
DataProductNetworkAcls,
VirtualNetworkRule,
IPRules,
DefaultAction,
KnownDefaultAction,
ManagedResourceGroupConfiguration,
ConsumptionEndpointsProperties,
ManagedServiceIdentity,
ManagedServiceIdentityType,
KnownManagedServiceIdentityType,
UserAssignedIdentity,
UserAssignedIdentities,
ErrorResponse,
Expand All @@ -28,18 +33,21 @@ export {
DataProductUpdateProperties,
ArmOperationStatus,
ResourceProvisioningState,
KnownResourceProvisioningState,
AccountSas,
AccountSasToken,
KeyVaultInfo,
RoleAssignmentCommonProperties,
DataProductUserRole,
KnownDataProductUserRole,
RoleAssignmentDetail,
ListRoleAssignments,
DataProductListResult,
ProxyResource,
DataType,
DataTypeProperties,
DataTypeState,
KnownDataTypeState,
DataTypeUpdate,
DataTypeUpdateProperties,
ContainerSaS,
Expand All @@ -55,7 +63,9 @@ export {
Operation,
OperationDisplay,
Origin,
KnownOrigin,
ActionType,
KnownActionType,
Versions,
} from "./models.js";
export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ export interface SystemData {
/** "User", "Application", "ManagedIdentity", "Key" */
export type CreatedByType = string;

export enum KnownCreatedByType {
User = "User",
Application = "Application",
ManagedIdentity = "ManagedIdentity",
Key = "Key",
}

/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
export interface TrackedResource extends Resource {
/** The geo-location where the resource lives */
Expand Down Expand Up @@ -96,10 +103,26 @@ export interface DataProductProperties {
/** The status of the current operation. */
/** "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted" */
export type ProvisioningState = string;

export enum KnownProvisioningState {
Succeeded = "Succeeded",
Failed = "Failed",
Canceled = "Canceled",
Provisioning = "Provisioning",
Updating = "Updating",
Deleting = "Deleting",
Accepted = "Accepted",
}

/** The data type state */
/** "Enabled", "Disabled" */
export type ControlState = string;

export enum KnownControlState {
Enabled = "Enabled",
Disabled = "Disabled",
}

/** Encryption key details. */
export interface EncryptionKeyDetails {
/** The Uri of the key vault. */
Expand Down Expand Up @@ -144,6 +167,11 @@ export interface IPRules {
/** "Allow", "Deny" */
export type DefaultAction = string;

export enum KnownDefaultAction {
Allow = "Allow",
Deny = "Deny",
}

/** ManagedResourceGroup related properties */
export interface ManagedResourceGroupConfiguration {
/** Name of managed resource group */
Expand Down Expand Up @@ -184,6 +212,13 @@ export interface ManagedServiceIdentity {
/** "None", "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned" */
export type ManagedServiceIdentityType = string;

export enum KnownManagedServiceIdentityType {
None = "None",
SystemAssigned = "SystemAssigned",
UserAssigned = "UserAssigned",
"SystemAssigned, UserAssigned" = "SystemAssigned, UserAssigned",
}

/** A managed identity assigned by the user. */
export interface UserAssignedIdentity {
/** The active directory client identifier for this principal. */
Expand Down Expand Up @@ -267,6 +302,12 @@ export interface ArmOperationStatus {
/** "Succeeded", "Failed", "Canceled" */
export type ResourceProvisioningState = string;

export enum KnownResourceProvisioningState {
Succeeded = "Succeeded",
Failed = "Failed",
Canceled = "Canceled",
}

/** The details for storage account sas creation. */
export interface AccountSas {
/** Sas token start timestamp. */
Expand Down Expand Up @@ -309,6 +350,11 @@ export interface RoleAssignmentCommonProperties {
/** "Reader", "SensitiveReader" */
export type DataProductUserRole = string;

export enum KnownDataProductUserRole {
Reader = "Reader",
SensitiveReader = "SensitiveReader",
}

/** The details for role assignment response. */
export interface RoleAssignmentDetail {
/** Role Id of the Built-In Role */
Expand Down Expand Up @@ -374,6 +420,11 @@ export interface DataTypeProperties {
/** "Stopped", "Running" */
export type DataTypeState = string;

export enum KnownDataTypeState {
Stopped = "Stopped",
Running = "Running",
}

/** The type used for update operations of the DataType. */
export interface DataTypeUpdate {
properties?: DataTypeUpdateProperties;
Expand Down Expand Up @@ -498,9 +549,21 @@ export interface OperationDisplay {
/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */
/** "user", "system", "user,system" */
export type Origin = string;

export enum KnownOrigin {
user = "user",
system = "system",
"user,system" = "user,system",
}

/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
/** "Internal" */
export type ActionType = string;

export enum KnownActionType {
Internal = "Internal",
}

/** The available API versions for the Microsoft.NetworkAnalytics RP. */
/** */
export type Versions = "2023-11-15";
Loading
Loading