diff --git a/lib/services/containerRegistryManagement/lib/models/index.d.ts b/lib/services/containerRegistryManagement/lib/models/index.d.ts index f30f253a7e..ebe5fd149f 100644 --- a/lib/services/containerRegistryManagement/lib/models/index.d.ts +++ b/lib/services/containerRegistryManagement/lib/models/index.d.ts @@ -259,6 +259,35 @@ export interface StorageAccountProperties { id: string; } +/** + * @class + * Initializes a new instance of the VirtualNetworkRule class. + * @constructor + * The virtual network rule for a container registry. + * + * @member {string} id Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ +export interface VirtualNetworkRule { + id: string; +} + +/** + * @class + * Initializes a new instance of the NetworkRuleSet class. + * @constructor + * The network rule set for a container registry. + * + * @member {string} defaultAction The default action of allow or deny when no + * other rules match. Possible values include: 'Allow', 'Deny'. Default value: + * 'Allow' . + * @member {array} [virtualNetworkRules] The virtual network rules. + */ +export interface NetworkRuleSet { + defaultAction: string; + virtualNetworkRules?: VirtualNetworkRule[]; +} + /** * @class * Initializes a new instance of the Resource class. @@ -311,6 +340,12 @@ export interface Resource extends BaseResource { * @member {object} [storageAccount] The properties of the storage account for * the container registry. Only applicable to Classic SKU. * @member {string} [storageAccount.id] The resource ID of the storage account. + * @member {object} [networkRuleSet] The network rule set for a container + * registry. + * @member {string} [networkRuleSet.defaultAction] The default action of allow + * or deny when no other rules match. Possible values include: 'Allow', 'Deny' + * @member {array} [networkRuleSet.virtualNetworkRules] The virtual network + * rules. */ export interface Registry extends Resource { sku: Sku; @@ -320,6 +355,7 @@ export interface Registry extends Resource { readonly status?: Status; adminUserEnabled?: boolean; storageAccount?: StorageAccountProperties; + networkRuleSet?: NetworkRuleSet; } /** @@ -342,12 +378,19 @@ export interface Registry extends Resource { * storage account must be in the same physical location as the container * registry. * @member {string} [storageAccount.id] The resource ID of the storage account. + * @member {object} [networkRuleSet] The network rule set for a container + * registry. + * @member {string} [networkRuleSet.defaultAction] The default action of allow + * or deny when no other rules match. Possible values include: 'Allow', 'Deny' + * @member {array} [networkRuleSet.virtualNetworkRules] The virtual network + * rules. */ export interface RegistryUpdateParameters { tags?: { [propertyName: string]: string }; sku?: Sku; adminUserEnabled?: boolean; storageAccount?: StorageAccountProperties; + networkRuleSet?: NetworkRuleSet; } /** @@ -1381,7 +1424,7 @@ export interface TriggerProperties { * Initializes a new instance of the Task class. * @constructor * The task that has the ARM resource and task properties. - * The task will have all information to schedule a run against it. + * The task will have all information to schedule a run against it. * * @member {string} [provisioningState] The provisioning state of the task. * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', diff --git a/lib/services/containerRegistryManagement/lib/models/index.js b/lib/services/containerRegistryManagement/lib/models/index.js index 5b0f4c8e2b..3cfb4545a7 100644 --- a/lib/services/containerRegistryManagement/lib/models/index.js +++ b/lib/services/containerRegistryManagement/lib/models/index.js @@ -30,6 +30,8 @@ exports.OperationDefinition = require('./operationDefinition'); exports.Sku = require('./sku'); exports.Status = require('./status'); exports.StorageAccountProperties = require('./storageAccountProperties'); +exports.VirtualNetworkRule = require('./virtualNetworkRule'); +exports.NetworkRuleSet = require('./networkRuleSet'); exports.Resource = require('./resource'); exports.Registry = require('./registry'); exports.RegistryUpdateParameters = require('./registryUpdateParameters'); diff --git a/lib/services/containerRegistryManagement/lib/models/networkRuleSet.js b/lib/services/containerRegistryManagement/lib/models/networkRuleSet.js new file mode 100644 index 0000000000..68c6e7c952 --- /dev/null +++ b/lib/services/containerRegistryManagement/lib/models/networkRuleSet.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The network rule set for a container registry. + * + */ +class NetworkRuleSet { + /** + * Create a NetworkRuleSet. + * @member {string} defaultAction The default action of allow or deny when no + * other rules match. Possible values include: 'Allow', 'Deny'. Default + * value: 'Allow' . + * @member {array} [virtualNetworkRules] The virtual network rules. + */ + constructor() { + } + + /** + * Defines the metadata of NetworkRuleSet + * + * @returns {object} metadata of NetworkRuleSet + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkRuleSet', + type: { + name: 'Composite', + className: 'NetworkRuleSet', + modelProperties: { + defaultAction: { + required: true, + serializedName: 'defaultAction', + defaultValue: 'Allow', + type: { + name: 'String' + } + }, + virtualNetworkRules: { + required: false, + serializedName: 'virtualNetworkRules', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VirtualNetworkRuleElementType', + type: { + name: 'Composite', + className: 'VirtualNetworkRule' + } + } + } + } + } + } + }; + } +} + +module.exports = NetworkRuleSet; diff --git a/lib/services/containerRegistryManagement/lib/models/registry.js b/lib/services/containerRegistryManagement/lib/models/registry.js index 5cc411d10d..547f82c275 100644 --- a/lib/services/containerRegistryManagement/lib/models/registry.js +++ b/lib/services/containerRegistryManagement/lib/models/registry.js @@ -47,6 +47,13 @@ class Registry extends models['Resource'] { * for the container registry. Only applicable to Classic SKU. * @member {string} [storageAccount.id] The resource ID of the storage * account. + * @member {object} [networkRuleSet] The network rule set for a container + * registry. + * @member {string} [networkRuleSet.defaultAction] The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * @member {array} [networkRuleSet.virtualNetworkRules] The virtual network + * rules. */ constructor() { super(); @@ -167,6 +174,14 @@ class Registry extends models['Resource'] { name: 'Composite', className: 'StorageAccountProperties' } + }, + networkRuleSet: { + required: false, + serializedName: 'properties.networkRuleSet', + type: { + name: 'Composite', + className: 'NetworkRuleSet' + } } } } diff --git a/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js b/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js index 1b5b26a0e9..e40a0a0c36 100644 --- a/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js +++ b/lib/services/containerRegistryManagement/lib/models/registryUpdateParameters.js @@ -32,6 +32,13 @@ class RegistryUpdateParameters { * registry. * @member {string} [storageAccount.id] The resource ID of the storage * account. + * @member {object} [networkRuleSet] The network rule set for a container + * registry. + * @member {string} [networkRuleSet.defaultAction] The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * @member {array} [networkRuleSet.virtualNetworkRules] The virtual network + * rules. */ constructor() { } @@ -86,6 +93,14 @@ class RegistryUpdateParameters { name: 'Composite', className: 'StorageAccountProperties' } + }, + networkRuleSet: { + required: false, + serializedName: 'properties.networkRuleSet', + type: { + name: 'Composite', + className: 'NetworkRuleSet' + } } } } diff --git a/lib/services/containerRegistryManagement/lib/models/task.js b/lib/services/containerRegistryManagement/lib/models/task.js index b1046d27bc..29c50df961 100644 --- a/lib/services/containerRegistryManagement/lib/models/task.js +++ b/lib/services/containerRegistryManagement/lib/models/task.js @@ -14,7 +14,7 @@ const models = require('./index'); /** * The task that has the ARM resource and task properties. - * The task will have all information to schedule a run against it. + * The task will have all information to schedule a run against it. * * @extends models['Resource'] */ diff --git a/lib/services/containerRegistryManagement/lib/models/virtualNetworkRule.js b/lib/services/containerRegistryManagement/lib/models/virtualNetworkRule.js new file mode 100644 index 0000000000..fa5b976375 --- /dev/null +++ b/lib/services/containerRegistryManagement/lib/models/virtualNetworkRule.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The virtual network rule for a container registry. + * + */ +class VirtualNetworkRule { + /** + * Create a VirtualNetworkRule. + * @member {string} id Resource ID of a subnet, for example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualNetworkRule + * + * @returns {object} metadata of VirtualNetworkRule + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualNetworkRule', + type: { + name: 'Composite', + className: 'VirtualNetworkRule', + modelProperties: { + id: { + required: true, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualNetworkRule; diff --git a/lib/services/containerRegistryManagement/lib/operations/index.d.ts b/lib/services/containerRegistryManagement/lib/operations/index.d.ts index 199e1d387b..1decc4ffef 100644 --- a/lib/services/containerRegistryManagement/lib/operations/index.d.ts +++ b/lib/services/containerRegistryManagement/lib/operations/index.d.ts @@ -316,6 +316,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -359,6 +369,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -488,6 +508,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -533,6 +563,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1343,6 +1383,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -1386,6 +1436,16 @@ export interface Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -1515,6 +1575,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1560,6 +1630,16 @@ export interface Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/containerRegistryManagement/lib/operations/registries.js b/lib/services/containerRegistryManagement/lib/operations/registries.js index 1bf3f83810..149d097a6e 100644 --- a/lib/services/containerRegistryManagement/lib/operations/registries.js +++ b/lib/services/containerRegistryManagement/lib/operations/registries.js @@ -324,6 +324,12 @@ function _get(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -463,6 +469,16 @@ function _get(resourceGroupName, registryName, options, callback) { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -635,6 +651,16 @@ function _deleteMethod(resourceGroupName, registryName, options, callback) { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -748,6 +774,12 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1020,6 +1052,12 @@ function _listCredentials(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1187,6 +1225,12 @@ function _regenerateCredential(resourceGroupName, registryName, regenerateCreden if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1363,6 +1407,12 @@ function _listUsages(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1521,6 +1571,12 @@ function _listPolicies(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1866,6 +1922,12 @@ function _getBuildSourceUploadUrl(resourceGroupName, registryName, options, call if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2064,6 +2126,12 @@ function _beginImportImage(resourceGroupName, registryName, parameters, options, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2202,6 +2270,16 @@ function _beginImportImage(resourceGroupName, registryName, parameters, options, * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -2244,6 +2322,12 @@ function _beginCreate(resourceGroupName, registryName, registry, options, callba if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2435,6 +2519,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, options, callback) if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2563,6 +2653,16 @@ function _beginDeleteMethod(resourceGroupName, registryName, options, callback) * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2600,6 +2700,12 @@ function _beginUpdate(resourceGroupName, registryName, registryUpdateParameters, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2812,6 +2918,12 @@ function _beginUpdatePolicies(resourceGroupName, registryName, registryPoliciesU if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -2995,6 +3107,12 @@ function _beginScheduleRun(resourceGroupName, registryName, runRequest, options, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -3788,6 +3906,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -3843,6 +3971,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -4014,6 +4152,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4071,6 +4219,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5166,6 +5324,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -5221,6 +5389,16 @@ class Registries { * @param {string} registry.storageAccount.id The resource ID of the storage * account. * + * @param {object} [registry.networkRuleSet] The network rule set for a + * container registry. + * + * @param {string} registry.networkRuleSet.defaultAction The default action of + * allow or deny when no other rules match. Possible values include: 'Allow', + * 'Deny' + * + * @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual + * network rules. + * * @param {string} registry.location The location of the resource. This cannot * be changed after the resource is created. * @@ -5392,6 +5570,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5449,6 +5637,16 @@ class Registries { * @param {string} registryUpdateParameters.storageAccount.id The resource ID * of the storage account. * + * @param {object} [registryUpdateParameters.networkRuleSet] The network rule + * set for a container registry. + * + * @param {string} registryUpdateParameters.networkRuleSet.defaultAction The + * default action of allow or deny when no other rules match. Possible values + * include: 'Allow', 'Deny' + * + * @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules] + * The virtual network rules. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/containerRegistryManagement/lib/operations/replications.js b/lib/services/containerRegistryManagement/lib/operations/replications.js index 691f1b4b09..43b53cf6b2 100644 --- a/lib/services/containerRegistryManagement/lib/operations/replications.js +++ b/lib/services/containerRegistryManagement/lib/operations/replications.js @@ -61,6 +61,12 @@ function _get(resourceGroupName, registryName, replicationName, options, callbac if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -480,6 +486,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -648,6 +660,12 @@ function _beginCreate(resourceGroupName, registryName, replicationName, replicat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -859,6 +877,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, replicationName, op if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1027,6 +1051,12 @@ function _beginUpdate(resourceGroupName, registryName, replicationName, replicat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/containerRegistryManagement/lib/operations/runs.js b/lib/services/containerRegistryManagement/lib/operations/runs.js index 0175450ea5..a8ee5cf813 100644 --- a/lib/services/containerRegistryManagement/lib/operations/runs.js +++ b/lib/services/containerRegistryManagement/lib/operations/runs.js @@ -68,6 +68,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -240,6 +246,12 @@ function _get(resourceGroupName, registryName, runId, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -490,6 +502,12 @@ function _getLogSasUrl(resourceGroupName, registryName, runId, options, callback if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -725,6 +743,12 @@ function _beginUpdate(resourceGroupName, registryName, runId, runUpdateParameter if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -922,6 +946,12 @@ function _beginCancel(resourceGroupName, registryName, runId, options, callback) if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/containerRegistryManagement/lib/operations/tasks.js b/lib/services/containerRegistryManagement/lib/operations/tasks.js index 8f98b6030e..96ec812f24 100644 --- a/lib/services/containerRegistryManagement/lib/operations/tasks.js +++ b/lib/services/containerRegistryManagement/lib/operations/tasks.js @@ -59,6 +59,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -219,6 +225,12 @@ function _get(resourceGroupName, registryName, taskName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -745,6 +757,12 @@ function _getDetails(resourceGroupName, registryName, taskName, options, callbac if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -984,6 +1002,12 @@ function _beginCreate(resourceGroupName, registryName, taskName, taskCreateParam if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1195,6 +1219,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, taskName, options, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1415,6 +1445,12 @@ function _beginUpdate(resourceGroupName, registryName, taskName, taskUpdateParam if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } diff --git a/lib/services/containerRegistryManagement/lib/operations/webhooks.js b/lib/services/containerRegistryManagement/lib/operations/webhooks.js index 1def15c336..da6d9e7c6a 100644 --- a/lib/services/containerRegistryManagement/lib/operations/webhooks.js +++ b/lib/services/containerRegistryManagement/lib/operations/webhooks.js @@ -61,6 +61,12 @@ function _get(resourceGroupName, registryName, webhookName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -514,6 +520,12 @@ function _list(resourceGroupName, registryName, options, callback) { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -674,6 +686,12 @@ function _ping(resourceGroupName, registryName, webhookName, options, callback) if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -852,6 +870,12 @@ function _getCallbackConfig(resourceGroupName, registryName, webhookName, option if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1030,6 +1054,12 @@ function _listEvents(resourceGroupName, registryName, webhookName, options, call if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1234,6 +1264,12 @@ function _beginCreate(resourceGroupName, registryName, webhookName, webhookCreat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1445,6 +1481,12 @@ function _beginDeleteMethod(resourceGroupName, registryName, webhookName, option if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); } @@ -1629,6 +1671,12 @@ function _beginUpdate(resourceGroupName, registryName, webhookName, webhookUpdat if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + } if (registryName === null || registryName === undefined || typeof registryName.valueOf() !== 'string') { throw new Error('registryName cannot be null or undefined and it must be of type string.'); }