Skip to content

Commit

Permalink
Generated from 02982f50be31f11aa42805fc356998e907e2f0ed
Browse files Browse the repository at this point in the history
Explicitly model parameter definitions and values
  • Loading branch information
SDK Automation committed Oct 30, 2019
1 parent 88d3b47 commit 9c1b573
Show file tree
Hide file tree
Showing 8 changed files with 451 additions and 67 deletions.
182 changes: 156 additions & 26 deletions sdk/policy/arm-policy/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,63 @@ import * as msRest from "@azure/ms-rest-js";

export { BaseResource, CloudError };

/**
* The resource management error additional info.
*/
export interface ErrorAdditionalInfo {
/**
* The additional info type.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
/**
* The additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly info?: any;
}

/**
* The resource management error response.
*/
export interface ErrorResponse {
/**
* The error code.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly code?: string;
/**
* The error message.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly message?: string;
/**
* The error target.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly target?: string;
/**
* The error details.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly details?: ErrorResponse[];
/**
* The error additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly additionalInfo?: ErrorAdditionalInfo[];
}

/**
* An interface representing ParameterValuesValue.
*/
export interface ParameterValuesValue {
/**
* The value of the parameter.
*/
value?: any;
}

/**
* The policy sku. This property is optional, obsolete, and will be ignored.
*/
Expand Down Expand Up @@ -66,15 +123,16 @@ export interface PolicyAssignment extends BaseResource {
*/
notScopes?: string[];
/**
* Required if a parameter is used in policy rule.
* The parameter values for the assigned policy rule. The keys are the parameter names.
*/
parameters?: any;
parameters?: { [propertyName: string]: ParameterValuesValue };
/**
* This message will be part of response in case of policy violation.
*/
description?: string;
/**
* The policy assignment metadata.
* The policy assignment metadata. Metadata is an open ended object and is typically a collection
* of key value pairs.
*/
metadata?: any;
/**
Expand Down Expand Up @@ -112,31 +170,53 @@ export interface PolicyAssignment extends BaseResource {
}

/**
* Error response indicates Azure Resource Manager is not able to process the incoming request. The
* reason is provided in the error message.
* General metadata for the parameter.
*/
export interface ErrorResponse {
export interface ParameterDefinitionsValueMetadata {
/**
* Http status code.
* The display name for the parameter.
*/
httpStatus?: string;
displayName?: string;
/**
* Error code.
* The description of the parameter.
*/
errorCode?: string;
description?: string;
/**
* Error message indicating why the operation failed.
* Describes unknown properties. The value of an unknown property can be of "any" type.
*/
errorMessage?: string;
[property: string]: any;
}

/**
* An interface representing ParameterDefinitionsValue.
*/
export interface ParameterDefinitionsValue {
/**
* The data type of the parameter. Possible values include: 'String', 'Array', 'Object',
* 'Boolean', 'Integer', 'Float', 'DateTime'
*/
type?: ParameterType;
/**
* The allowed values for the parameter.
*/
allowedValues?: any[];
/**
* The default value for the parameter if no value is provided.
*/
defaultValue?: any;
/**
* General metadata for the parameter.
*/
metadata?: ParameterDefinitionsValueMetadata;
}

/**
* The policy definition.
*/
export interface PolicyDefinition extends BaseResource {
/**
* The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible
* values include: 'NotSpecified', 'BuiltIn', 'Custom'
* The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
* Possible values include: 'NotSpecified', 'BuiltIn', 'Custom', 'Static'
*/
policyType?: PolicyType;
/**
Expand All @@ -156,13 +236,15 @@ export interface PolicyDefinition extends BaseResource {
*/
policyRule?: any;
/**
* The policy definition metadata.
* The policy definition metadata. Metadata is an open ended object and is typically a
* collection of key value pairs.
*/
metadata?: any;
/**
* Required if a parameter is used in policy rule.
* The parameter definitions for parameters used in the policy rule. The keys are the parameter
* names.
*/
parameters?: any;
parameters?: { [propertyName: string]: ParameterDefinitionsValue };
/**
* The ID of the policy definition.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand All @@ -187,20 +269,54 @@ export interface PolicyDefinitionReference {
/**
* The ID of the policy definition or policy set definition.
*/
policyDefinitionId?: string;
policyDefinitionId: string;
/**
* The parameter values for the referenced policy rule. The keys are the parameter names.
*/
parameters?: { [propertyName: string]: ParameterValuesValue };
/**
* A unique id (within the policy set definition) for this policy definition reference.
*/
policyDefinitionReferenceId?: string;
/**
* The name of the groups that this policy definition reference belongs to.
*/
groupNames?: string[];
}

/**
* The policy definition group.
*/
export interface PolicyDefinitionGroup {
/**
* The name of the group.
*/
name: string;
/**
* The group's display name.
*/
displayName?: string;
/**
* The group's category.
*/
category?: string;
/**
* Required if a parameter is used in policy rule.
* The group's description.
*/
parameters?: any;
description?: string;
/**
* A resource ID of a resource that contains additional metadata about the group.
*/
additionalMetadataId?: string;
}

/**
* The policy set definition.
*/
export interface PolicySetDefinition extends BaseResource {
/**
* The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible
* values include: 'NotSpecified', 'BuiltIn', 'Custom'
* The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
* Possible values include: 'NotSpecified', 'BuiltIn', 'Custom', 'Static'
*/
policyType?: PolicyType;
/**
Expand All @@ -212,17 +328,23 @@ export interface PolicySetDefinition extends BaseResource {
*/
description?: string;
/**
* The policy set definition metadata.
* The policy set definition metadata. Metadata is an open ended object and is typically a
* collection of key value pairs.
*/
metadata?: any;
/**
* The policy set definition parameters that can be used in policy definition references.
*/
parameters?: any;
parameters?: { [propertyName: string]: ParameterDefinitionsValue };
/**
* An array of policy definition references.
*/
policyDefinitions: PolicyDefinitionReference[];
/**
* The metadata describing groups of policy definition references within the policy set
* definition.
*/
policyDefinitionGroups?: PolicyDefinitionGroup[];
/**
* The ID of the policy set definition.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand Down Expand Up @@ -334,11 +456,19 @@ export type ResourceIdentityType = 'SystemAssigned' | 'None';

/**
* Defines values for PolicyType.
* Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
* Possible values include: 'NotSpecified', 'BuiltIn', 'Custom', 'Static'
* @readonly
* @enum {string}
*/
export type PolicyType = 'NotSpecified' | 'BuiltIn' | 'Custom' | 'Static';

/**
* Defines values for ParameterType.
* Possible values include: 'String', 'Array', 'Object', 'Boolean', 'Integer', 'Float', 'DateTime'
* @readonly
* @enum {string}
*/
export type PolicyType = 'NotSpecified' | 'BuiltIn' | 'Custom';
export type ParameterType = 'String' | 'Array' | 'Object' | 'Boolean' | 'Integer' | 'Float' | 'DateTime';

/**
* Contains response data for the deleteMethod operation.
Expand Down
Loading

0 comments on commit 9c1b573

Please sign in to comment.