From f8855ed5d812a4efc5986740d31e38d00ab7e8d5 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 22 Oct 2018 13:18:35 -0700 Subject: [PATCH] Generated from 26f08b03587be02011080dd59d67c691a57b898d (#3914) Swagger specification and examples for Service Fabric Mesh 2018-09-01-preview release. --- .../serviceFabricMeshManagement/README.md | 6 +- .../addRemoveReplicaScalingMechanism.js | 89 + .../lib/models/applicationProperties.js | 87 +- .../models/applicationResourceDescription.js | 99 +- .../lib/models/applicationScopedVolume.js | 87 + ...plicationScopedVolumeCreationParameters.js | 66 + ...eationParametersServiceFabricVolumeDisk.js | 78 + .../lib/models/autoScalingMechanism.js | 59 + .../lib/models/autoScalingMetric.js | 59 + .../lib/models/autoScalingPolicy.js | 84 + .../lib/models/autoScalingResourceMetric.js | 70 + .../lib/models/autoScalingTrigger.js | 58 + .../lib/models/averageLoadScalingTrigger.js | 107 + .../models/containerCodePackageProperties.js | 70 +- .../lib/models/containerLogs.js | 4 +- .../lib/models/endpointRef.js | 52 + .../lib/models/errorDetailsModel.js | 60 + .../lib/models/errorErrorModel.js | 84 + .../lib/models/errorModel.js | 23 +- .../lib/models/gatewayDestination.js | 69 + .../lib/models/gatewayProperties.js | 140 + .../lib/models/gatewayResourceDescription.js | 198 ++ .../models/gatewayResourceDescriptionList.js | 67 + .../lib/models/httpConfig.js | 77 + .../lib/models/httpHostConfig.js | 70 + .../lib/models/httpRouteConfig.js | 84 + .../lib/models/httpRouteMatchHeader.js | 69 + .../lib/models/httpRouteMatchPath.js | 69 + .../lib/models/httpRouteMatchRule.js | 73 + .../lib/models/imageRegistryCredential.js | 4 +- .../lib/models/index.d.ts | 1466 ++++++--- .../lib/models/index.js | 109 +- .../inlinedValueSecretResourceProperties.js | 103 + .../models/localNetworkResourceProperties.js | 102 + .../lib/models/networkRef.js | 19 +- .../lib/models/networkResourceDescription.js | 58 +- .../lib/models/networkResourceProperties.js | 97 + .../models/networkResourcePropertiesBase.js | 71 + .../lib/models/proxyResource.js | 7 - .../lib/models/reliableCollectionsRef.js | 64 + .../lib/models/resource.js | 8 - .../lib/models/resourceRequests.js | 1 - .../lib/models/secretResourceDescription.js | 117 + .../models/secretResourceDescriptionList.js | 67 + .../lib/models/secretResourceProperties.js | 107 + .../models/secretResourcePropertiesBase.js | 70 + .../lib/models/secretValue.js | 52 + .../lib/models/secretValueProperties.js | 52 + .../models/secretValueResourceDescription.js | 111 + .../secretValueResourceDescriptionList.js | 68 + .../lib/models/serviceProperties.js | 119 + .../lib/models/serviceReplicaDescription.js | 6 +- .../models/serviceReplicaDescriptionList.js | 67 + .../lib/models/serviceReplicaProperties.js | 5 +- .../lib/models/serviceResourceDescription.js | 67 +- .../models/serviceResourceDescriptionList.js | 67 + .../lib/models/setting.js | 4 +- .../lib/models/tcpConfig.js | 77 + .../lib/models/trackedResource.js | 15 +- .../lib/models/volumeProperties.js | 22 +- .../lib/models/volumeReference.js | 70 + .../lib/models/volumeResourceDescription.js | 34 +- .../lib/operations/application.js | 253 +- .../lib/operations/codePackage.js | 69 +- .../lib/operations/gateway.js | 1758 +++++++++++ .../lib/operations/index.d.ts | 2778 +++++++++++++---- .../lib/operations/index.js | 11 +- .../lib/operations/network.js | 256 +- .../lib/operations/secret.js | 1731 ++++++++++ .../lib/operations/secretValueOperations.js | 1569 ++++++++++ .../lib/operations/service.js | 206 +- .../lib/operations/serviceReplica.js | 774 +++++ .../lib/operations/volume.js | 199 +- .../serviceFabricMeshManagementClient.d.ts | 11 +- .../lib/serviceFabricMeshManagementClient.js | 13 +- .../serviceFabricMeshManagement/package.json | 2 +- 76 files changed, 13236 insertions(+), 1858 deletions(-) create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/addRemoveReplicaScalingMechanism.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolume.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParameters.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/autoScalingMechanism.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/autoScalingMetric.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/autoScalingPolicy.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/autoScalingResourceMetric.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/autoScalingTrigger.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/averageLoadScalingTrigger.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/endpointRef.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/errorDetailsModel.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/errorErrorModel.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/gatewayDestination.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/gatewayProperties.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescription.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescriptionList.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/httpConfig.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/httpHostConfig.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/httpRouteConfig.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchHeader.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchPath.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchRule.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/inlinedValueSecretResourceProperties.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/localNetworkResourceProperties.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/networkResourceProperties.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/networkResourcePropertiesBase.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/reliableCollectionsRef.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescription.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescriptionList.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretResourceProperties.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretResourcePropertiesBase.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretValue.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretValueProperties.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescription.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescriptionList.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/serviceProperties.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescriptionList.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescriptionList.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/tcpConfig.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/models/volumeReference.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/operations/gateway.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/operations/secret.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/operations/secretValueOperations.js create mode 100644 lib/services/serviceFabricMeshManagement/lib/operations/serviceReplica.js diff --git a/lib/services/serviceFabricMeshManagement/README.md b/lib/services/serviceFabricMeshManagement/README.md index 5237987aef..450a152cf4 100644 --- a/lib/services/serviceFabricMeshManagement/README.md +++ b/lib/services/serviceFabricMeshManagement/README.md @@ -18,7 +18,7 @@ npm install azure-arm-servicefabricmesh ## How to use -### Authentication, client creation and get application as an example. +### Authentication, client creation and list operations as an example. ```javascript const msRestAzure = require("ms-rest-azure"); @@ -26,9 +26,7 @@ const ServiceFabricMeshManagementClient = require("azure-arm-servicefabricmesh") msRestAzure.interactiveLogin().then((creds) => { const subscriptionId = ""; const client = new ServiceFabricMeshManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const applicationName = "testapplicationName"; - return client.application.get(resourceGroupName, applicationName).then((result) => { + return client.operations.list().then((result) => { console.log("The result is:"); console.log(result); }); diff --git a/lib/services/serviceFabricMeshManagement/lib/models/addRemoveReplicaScalingMechanism.js b/lib/services/serviceFabricMeshManagement/lib/models/addRemoveReplicaScalingMechanism.js new file mode 100644 index 0000000000..c6b053ceae --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/addRemoveReplicaScalingMechanism.js @@ -0,0 +1,89 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes the horizontal auto scaling mechanism that adds or removes + * replicas (containers or container groups). + * + * @extends models['AutoScalingMechanism'] + */ +class AddRemoveReplicaScalingMechanism extends models['AutoScalingMechanism'] { + /** + * Create a AddRemoveReplicaScalingMechanism. + * @member {number} minCount Minimum number of containers (scale down won't + * be performed below this number). + * @member {number} maxCount Maximum number of containers (scale up won't be + * performed above this number). + * @member {number} scaleIncrement Each time auto scaling is performed, this + * number of containers will be added or removed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AddRemoveReplicaScalingMechanism + * + * @returns {object} metadata of AddRemoveReplicaScalingMechanism + * + */ + mapper() { + return { + required: false, + serializedName: 'AddRemoveReplica', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMechanism', + className: 'AddRemoveReplicaScalingMechanism', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + minCount: { + required: true, + serializedName: 'minCount', + type: { + name: 'Number' + } + }, + maxCount: { + required: true, + serializedName: 'maxCount', + type: { + name: 'Number' + } + }, + scaleIncrement: { + required: true, + serializedName: 'scaleIncrement', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AddRemoveReplicaScalingMechanism; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/applicationProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/applicationProperties.js index 122768b207..1664826eda 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/applicationProperties.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/applicationProperties.js @@ -11,7 +11,7 @@ 'use strict'; /** - * This type describes properties of an application resource. + * Describes properties of a application resource. * */ class ApplicationProperties { @@ -19,20 +19,10 @@ class ApplicationProperties { * Create a ApplicationProperties. * @member {string} [description] User readable description of the * application. - * @member {string} [debugParams] Internal use. - * @member {array} [services] describes the services in the application. - * @member {string} [healthState] Describes the health state of an - * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', - * 'Error', 'Unknown' - * @member {string} [unhealthyEvaluation] When the application's health state - * is not 'Ok', this additional details from service fabric Health Manager - * for the user to know why the application is marked unhealthy. - * @member {string} [status] Status of the application resource. Possible - * values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', - * 'Failed' - * @member {string} [statusDetails] Gives additional information about the - * current status of the application deployment. - * @member {array} [serviceNames] Names of the services in the application. + * @member {array} [services] Describes the services in the application. This + * property is used to create or modify services of the application. On get + * only the name of the service is returned. The service description can be + * obtained by querying for the service resource. * @member {object} [diagnostics] Describes the diagnostics definition and * usage for an application resource. * @member {array} [diagnostics.sinks] List of supported sinks that can be @@ -42,6 +32,19 @@ class ApplicationProperties { * @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if * diagnostics is enabled. Sink choices can be overridden at the service and * code package level. + * @member {string} [debugParams] Internal - used by Visual Studio to setup + * the debugging session on the local development environment. + * @member {array} [serviceNames] Names of the services in the application. + * @member {string} [status] Status of the application. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the application. + * @member {string} [healthState] Describes the health state of an + * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' + * @member {string} [unhealthyEvaluation] When the application's health state + * is not 'Ok', this additional details from service fabric Health Manager + * for the user to know why the application is marked unhealthy. */ constructor() { } @@ -67,13 +70,6 @@ class ApplicationProperties { name: 'String' } }, - debugParams: { - required: false, - serializedName: 'debugParams', - type: { - name: 'String' - } - }, services: { required: false, serializedName: 'services', @@ -89,20 +85,34 @@ class ApplicationProperties { } } }, - healthState: { + diagnostics: { required: false, - readOnly: true, - serializedName: 'healthState', + serializedName: 'diagnostics', + type: { + name: 'Composite', + className: 'DiagnosticsDescription' + } + }, + debugParams: { + required: false, + serializedName: 'debugParams', type: { name: 'String' } }, - unhealthyEvaluation: { + serviceNames: { required: false, readOnly: true, - serializedName: 'unhealthyEvaluation', + serializedName: 'serviceNames', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } } }, status: { @@ -121,27 +131,20 @@ class ApplicationProperties { name: 'String' } }, - serviceNames: { + healthState: { required: false, readOnly: true, - serializedName: 'serviceNames', + serializedName: 'healthState', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' } }, - diagnostics: { + unhealthyEvaluation: { required: false, - serializedName: 'diagnostics', + readOnly: true, + serializedName: 'unhealthyEvaluation', type: { - name: 'Composite', - className: 'DiagnosticsDescription' + name: 'String' } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/applicationResourceDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/applicationResourceDescription.js index 67560b8e4f..bd83837fbd 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/applicationResourceDescription.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/applicationResourceDescription.js @@ -23,20 +23,10 @@ class ApplicationResourceDescription extends models['TrackedResource'] { * @member {string} [provisioningState] State of the resource. * @member {string} [description] User readable description of the * application. - * @member {string} [debugParams] Internal use. - * @member {array} [services] describes the services in the application. - * @member {string} [healthState] Describes the health state of an - * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', - * 'Error', 'Unknown' - * @member {string} [unhealthyEvaluation] When the application's health state - * is not 'Ok', this additional details from service fabric Health Manager - * for the user to know why the application is marked unhealthy. - * @member {string} [status] Status of the application resource. Possible - * values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', - * 'Failed' - * @member {string} [statusDetails] Gives additional information about the - * current status of the application deployment. - * @member {array} [serviceNames] Names of the services in the application. + * @member {array} [services] Describes the services in the application. This + * property is used to create or modify services of the application. On get + * only the name of the service is returned. The service description can be + * obtained by querying for the service resource. * @member {object} [diagnostics] Describes the diagnostics definition and * usage for an application resource. * @member {array} [diagnostics.sinks] List of supported sinks that can be @@ -46,6 +36,19 @@ class ApplicationResourceDescription extends models['TrackedResource'] { * @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if * diagnostics is enabled. Sink choices can be overridden at the service and * code package level. + * @member {string} [debugParams] Internal - used by Visual Studio to setup + * the debugging session on the local development environment. + * @member {array} [serviceNames] Names of the services in the application. + * @member {string} [status] Status of the application. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the application. + * @member {string} [healthState] Describes the health state of an + * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' + * @member {string} [unhealthyEvaluation] When the application's health state + * is not 'Ok', this additional details from service fabric Health Manager + * for the user to know why the application is marked unhealthy. */ constructor() { super(); @@ -89,13 +92,6 @@ class ApplicationResourceDescription extends models['TrackedResource'] { name: 'String' } }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -110,6 +106,13 @@ class ApplicationResourceDescription extends models['TrackedResource'] { } } }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, @@ -125,13 +128,6 @@ class ApplicationResourceDescription extends models['TrackedResource'] { name: 'String' } }, - debugParams: { - required: false, - serializedName: 'properties.debugParams', - type: { - name: 'String' - } - }, services: { required: false, serializedName: 'properties.services', @@ -147,20 +143,34 @@ class ApplicationResourceDescription extends models['TrackedResource'] { } } }, - healthState: { + diagnostics: { required: false, - readOnly: true, - serializedName: 'properties.healthState', + serializedName: 'properties.diagnostics', + type: { + name: 'Composite', + className: 'DiagnosticsDescription' + } + }, + debugParams: { + required: false, + serializedName: 'properties.debugParams', type: { name: 'String' } }, - unhealthyEvaluation: { + serviceNames: { required: false, readOnly: true, - serializedName: 'properties.unhealthyEvaluation', + serializedName: 'properties.serviceNames', type: { - name: 'String' + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } } }, status: { @@ -179,27 +189,20 @@ class ApplicationResourceDescription extends models['TrackedResource'] { name: 'String' } }, - serviceNames: { + healthState: { required: false, readOnly: true, - serializedName: 'properties.serviceNames', + serializedName: 'properties.healthState', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' } }, - diagnostics: { + unhealthyEvaluation: { required: false, - serializedName: 'properties.diagnostics', + readOnly: true, + serializedName: 'properties.unhealthyEvaluation', type: { - name: 'Composite', - className: 'DiagnosticsDescription' + name: 'String' } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolume.js b/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolume.js new file mode 100644 index 0000000000..0207af6a83 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolume.js @@ -0,0 +1,87 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes a volume whose lifetime is scoped to the application's lifetime. + * + * @extends models['VolumeReference'] + */ +class ApplicationScopedVolume extends models['VolumeReference'] { + /** + * Create a ApplicationScopedVolume. + * @member {object} creationParameters Describes parameters for creating + * application-scoped volumes. + * @member {string} [creationParameters.description] User readable + * description of the volume. + * @member {string} [creationParameters.kind] Polymorphic Discriminator + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationScopedVolume + * + * @returns {object} metadata of ApplicationScopedVolume + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationScopedVolume', + type: { + name: 'Composite', + className: 'ApplicationScopedVolume', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + readOnly: { + required: false, + serializedName: 'readOnly', + type: { + name: 'Boolean' + } + }, + destinationPath: { + required: true, + serializedName: 'destinationPath', + type: { + name: 'String' + } + }, + creationParameters: { + required: true, + serializedName: 'creationParameters', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ApplicationScopedVolumeCreationParameters', + className: 'ApplicationScopedVolumeCreationParameters' + } + } + } + } + }; + } +} + +module.exports = ApplicationScopedVolume; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParameters.js b/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParameters.js new file mode 100644 index 0000000000..1d8bc07483 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParameters.js @@ -0,0 +1,66 @@ +/* + * 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'; + +/** + * Describes parameters for creating application-scoped volumes. + * + */ +class ApplicationScopedVolumeCreationParameters { + /** + * Create a ApplicationScopedVolumeCreationParameters. + * @member {string} [description] User readable description of the volume. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of ApplicationScopedVolumeCreationParameters + * + * @returns {object} metadata of ApplicationScopedVolumeCreationParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationScopedVolumeCreationParameters', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ApplicationScopedVolumeCreationParameters', + className: 'ApplicationScopedVolumeCreationParameters', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationScopedVolumeCreationParameters; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js b/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js new file mode 100644 index 0000000000..9d7495092b --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/applicationScopedVolumeCreationParametersServiceFabricVolumeDisk.js @@ -0,0 +1,78 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes parameters for creating application-scoped volumes provided by + * Service Fabric Volume Disks + * + * @extends models['ApplicationScopedVolumeCreationParameters'] + */ +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk extends models['ApplicationScopedVolumeCreationParameters'] { + /** + * Create a ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. + * @member {string} sizeDisk Volume size. Possible values include: 'Small', + * 'Medium', 'Large' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + * + * @returns {object} metadata of ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceFabricVolumeDisk', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ApplicationScopedVolumeCreationParameters', + className: 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + sizeDisk: { + required: true, + serializedName: 'sizeDisk', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/autoScalingMechanism.js b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingMechanism.js new file mode 100644 index 0000000000..ec63339be2 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingMechanism.js @@ -0,0 +1,59 @@ +/* + * 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'; + +/** + * Describes the mechanism for performing auto scaling operation. Derived + * classes will describe the actual mechanism. + * + */ +class AutoScalingMechanism { + /** + * Create a AutoScalingMechanism. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingMechanism + * + * @returns {object} metadata of AutoScalingMechanism + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingMechanism', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMechanism', + className: 'AutoScalingMechanism', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingMechanism; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/autoScalingMetric.js b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingMetric.js new file mode 100644 index 0000000000..0e3aeef77a --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingMetric.js @@ -0,0 +1,59 @@ +/* + * 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'; + +/** + * Describes the metric that is used for triggering auto scaling operation. + * Derived classes will describe resources or metrics. + * + */ +class AutoScalingMetric { + /** + * Create a AutoScalingMetric. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingMetric + * + * @returns {object} metadata of AutoScalingMetric + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingMetric', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMetric', + className: 'AutoScalingMetric', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingMetric; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/autoScalingPolicy.js b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingPolicy.js new file mode 100644 index 0000000000..5c95922d57 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingPolicy.js @@ -0,0 +1,84 @@ +/* + * 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'; + +/** + * Describes the auto scaling policy + * + */ +class AutoScalingPolicy { + /** + * Create a AutoScalingPolicy. + * @member {string} name The name of the auto scaling policy. + * @member {object} trigger Determines when auto scaling operation will be + * invoked. + * @member {string} [trigger.kind] Polymorphic Discriminator + * @member {object} mechanism The mechanism that is used to scale when auto + * scaling operation is invoked. + * @member {string} [mechanism.kind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingPolicy + * + * @returns {object} metadata of AutoScalingPolicy + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingPolicy', + type: { + name: 'Composite', + className: 'AutoScalingPolicy', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + trigger: { + required: true, + serializedName: 'trigger', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingTrigger', + className: 'AutoScalingTrigger' + } + }, + mechanism: { + required: true, + serializedName: 'mechanism', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMechanism', + className: 'AutoScalingMechanism' + } + } + } + } + }; + } +} + +module.exports = AutoScalingPolicy; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/autoScalingResourceMetric.js b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingResourceMetric.js new file mode 100644 index 0000000000..9815007d49 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingResourceMetric.js @@ -0,0 +1,70 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes the resource that is used for triggering auto scaling. + * + * @extends models['AutoScalingMetric'] + */ +class AutoScalingResourceMetric extends models['AutoScalingMetric'] { + /** + * Create a AutoScalingResourceMetric. + * @member {string} name Name of the resource. Possible values include: + * 'cpu', 'memoryInGB' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AutoScalingResourceMetric + * + * @returns {object} metadata of AutoScalingResourceMetric + * + */ + mapper() { + return { + required: false, + serializedName: 'Resource', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMetric', + className: 'AutoScalingResourceMetric', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingResourceMetric; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/autoScalingTrigger.js b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingTrigger.js new file mode 100644 index 0000000000..90313cc8ab --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/autoScalingTrigger.js @@ -0,0 +1,58 @@ +/* + * 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'; + +/** + * Describes the trigger for performing auto scaling operation. + * + */ +class AutoScalingTrigger { + /** + * Create a AutoScalingTrigger. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of AutoScalingTrigger + * + * @returns {object} metadata of AutoScalingTrigger + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoScalingTrigger', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingTrigger', + className: 'AutoScalingTrigger', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AutoScalingTrigger; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/averageLoadScalingTrigger.js b/lib/services/serviceFabricMeshManagement/lib/models/averageLoadScalingTrigger.js new file mode 100644 index 0000000000..b337db37ba --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/averageLoadScalingTrigger.js @@ -0,0 +1,107 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes the average load trigger used for auto scaling. + * + * @extends models['AutoScalingTrigger'] + */ +class AverageLoadScalingTrigger extends models['AutoScalingTrigger'] { + /** + * Create a AverageLoadScalingTrigger. + * @member {object} metric Description of the metric that is used for + * scaling. + * @member {string} [metric.kind] Polymorphic Discriminator + * @member {number} lowerLoadThreshold Lower load threshold (if average load + * is below this threshold, service will scale down). + * @member {number} upperLoadThreshold Upper load threshold (if average load + * is above this threshold, service will scale up). + * @member {number} scaleIntervalInSeconds Scale interval that indicates how + * often will this trigger be checked. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AverageLoadScalingTrigger + * + * @returns {object} metadata of AverageLoadScalingTrigger + * + */ + mapper() { + return { + required: false, + serializedName: 'AverageLoad', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingTrigger', + className: 'AverageLoadScalingTrigger', + modelProperties: { + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + metric: { + required: true, + serializedName: 'metric', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'AutoScalingMetric', + className: 'AutoScalingMetric' + } + }, + lowerLoadThreshold: { + required: true, + serializedName: 'lowerLoadThreshold', + type: { + name: 'Number' + } + }, + upperLoadThreshold: { + required: true, + serializedName: 'upperLoadThreshold', + type: { + name: 'Number' + } + }, + scaleIntervalInSeconds: { + required: true, + serializedName: 'scaleIntervalInSeconds', + constraints: { + InclusiveMinimum: 60 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AverageLoadScalingTrigger; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/containerCodePackageProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/containerCodePackageProperties.js index fd9c7a00ba..78a36b3f0a 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/containerCodePackageProperties.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/containerCodePackageProperties.js @@ -25,7 +25,8 @@ class ContainerCodePackageProperties { * @member {string} [imageRegistryCredential.username] The username for the * private registry. * @member {string} [imageRegistryCredential.password] The password for the - * private registry. + * private registry. The password is required for create or update + * operations, however it is not returned in the get or list operations. * @member {string} [entrypoint] Override for the default entry point in the * container. * @member {array} [commands] Command array to execute within the container @@ -38,8 +39,7 @@ class ContainerCodePackageProperties { * path for Linux container is "/var/secrets". * @member {array} [labels] The labels to set in this container. * @member {array} [endpoints] The endpoints exposed by this container. - * @member {object} resources This type describes the resource requirements - * for a container or a service. + * @member {object} resources The resources required by this container. * @member {object} [resources.requests] Describes the requested resources * for a given container. * @member {number} [resources.requests.memoryInGB] The memory request in GB @@ -51,7 +51,19 @@ class ContainerCodePackageProperties { * @member {number} [resources.limits.memoryInGB] The memory limit in GB. * @member {number} [resources.limits.cpu] CPU limits in cores. At present, * only full cores are supported. - * @member {array} [volumeRefs] The volumes to be attached to the container. + * @member {array} [volumeRefs] Volumes to be attached to the container. The + * lifetime of these volumes is independent of the application's lifetime. + * @member {array} [volumes] Volumes to be attached to the container. The + * lifetime of these volumes is scoped to the application's lifetime. + * @member {object} [diagnostics] Reference to sinks in + * DiagnosticsDescription. + * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are + * enabled. + * @member {array} [diagnostics.sinkRefs] List of sinks to be used if + * enabled. References the list of sinks in DiagnosticsDescription. + * @member {array} [reliableCollectionsRefs] A list of ReliableCollection + * resources used by this particular code package. Please refer to + * ReliablecollectionsRef for more details. * @member {object} [instanceView] Runtime information of a container * instance. * @member {number} [instanceView.restartCount] The number of times the @@ -82,12 +94,6 @@ class ContainerCodePackageProperties { * status of this state. * @member {array} [instanceView.events] The events of this container * instance. - * @member {object} [diagnostics] Reference to sinks in - * DiagnosticsDescription. - * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are - * enabled. - * @member {array} [diagnostics.sinkRefs] List of sinks to be used if - * enabled. References the list of sinks in DiagnosticsDescription. */ constructor() { } @@ -224,21 +230,27 @@ class ContainerCodePackageProperties { name: 'Sequence', element: { required: false, - serializedName: 'ContainerVolumeElementType', + serializedName: 'VolumeReferenceElementType', type: { name: 'Composite', - className: 'ContainerVolume' + className: 'VolumeReference' } } } }, - instanceView: { + volumes: { required: false, - readOnly: true, - serializedName: 'instanceView', + serializedName: 'volumes', type: { - name: 'Composite', - className: 'ContainerInstanceView' + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplicationScopedVolumeElementType', + type: { + name: 'Composite', + className: 'ApplicationScopedVolume' + } + } } }, diagnostics: { @@ -248,6 +260,30 @@ class ContainerCodePackageProperties { name: 'Composite', className: 'DiagnosticsRef' } + }, + reliableCollectionsRefs: { + required: false, + serializedName: 'reliableCollectionsRefs', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReliableCollectionsRefElementType', + type: { + name: 'Composite', + className: 'ReliableCollectionsRef' + } + } + } + }, + instanceView: { + required: false, + readOnly: true, + serializedName: 'instanceView', + type: { + name: 'Composite', + className: 'ContainerInstanceView' + } } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/containerLogs.js b/lib/services/serviceFabricMeshManagement/lib/models/containerLogs.js index 68dbcd3e09..d19df89430 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/containerLogs.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/containerLogs.js @@ -11,13 +11,13 @@ 'use strict'; /** - * The logs of the container. + * Container logs. * */ class ContainerLogs { /** * Create a ContainerLogs. - * @member {string} [content] content of the log. + * @member {string} [content] Container logs. */ constructor() { } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/endpointRef.js b/lib/services/serviceFabricMeshManagement/lib/models/endpointRef.js new file mode 100644 index 0000000000..07697ba22c --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/endpointRef.js @@ -0,0 +1,52 @@ +/* + * 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'; + +/** + * Describes a reference to a service endpoint. + * + */ +class EndpointRef { + /** + * Create a EndpointRef. + * @member {string} [name] Name of the endpoint. + */ + constructor() { + } + + /** + * Defines the metadata of EndpointRef + * + * @returns {object} metadata of EndpointRef + * + */ + mapper() { + return { + required: false, + serializedName: 'EndpointRef', + type: { + name: 'Composite', + className: 'EndpointRef', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = EndpointRef; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/errorDetailsModel.js b/lib/services/serviceFabricMeshManagement/lib/models/errorDetailsModel.js new file mode 100644 index 0000000000..b3edab25c1 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/errorDetailsModel.js @@ -0,0 +1,60 @@ +/* + * 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'; + +/** + * Error model details information + * + */ +class ErrorDetailsModel { + /** + * Create a ErrorDetailsModel. + * @member {string} code + * @member {string} message Error message. + */ + constructor() { + } + + /** + * Defines the metadata of ErrorDetailsModel + * + * @returns {object} metadata of ErrorDetailsModel + * + */ + mapper() { + return { + required: false, + serializedName: 'ErrorDetailsModel', + type: { + name: 'Composite', + className: 'ErrorDetailsModel', + modelProperties: { + code: { + required: true, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: true, + serializedName: 'message', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ErrorDetailsModel; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/errorErrorModel.js b/lib/services/serviceFabricMeshManagement/lib/models/errorErrorModel.js new file mode 100644 index 0000000000..c711fc60c0 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/errorErrorModel.js @@ -0,0 +1,84 @@ +/* + * 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'; + +/** + * Error model information + * + */ +class ErrorErrorModel { + /** + * Create a ErrorErrorModel. + * @member {string} code + * @member {string} [message] Error message. + * @member {string} [innerError] + * @member {array} [details] List of error message details. + */ + constructor() { + } + + /** + * Defines the metadata of ErrorErrorModel + * + * @returns {object} metadata of ErrorErrorModel + * + */ + mapper() { + return { + required: false, + serializedName: 'ErrorErrorModel', + type: { + name: 'Composite', + className: 'ErrorErrorModel', + modelProperties: { + code: { + required: true, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: false, + serializedName: 'message', + type: { + name: 'String' + } + }, + innerError: { + required: false, + serializedName: 'innerError', + type: { + name: 'String' + } + }, + details: { + required: false, + serializedName: 'details', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ErrorDetailsModelElementType', + type: { + name: 'Composite', + className: 'ErrorDetailsModel' + } + } + } + } + } + } + }; + } +} + +module.exports = ErrorErrorModel; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/errorModel.js b/lib/services/serviceFabricMeshManagement/lib/models/errorModel.js index edfcafabc8..fbdec6ac0b 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/errorModel.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/errorModel.js @@ -17,8 +17,11 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} [code] The error code. - * @member {string} [message] The error message. + * @member {object} error Error model information + * @member {string} [error.code] + * @member {string} [error.message] Error message. + * @member {string} [error.innerError] + * @member {array} [error.details] List of error message details. */ constructor() { } @@ -37,18 +40,12 @@ class ErrorModel { name: 'Composite', className: 'ErrorModel', modelProperties: { - code: { - required: false, - serializedName: 'code', + error: { + required: true, + serializedName: 'error', type: { - name: 'String' - } - }, - message: { - required: false, - serializedName: 'message', - type: { - name: 'String' + name: 'Composite', + className: 'ErrorErrorModel' } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/gatewayDestination.js b/lib/services/serviceFabricMeshManagement/lib/models/gatewayDestination.js new file mode 100644 index 0000000000..5190575a8f --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/gatewayDestination.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * Describes destination endpoint for routing traffic. + * + */ +class GatewayDestination { + /** + * Create a GatewayDestination. + * @member {string} applicationName Name of the service fabric Mesh + * application. + * @member {string} serviceName service that contains the endpoint. + * @member {string} endpointName name of the endpoint in the service. + */ + constructor() { + } + + /** + * Defines the metadata of GatewayDestination + * + * @returns {object} metadata of GatewayDestination + * + */ + mapper() { + return { + required: false, + serializedName: 'GatewayDestination', + type: { + name: 'Composite', + className: 'GatewayDestination', + modelProperties: { + applicationName: { + required: true, + serializedName: 'applicationName', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'serviceName', + type: { + name: 'String' + } + }, + endpointName: { + required: true, + serializedName: 'endpointName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GatewayDestination; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/gatewayProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/gatewayProperties.js new file mode 100644 index 0000000000..45ea465856 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/gatewayProperties.js @@ -0,0 +1,140 @@ +/* + * 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'; + +/** + * Describes properties of a gateway resource. + * + */ +class GatewayProperties { + /** + * Create a GatewayProperties. + * @member {string} [description] User readable description of the gateway. + * @member {object} sourceNetwork Network the gateway should listen on for + * requests. + * @member {string} [sourceNetwork.name] Name of the network + * @member {array} [sourceNetwork.endpointRefs] A list of endpoints that are + * exposed on this network. + * @member {object} destinationNetwork Network that the Application is using. + * @member {string} [destinationNetwork.name] Name of the network + * @member {array} [destinationNetwork.endpointRefs] A list of endpoints that + * are exposed on this network. + * @member {array} [tcp] Configuration for tcp connectivity for this gateway. + * @member {array} [http] Configuration for http connectivity for this + * gateway. + * @member {string} [status] Status of the resource. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the gateway. + * @member {string} [ipAddress] IP address of the gateway. This is populated + * in the response and is ignored for incoming requests. + */ + constructor() { + } + + /** + * Defines the metadata of GatewayProperties + * + * @returns {object} metadata of GatewayProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'GatewayProperties', + type: { + name: 'Composite', + className: 'GatewayProperties', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + sourceNetwork: { + required: true, + serializedName: 'sourceNetwork', + type: { + name: 'Composite', + className: 'NetworkRef' + } + }, + destinationNetwork: { + required: true, + serializedName: 'destinationNetwork', + type: { + name: 'Composite', + className: 'NetworkRef' + } + }, + tcp: { + required: false, + serializedName: 'tcp', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'TcpConfigElementType', + type: { + name: 'Composite', + className: 'TcpConfig' + } + } + } + }, + http: { + required: false, + serializedName: 'http', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpConfigElementType', + type: { + name: 'Composite', + className: 'HttpConfig' + } + } + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + ipAddress: { + required: false, + readOnly: true, + serializedName: 'ipAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GatewayProperties; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescription.js new file mode 100644 index 0000000000..e3c4a8de23 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescription.js @@ -0,0 +1,198 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * This type describes a gateway resource. + * + * @extends models['TrackedResource'] + */ +class GatewayResourceDescription extends models['TrackedResource'] { + /** + * Create a GatewayResourceDescription. + * @member {string} [provisioningState] State of the resource. + * @member {string} [description] User readable description of the gateway. + * @member {object} sourceNetwork Network the gateway should listen on for + * requests. + * @member {string} [sourceNetwork.name] Name of the network + * @member {array} [sourceNetwork.endpointRefs] A list of endpoints that are + * exposed on this network. + * @member {object} destinationNetwork Network that the Application is using. + * @member {string} [destinationNetwork.name] Name of the network + * @member {array} [destinationNetwork.endpointRefs] A list of endpoints that + * are exposed on this network. + * @member {array} [tcp] Configuration for tcp connectivity for this gateway. + * @member {array} [http] Configuration for http connectivity for this + * gateway. + * @member {string} [status] Status of the resource. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the gateway. + * @member {string} [ipAddress] IP address of the gateway. This is populated + * in the response and is ignored for incoming requests. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GatewayResourceDescription + * + * @returns {object} metadata of GatewayResourceDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'GatewayResourceDescription', + type: { + name: 'Composite', + className: 'GatewayResourceDescription', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + sourceNetwork: { + required: true, + serializedName: 'properties.sourceNetwork', + type: { + name: 'Composite', + className: 'NetworkRef' + } + }, + destinationNetwork: { + required: true, + serializedName: 'properties.destinationNetwork', + type: { + name: 'Composite', + className: 'NetworkRef' + } + }, + tcp: { + required: false, + serializedName: 'properties.tcp', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'TcpConfigElementType', + type: { + name: 'Composite', + className: 'TcpConfig' + } + } + } + }, + http: { + required: false, + serializedName: 'properties.http', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpConfigElementType', + type: { + name: 'Composite', + className: 'HttpConfig' + } + } + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'properties.statusDetails', + type: { + name: 'String' + } + }, + ipAddress: { + required: false, + readOnly: true, + serializedName: 'properties.ipAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GatewayResourceDescription; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescriptionList.js b/lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescriptionList.js new file mode 100644 index 0000000000..3f29df65ff --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/gatewayResourceDescriptionList.js @@ -0,0 +1,67 @@ +/* + * 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'; + +/** + * A pageable list of gateway resources. + */ +class GatewayResourceDescriptionList extends Array { + /** + * Create a GatewayResourceDescriptionList. + * @member {string} [nextLink] URI to fetch the next page of the list. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GatewayResourceDescriptionList + * + * @returns {object} metadata of GatewayResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'GatewayResourceDescriptionList', + type: { + name: 'Composite', + className: 'GatewayResourceDescriptionList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GatewayResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'GatewayResourceDescription' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GatewayResourceDescriptionList; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/httpConfig.js b/lib/services/serviceFabricMeshManagement/lib/models/httpConfig.js new file mode 100644 index 0000000000..43018529a5 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/httpConfig.js @@ -0,0 +1,77 @@ +/* + * 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'; + +/** + * Describes the http configuration for external connectivity for this network. + * + */ +class HttpConfig { + /** + * Create a HttpConfig. + * @member {string} name http gateway config name. + * @member {number} port Specifies the port at which the service endpoint + * below needs to be exposed. + * @member {array} hosts description for routing. + */ + constructor() { + } + + /** + * Defines the metadata of HttpConfig + * + * @returns {object} metadata of HttpConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpConfig', + type: { + name: 'Composite', + className: 'HttpConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + port: { + required: true, + serializedName: 'port', + type: { + name: 'Number' + } + }, + hosts: { + required: true, + serializedName: 'hosts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpHostConfigElementType', + type: { + name: 'Composite', + className: 'HttpHostConfig' + } + } + } + } + } + } + }; + } +} + +module.exports = HttpConfig; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/httpHostConfig.js b/lib/services/serviceFabricMeshManagement/lib/models/httpHostConfig.js new file mode 100644 index 0000000000..9a7f8756cd --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/httpHostConfig.js @@ -0,0 +1,70 @@ +/* + * 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'; + +/** + * Describes the hostname properties for http routing. + * + */ +class HttpHostConfig { + /** + * Create a HttpHostConfig. + * @member {string} name http hostname config name. + * @member {array} routes Route information to use for routing. Routes are + * processed in the order they are specified. Specify routes that are more + * specific before routes that can hamdle general cases. + */ + constructor() { + } + + /** + * Defines the metadata of HttpHostConfig + * + * @returns {object} metadata of HttpHostConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpHostConfig', + type: { + name: 'Composite', + className: 'HttpHostConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + routes: { + required: true, + serializedName: 'routes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpRouteConfigElementType', + type: { + name: 'Composite', + className: 'HttpRouteConfig' + } + } + } + } + } + } + }; + } +} + +module.exports = HttpHostConfig; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/httpRouteConfig.js b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteConfig.js new file mode 100644 index 0000000000..8ebd708054 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteConfig.js @@ -0,0 +1,84 @@ +/* + * 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'; + +/** + * Describes the hostname properties for http routing. + * + */ +class HttpRouteConfig { + /** + * Create a HttpRouteConfig. + * @member {string} name http route name. + * @member {object} match Describes a rule for http route matching. + * @member {object} [match.path] Path to match for routing. + * @member {string} [match.path.value] Uri path to match for request. + * @member {string} [match.path.rewrite] replacement string for matched part + * of the Uri. + * @member {array} [match.headers] headers and their values to match in + * request. + * @member {object} destination Describes destination endpoint for routing + * traffic. + * @member {string} [destination.applicationName] Name of the service fabric + * Mesh application. + * @member {string} [destination.serviceName] service that contains the + * endpoint. + * @member {string} [destination.endpointName] name of the endpoint in the + * service. + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteConfig + * + * @returns {object} metadata of HttpRouteConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteConfig', + type: { + name: 'Composite', + className: 'HttpRouteConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + match: { + required: true, + serializedName: 'match', + defaultValue: {}, + type: { + name: 'Composite', + className: 'HttpRouteMatchRule' + } + }, + destination: { + required: true, + serializedName: 'destination', + type: { + name: 'Composite', + className: 'GatewayDestination' + } + } + } + } + }; + } +} + +module.exports = HttpRouteConfig; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchHeader.js b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchHeader.js new file mode 100644 index 0000000000..3596108399 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchHeader.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * Describes header information for http route matching. + * + */ +class HttpRouteMatchHeader { + /** + * Create a HttpRouteMatchHeader. + * @member {string} name Name of header to match in request. + * @member {string} [value] Value of header to match in request. + * @member {string} [type] how to match header value. Possible values + * include: 'exact' + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteMatchHeader + * + * @returns {object} metadata of HttpRouteMatchHeader + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteMatchHeader', + type: { + name: 'Composite', + className: 'HttpRouteMatchHeader', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + }, + type: { + required: false, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = HttpRouteMatchHeader; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchPath.js b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchPath.js new file mode 100644 index 0000000000..aaaa860d31 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchPath.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * Path to match for routing. + * + */ +class HttpRouteMatchPath { + /** + * Create a HttpRouteMatchPath. + * @member {string} value Uri path to match for request. + * @member {string} [rewrite] replacement string for matched part of the Uri. + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteMatchPath + * + * @returns {object} metadata of HttpRouteMatchPath + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteMatchPath', + type: { + name: 'Composite', + className: 'HttpRouteMatchPath', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'String' + } + }, + rewrite: { + required: false, + serializedName: 'rewrite', + type: { + name: 'String' + } + }, + type: { + required: true, + isConstant: true, + serializedName: 'type', + defaultValue: 'prefix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = HttpRouteMatchPath; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchRule.js b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchRule.js new file mode 100644 index 0000000000..4d0d1ef04e --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/httpRouteMatchRule.js @@ -0,0 +1,73 @@ +/* + * 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'; + +/** + * Describes a rule for http route matching. + * + */ +class HttpRouteMatchRule { + /** + * Create a HttpRouteMatchRule. + * @member {object} path Path to match for routing. + * @member {string} [path.value] Uri path to match for request. + * @member {string} [path.rewrite] replacement string for matched part of the + * Uri. + * @member {array} [headers] headers and their values to match in request. + */ + constructor() { + } + + /** + * Defines the metadata of HttpRouteMatchRule + * + * @returns {object} metadata of HttpRouteMatchRule + * + */ + mapper() { + return { + required: false, + serializedName: 'HttpRouteMatchRule', + type: { + name: 'Composite', + className: 'HttpRouteMatchRule', + modelProperties: { + path: { + required: true, + serializedName: 'path', + defaultValue: {}, + type: { + name: 'Composite', + className: 'HttpRouteMatchPath' + } + }, + headers: { + required: false, + serializedName: 'headers', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HttpRouteMatchHeaderElementType', + type: { + name: 'Composite', + className: 'HttpRouteMatchHeader' + } + } + } + } + } + } + }; + } +} + +module.exports = HttpRouteMatchRule; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/imageRegistryCredential.js b/lib/services/serviceFabricMeshManagement/lib/models/imageRegistryCredential.js index f4d7693a3c..560c81d519 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/imageRegistryCredential.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/imageRegistryCredential.js @@ -20,7 +20,9 @@ class ImageRegistryCredential { * @member {string} server Docker image registry server, without protocol * such as `http` and `https`. * @member {string} username The username for the private registry. - * @member {string} [password] The password for the private registry. + * @member {string} [password] The password for the private registry. The + * password is required for create or update operations, however it is not + * returned in the get or list operations. */ constructor() { } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/index.d.ts b/lib/services/serviceFabricMeshManagement/lib/models/index.d.ts index aa3276ec3a..4f0121af07 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/index.d.ts +++ b/lib/services/serviceFabricMeshManagement/lib/models/index.d.ts @@ -16,6 +16,110 @@ export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; +/** + * @class + * Initializes a new instance of the AvailableOperationDisplay class. + * @constructor + * An operation available at the listed Azure resource provider. + * + * @member {string} [provider] Name of the operation provider. + * @member {string} [resource] Name of the resource on which the operation is + * available. + * @member {string} [operation] Name of the available operation. + * @member {string} [description] Description of the available operation. + */ +export interface AvailableOperationDisplay { + provider?: string; + resource?: string; + operation?: string; + description?: string; +} + +/** + * @class + * Initializes a new instance of the ErrorDetailsModel class. + * @constructor + * Error model details information + * + * @member {string} code + * @member {string} message Error message. + */ +export interface ErrorDetailsModel { + code: string; + message: string; +} + +/** + * @class + * Initializes a new instance of the ErrorErrorModel class. + * @constructor + * Error model information + * + * @member {string} code + * @member {string} [message] Error message. + * @member {string} [innerError] + * @member {array} [details] List of error message details. + */ +export interface ErrorErrorModel { + code: string; + message?: string; + innerError?: string; + details?: ErrorDetailsModel[]; +} + +/** + * @class + * Initializes a new instance of the ErrorModel class. + * @constructor + * The error details. + * + * @member {object} error Error model information + * @member {string} [error.code] + * @member {string} [error.message] Error message. + * @member {string} [error.innerError] + * @member {array} [error.details] List of error message details. + */ +export interface ErrorModel { + error: ErrorErrorModel; +} + +/** + * @class + * Initializes a new instance of the OperationResult class. + * @constructor + * List of operations available at the listed Azure resource provider. + * + * @member {string} [name] The name of the operation. + * @member {object} [display] The object that represents the operation. + * @member {string} [display.provider] Name of the operation provider. + * @member {string} [display.resource] Name of the resource on which the + * operation is available. + * @member {string} [display.operation] Name of the available operation. + * @member {string} [display.description] Description of the available + * operation. + * @member {string} [origin] Origin result + * @member {string} [nextLink] The URL to use for getting the next set of + * results. + */ +export interface OperationResult { + name?: string; + display?: AvailableOperationDisplay; + origin?: string; + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the ProvisionedResourceProperties class. + * @constructor + * Describes common properties of a provisioned resource. + * + * @member {string} [provisioningState] State of the resource. + */ +export interface ProvisionedResourceProperties { + readonly provisioningState?: string; +} + /** * @class * Initializes a new instance of the Resource class. @@ -27,13 +131,11 @@ export { CloudError } from 'ms-rest-azure'; * @member {string} [name] The name of the resource * @member {string} [type] The type of the resource. Ex- * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - * @member {string} [location] The geo-location where the resource lives */ export interface Resource extends BaseResource { readonly id?: string; readonly name?: string; readonly type?: string; - location?: string; } /** @@ -76,112 +178,119 @@ export interface ManagedProxyResource extends BaseResource { * resource. * * @member {object} [tags] Resource tags. + * @member {string} location The geo-location where the resource lives */ export interface TrackedResource extends Resource { tags?: { [propertyName: string]: string }; + location: string; } /** * @class - * Initializes a new instance of the ProvisionedResourceProperties class. + * Initializes a new instance of the SecretResourcePropertiesBase class. * @constructor - * Describes common properties of a provisioned resource. + * This type describes the properties of a secret resource, including its kind. * - * @member {string} [provisioningState] State of the resource. + * @member {string} kind Polymorphic Discriminator */ -export interface ProvisionedResourceProperties { - readonly provisioningState?: string; +export interface SecretResourcePropertiesBase extends ProvisionedResourceProperties { + kind: string; } /** * @class - * Initializes a new instance of the Layer4IngressConfig class. + * Initializes a new instance of the SecretResourceProperties class. * @constructor - * Describes the layer4 configuration for public connectivity for this network. + * Describes the properties of a secret resource. * - * @member {string} [name] Layer4 ingress config name. - * @member {number} [publicPort] Specifies the public port at which the service - * endpoint below needs to be exposed. - * @member {string} [applicationName] The application name which contains the - * service to be exposed. - * @member {string} [serviceName] The service whose endpoint needs to be - * exposed at the public port. - * @member {string} [endpointName] The service endpoint that needs to be - * exposed. + * @member {string} [description] User readable description of the secret. + * @member {string} [status] Status of the resource. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the secret. + * @member {string} [contentType] The type of the content stored in the secret + * value. The value of this property is opaque to Service Fabric. Once set, the + * value of this property cannot be changed. */ -export interface Layer4IngressConfig { - name?: string; - publicPort?: number; - applicationName?: string; - serviceName?: string; - endpointName?: string; +export interface SecretResourceProperties extends SecretResourcePropertiesBase { + description?: string; + readonly status?: string; + readonly statusDetails?: string; + contentType?: string; } /** * @class - * Initializes a new instance of the IngressConfig class. + * Initializes a new instance of the InlinedValueSecretResourceProperties class. * @constructor - * Describes public connectivity configuration for the network. + * Describes the properties of a secret resource whose value is provided + * explicitly as plaintext. The secret resource may have multiple values, each + * being uniquely versioned. The secret value of each version is stored + * encrypted, and delivered as plaintext into the context of applications + * referencing it. * - * @member {string} [qosLevel] The QoS tier for ingress. Possible values - * include: 'Bronze' - * @member {array} [layer4] Configuration for layer4 public connectivity for - * this network. - * @member {string} [publicIPAddress] The public IP address for reaching this - * network. */ -export interface IngressConfig { - qosLevel?: string; - layer4?: Layer4IngressConfig[]; - readonly publicIPAddress?: string; +export interface InlinedValueSecretResourceProperties extends SecretResourceProperties { } /** * @class - * Initializes a new instance of the NetworkResourceDescription class. + * Initializes a new instance of the SecretResourceDescription class. * @constructor - * This type describes a network resource. + * This type describes a secret resource. * - * @member {string} [provisioningState] State of the resource. - * @member {string} [description] User readable description of the network. - * @member {string} addressPrefix the address prefix for this network. - * @member {object} [ingressConfig] Configuration for public connectivity for - * this network. - * @member {string} [ingressConfig.qosLevel] The QoS tier for ingress. Possible - * values include: 'Bronze' - * @member {array} [ingressConfig.layer4] Configuration for layer4 public - * connectivity for this network. - * @member {string} [ingressConfig.publicIPAddress] The public IP address for - * reaching this network. + * @member {object} properties Describes the properties of a secret resource. + * @member {string} [properties.description] User readable description of the + * secret. + * @member {string} [properties.status] Status of the resource. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [properties.statusDetails] Gives additional information + * about the current status of the secret. + * @member {string} [properties.contentType] The type of the content stored in + * the secret value. The value of this property is opaque to Service Fabric. + * Once set, the value of this property cannot be changed. */ -export interface NetworkResourceDescription extends TrackedResource { - readonly provisioningState?: string; - description?: string; - addressPrefix: string; - ingressConfig?: IngressConfig; +export interface SecretResourceDescription extends TrackedResource { + properties: SecretResourceProperties; } /** * @class - * Initializes a new instance of the NetworkProperties class. + * Initializes a new instance of the SecretValue class. * @constructor - * Describes a network. + * This type represents the unencrypted value of the secret. * - * @member {string} [description] User readable description of the network. - * @member {string} addressPrefix the address prefix for this network. - * @member {object} [ingressConfig] Configuration for public connectivity for - * this network. - * @member {string} [ingressConfig.qosLevel] The QoS tier for ingress. Possible - * values include: 'Bronze' - * @member {array} [ingressConfig.layer4] Configuration for layer4 public - * connectivity for this network. - * @member {string} [ingressConfig.publicIPAddress] The public IP address for - * reaching this network. - */ -export interface NetworkProperties { - description?: string; - addressPrefix: string; - ingressConfig?: IngressConfig; + * @member {string} [value] The actual value of the secret. + */ +export interface SecretValue { + value?: string; +} + +/** + * @class + * Initializes a new instance of the SecretValueProperties class. + * @constructor + * This type describes properties of secret value resource. + * + * @member {string} [value] The actual value of the secret. + */ +export interface SecretValueProperties { + value?: string; +} + +/** + * @class + * Initializes a new instance of the SecretValueResourceDescription class. + * @constructor + * This type describes a value of a secret resource. The name of this resource + * is the version identifier corresponding to this secret value. + * + * @member {string} [provisioningState] State of the resource. + * @member {string} [value] The actual value of the secret. + */ +export interface SecretValueResourceDescription extends TrackedResource { + readonly provisioningState?: string; + value?: string; } /** @@ -205,12 +314,15 @@ export interface VolumeProviderParametersAzureFile { /** * @class - * Initializes a new instance of the VolumeResourceDescription class. + * Initializes a new instance of the VolumeProperties class. * @constructor - * This type describes a volume resource. + * Describes properties of a volume resource. * - * @member {string} [provisioningState] State of the resource. * @member {string} [description] User readable description of the volume. + * @member {string} [status] Status of the volume. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the volume. * @member {object} [azureFileParameters] This type describes a volume provided * by an Azure Files file share. * @member {string} [azureFileParameters.accountName] Name of the Azure storage @@ -220,433 +332,436 @@ export interface VolumeProviderParametersAzureFile { * @member {string} [azureFileParameters.shareName] Name of the Azure Files * file share that provides storage for the volume. */ -export interface VolumeResourceDescription extends TrackedResource { - readonly provisioningState?: string; +export interface VolumeProperties { description?: string; + readonly status?: string; + readonly statusDetails?: string; azureFileParameters?: VolumeProviderParametersAzureFile; } /** * @class - * Initializes a new instance of the VolumeProperties class. + * Initializes a new instance of the VolumeReference class. * @constructor - * This type describes properties of a volume resource. + * Describes a reference to a volume resource. * - * @member {string} [description] User readable description of the volume. - * @member {object} [azureFileParameters] This type describes a volume provided - * by an Azure Files file share. - * @member {string} [azureFileParameters.accountName] Name of the Azure storage - * account for the File Share. - * @member {string} [azureFileParameters.accountKey] Access key of the Azure - * storage account for the File Share. - * @member {string} [azureFileParameters.shareName] Name of the Azure Files - * file share that provides storage for the volume. + * @member {string} name Name of the volume being referenced. + * @member {boolean} [readOnly] The flag indicating whether the volume is read + * only. Default is 'false'. + * @member {string} destinationPath The path within the container at which the + * volume should be mounted. Only valid path characters are allowed. */ -export interface VolumeProperties { - description?: string; - azureFileParameters?: VolumeProviderParametersAzureFile; +export interface VolumeReference { + name: string; + readOnly?: boolean; + destinationPath: string; } /** * @class - * Initializes a new instance of the ServiceResourceDescription class. + * Initializes a new instance of the ApplicationScopedVolumeCreationParameters class. * @constructor - * This type describes a service resource. + * Describes parameters for creating application-scoped volumes. * - * @member {string} osType The Operating system type required by the code in - * service. - * . Possible values include: 'Linux', 'Windows' - * @member {array} codePackages Describes the set of code packages that forms - * the service. A code package describes the container and the properties for - * running it. All the code packages are started together on the same host and - * share the same context (network, process etc.). - * @member {array} [networkRefs] The names of the private networks that this - * service needs to be part of. - * @member {object} [diagnostics] Reference to sinks in DiagnosticsDescription. - * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are - * enabled. - * @member {array} [diagnostics.sinkRefs] List of sinks to be used if enabled. - * References the list of sinks in DiagnosticsDescription. - * @member {string} [description] User readable description of the service. - * @member {number} [replicaCount] The number of replicas of the service to - * create. Defaults to 1 if not specified. - * @member {string} [healthState] The health state of a resource such as - * Application, Service, or Network. Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [status] Represents the status of the service. Possible - * values include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - * 'Failed' + * @member {string} [description] User readable description of the volume. + * @member {string} kind Polymorphic Discriminator */ -export interface ServiceResourceDescription extends ManagedProxyResource { - osType: string; - codePackages: ContainerCodePackageProperties[]; - networkRefs?: NetworkRef[]; - diagnostics?: DiagnosticsRef; +export interface ApplicationScopedVolumeCreationParameters { description?: string; - replicaCount?: number; - healthState?: string; - readonly status?: string; + kind: string; } /** * @class - * Initializes a new instance of the DiagnosticsSinkProperties class. + * Initializes a new instance of the ApplicationScopedVolume class. * @constructor - * Properties of a DiagnosticsSink. + * Describes a volume whose lifetime is scoped to the application's lifetime. * - * @member {string} [name] Name of the sink. This value is referenced by - * DiagnosticsReferenceDescription - * @member {string} [description] A description of the sink. - * @member {string} kind Polymorphic Discriminator + * @member {object} creationParameters Describes parameters for creating + * application-scoped volumes. + * @member {string} [creationParameters.description] User readable description + * of the volume. + * @member {string} [creationParameters.kind] Polymorphic Discriminator */ -export interface DiagnosticsSinkProperties { - name?: string; - description?: string; - kind: string; +export interface ApplicationScopedVolume extends VolumeReference { + creationParameters: ApplicationScopedVolumeCreationParameters; } /** * @class - * Initializes a new instance of the DiagnosticsDescription class. + * Initializes a new instance of the ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk class. * @constructor - * Describes the diagnostics options available + * Describes parameters for creating application-scoped volumes provided by + * Service Fabric Volume Disks * - * @member {array} [sinks] List of supported sinks that can be referenced. - * @member {boolean} [enabled] Status of whether or not sinks are enabled. - * @member {array} [defaultSinkRefs] The sinks to be used if diagnostics is - * enabled. Sink choices can be overridden at the service and code package - * level. + * @member {string} sizeDisk Volume size. Possible values include: 'Small', + * 'Medium', 'Large' */ -export interface DiagnosticsDescription { - sinks?: DiagnosticsSinkProperties[]; - enabled?: boolean; - defaultSinkRefs?: string[]; +export interface ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk extends ApplicationScopedVolumeCreationParameters { + sizeDisk: string; } /** * @class - * Initializes a new instance of the ApplicationResourceDescription class. + * Initializes a new instance of the VolumeResourceDescription class. * @constructor - * This type describes an application resource. + * This type describes a volume resource. * * @member {string} [provisioningState] State of the resource. - * @member {string} [description] User readable description of the application. - * @member {string} [debugParams] Internal use. - * @member {array} [services] describes the services in the application. - * @member {string} [healthState] Describes the health state of an application - * resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * @member {string} [unhealthyEvaluation] When the application's health state - * is not 'Ok', this additional details from service fabric Health Manager for - * the user to know why the application is marked unhealthy. - * @member {string} [status] Status of the application resource. Possible - * values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', - * 'Failed' + * @member {string} [description] User readable description of the volume. + * @member {string} [status] Status of the volume. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' * @member {string} [statusDetails] Gives additional information about the - * current status of the application deployment. - * @member {array} [serviceNames] Names of the services in the application. - * @member {object} [diagnostics] Describes the diagnostics definition and - * usage for an application resource. - * @member {array} [diagnostics.sinks] List of supported sinks that can be - * referenced. - * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are - * enabled. - * @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if - * diagnostics is enabled. Sink choices can be overridden at the service and - * code package level. + * current status of the volume. + * @member {object} [azureFileParameters] This type describes a volume provided + * by an Azure Files file share. + * @member {string} [azureFileParameters.accountName] Name of the Azure storage + * account for the File Share. + * @member {string} [azureFileParameters.accountKey] Access key of the Azure + * storage account for the File Share. + * @member {string} [azureFileParameters.shareName] Name of the Azure Files + * file share that provides storage for the volume. */ -export interface ApplicationResourceDescription extends TrackedResource { +export interface VolumeResourceDescription extends TrackedResource { readonly provisioningState?: string; description?: string; - debugParams?: string; - services?: ServiceResourceDescription[]; - readonly healthState?: string; - readonly unhealthyEvaluation?: string; readonly status?: string; readonly statusDetails?: string; - readonly serviceNames?: string[]; - diagnostics?: DiagnosticsDescription; + azureFileParameters?: VolumeProviderParametersAzureFile; } /** * @class - * Initializes a new instance of the ApplicationProperties class. + * Initializes a new instance of the NetworkResourcePropertiesBase class. * @constructor - * This type describes properties of an application resource. + * This type describes the properties of a network resource, including its + * kind. * - * @member {string} [description] User readable description of the application. - * @member {string} [debugParams] Internal use. - * @member {array} [services] describes the services in the application. - * @member {string} [healthState] Describes the health state of an application - * resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - * 'Unknown' - * @member {string} [unhealthyEvaluation] When the application's health state - * is not 'Ok', this additional details from service fabric Health Manager for - * the user to know why the application is marked unhealthy. - * @member {string} [status] Status of the application resource. Possible - * values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', - * 'Failed' - * @member {string} [statusDetails] Gives additional information about the - * current status of the application deployment. - * @member {array} [serviceNames] Names of the services in the application. - * @member {object} [diagnostics] Describes the diagnostics definition and - * usage for an application resource. - * @member {array} [diagnostics.sinks] List of supported sinks that can be - * referenced. - * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are - * enabled. - * @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if - * diagnostics is enabled. Sink choices can be overridden at the service and - * code package level. + * @member {string} kind Polymorphic Discriminator */ -export interface ApplicationProperties { +export interface NetworkResourcePropertiesBase extends ProvisionedResourceProperties { + kind: string; +} + +/** + * @class + * Initializes a new instance of the NetworkResourceProperties class. + * @constructor + * Describes properties of a network resource. + * + * @member {string} [description] User readable description of the network. + * @member {string} [status] Status of the network. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the network. + */ +export interface NetworkResourceProperties extends NetworkResourcePropertiesBase { description?: string; - debugParams?: string; - services?: ServiceResourceDescription[]; - readonly healthState?: string; - readonly unhealthyEvaluation?: string; readonly status?: string; readonly statusDetails?: string; - readonly serviceNames?: string[]; - diagnostics?: DiagnosticsDescription; } /** * @class - * Initializes a new instance of the ContainerState class. + * Initializes a new instance of the LocalNetworkResourceProperties class. * @constructor - * The container state. + * Information about a Service Fabric container network local to a single + * Service Fabric cluster. * - * @member {string} [state] The state of this container - * @member {date} [startTime] Date/time when the container state started. - * @member {string} [exitCode] The container exit code. - * @member {date} [finishTime] Date/time when the container state finished. - * @member {string} [detailStatus] Human-readable status of this state. + * @member {string} [networkAddressPrefix] Address space for the local + * container network. */ -export interface ContainerState { - state?: string; - startTime?: Date; - exitCode?: string; - finishTime?: Date; - detailStatus?: string; +export interface LocalNetworkResourceProperties extends NetworkResourceProperties { + networkAddressPrefix?: string; } /** * @class - * Initializes a new instance of the ContainerEvent class. + * Initializes a new instance of the EndpointRef class. * @constructor - * A container event. + * Describes a reference to a service endpoint. * - * @member {string} [name] The name of the container event. - * @member {number} [count] The count of the event. - * @member {string} [firstTimestamp] Date/time of the first event. - * @member {string} [lastTimestamp] Date/time of the last event. - * @member {string} [message] The event message - * @member {string} [type] The event type. + * @member {string} [name] Name of the endpoint. */ -export interface ContainerEvent { +export interface EndpointRef { name?: string; - count?: number; - firstTimestamp?: string; - lastTimestamp?: string; - message?: string; - type?: string; } /** * @class - * Initializes a new instance of the ContainerInstanceView class. + * Initializes a new instance of the NetworkRef class. * @constructor - * Runtime information of a container instance. + * Describes a network reference in a service. * - * @member {number} [restartCount] The number of times the container has been - * restarted. - * @member {object} [currentState] Current container instance state. - * @member {string} [currentState.state] The state of this container - * @member {date} [currentState.startTime] Date/time when the container state - * started. - * @member {string} [currentState.exitCode] The container exit code. - * @member {date} [currentState.finishTime] Date/time when the container state - * finished. - * @member {string} [currentState.detailStatus] Human-readable status of this - * state. - * @member {object} [previousState] Previous container instance state. - * @member {string} [previousState.state] The state of this container - * @member {date} [previousState.startTime] Date/time when the container state - * started. - * @member {string} [previousState.exitCode] The container exit code. - * @member {date} [previousState.finishTime] Date/time when the container state - * finished. - * @member {string} [previousState.detailStatus] Human-readable status of this - * state. - * @member {array} [events] The events of this container instance. + * @member {string} [name] Name of the network + * @member {array} [endpointRefs] A list of endpoints that are exposed on this + * network. */ -export interface ContainerInstanceView { - restartCount?: number; - currentState?: ContainerState; - previousState?: ContainerState; - events?: ContainerEvent[]; +export interface NetworkRef { + name?: string; + endpointRefs?: EndpointRef[]; } /** * @class - * Initializes a new instance of the ContainerLabel class. + * Initializes a new instance of the NetworkResourceDescription class. * @constructor - * Describes a container label. + * This type describes a network resource. * - * @member {string} name The name of the container label. - * @member {string} value The value of the container label. + * @member {object} properties Describes properties of a network resource. + * @member {string} [properties.description] User readable description of the + * network. + * @member {string} [properties.status] Status of the network. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [properties.statusDetails] Gives additional information + * about the current status of the network. */ -export interface ContainerLabel { +export interface NetworkResourceDescription extends TrackedResource { + properties: NetworkResourceProperties; +} + +/** + * @class + * Initializes a new instance of the GatewayDestination class. + * @constructor + * Describes destination endpoint for routing traffic. + * + * @member {string} applicationName Name of the service fabric Mesh + * application. + * @member {string} serviceName service that contains the endpoint. + * @member {string} endpointName name of the endpoint in the service. + */ +export interface GatewayDestination { + applicationName: string; + serviceName: string; + endpointName: string; +} + +/** + * @class + * Initializes a new instance of the TcpConfig class. + * @constructor + * Describes the tcp configuration for external connectivity for this network. + * + * @member {string} name tcp gateway config name. + * @member {number} port Specifies the port at which the service endpoint below + * needs to be exposed. + * @member {object} destination Describes destination endpoint for routing + * traffic. + * @member {string} [destination.applicationName] Name of the service fabric + * Mesh application. + * @member {string} [destination.serviceName] service that contains the + * endpoint. + * @member {string} [destination.endpointName] name of the endpoint in the + * service. + */ +export interface TcpConfig { name: string; - value: string; + port: number; + destination: GatewayDestination; } /** * @class - * Initializes a new instance of the ContainerLogs class. + * Initializes a new instance of the HttpRouteMatchPath class. * @constructor - * The logs of the container. + * Path to match for routing. * - * @member {string} [content] content of the log. + * @member {string} value Uri path to match for request. + * @member {string} [rewrite] replacement string for matched part of the Uri. */ -export interface ContainerLogs { - content?: string; +export interface HttpRouteMatchPath { + value: string; + rewrite?: string; } /** * @class - * Initializes a new instance of the ImageRegistryCredential class. + * Initializes a new instance of the HttpRouteMatchHeader class. * @constructor - * Image registry credential. + * Describes header information for http route matching. * - * @member {string} server Docker image registry server, without protocol such - * as `http` and `https`. - * @member {string} username The username for the private registry. - * @member {string} [password] The password for the private registry. + * @member {string} name Name of header to match in request. + * @member {string} [value] Value of header to match in request. + * @member {string} [type] how to match header value. Possible values include: + * 'exact' */ -export interface ImageRegistryCredential { - server: string; - username: string; - password?: string; +export interface HttpRouteMatchHeader { + name: string; + value?: string; + type?: string; } /** * @class - * Initializes a new instance of the ResourceLimits class. + * Initializes a new instance of the HttpRouteMatchRule class. * @constructor - * This type describes the resource limits for a given container. It describes - * the most amount of resources a container is allowed to use before being - * restarted. + * Describes a rule for http route matching. * - * @member {number} [memoryInGB] The memory limit in GB. - * @member {number} [cpu] CPU limits in cores. At present, only full cores are - * supported. + * @member {object} path Path to match for routing. + * @member {string} [path.value] Uri path to match for request. + * @member {string} [path.rewrite] replacement string for matched part of the + * Uri. + * @member {array} [headers] headers and their values to match in request. */ -export interface ResourceLimits { - memoryInGB?: number; - cpu?: number; +export interface HttpRouteMatchRule { + path: HttpRouteMatchPath; + headers?: HttpRouteMatchHeader[]; } /** * @class - * Initializes a new instance of the ResourceRequests class. + * Initializes a new instance of the HttpRouteConfig class. * @constructor - * This type describes the requested resources for a given container. It - * describes the least amount of resources required for the container. A - * container can consume more than requested resources up to the specified - * limits before being restarted. Currently, the requested resources are - * treated as limits. + * Describes the hostname properties for http routing. * + * @member {string} name http route name. + * @member {object} match Describes a rule for http route matching. + * @member {object} [match.path] Path to match for routing. + * @member {string} [match.path.value] Uri path to match for request. + * @member {string} [match.path.rewrite] replacement string for matched part of + * the Uri. + * @member {array} [match.headers] headers and their values to match in + * request. + * @member {object} destination Describes destination endpoint for routing + * traffic. + * @member {string} [destination.applicationName] Name of the service fabric + * Mesh application. + * @member {string} [destination.serviceName] service that contains the + * endpoint. + * @member {string} [destination.endpointName] name of the endpoint in the + * service. + */ +export interface HttpRouteConfig { + name: string; + match: HttpRouteMatchRule; + destination: GatewayDestination; +} + +/** + * @class + * Initializes a new instance of the HttpHostConfig class. + * @constructor + * Describes the hostname properties for http routing. * - * @member {number} memoryInGB The memory request in GB for this container. - * @member {number} cpu Requested number of CPU cores. At present, only full - * cores are supported. + * @member {string} name http hostname config name. + * @member {array} routes Route information to use for routing. Routes are + * processed in the order they are specified. Specify routes that are more + * specific before routes that can hamdle general cases. */ -export interface ResourceRequests { - memoryInGB: number; - cpu: number; +export interface HttpHostConfig { + name: string; + routes: HttpRouteConfig[]; } /** * @class - * Initializes a new instance of the ResourceRequirements class. + * Initializes a new instance of the HttpConfig class. * @constructor - * This type describes the resource requirements for a container or a service. + * Describes the http configuration for external connectivity for this network. * - * @member {object} requests Describes the requested resources for a given - * container. - * @member {number} [requests.memoryInGB] The memory request in GB for this - * container. - * @member {number} [requests.cpu] Requested number of CPU cores. At present, - * only full cores are supported. - * @member {object} [limits] Describes the maximum limits on the resources for - * a given container. - * @member {number} [limits.memoryInGB] The memory limit in GB. - * @member {number} [limits.cpu] CPU limits in cores. At present, only full - * cores are supported. + * @member {string} name http gateway config name. + * @member {number} port Specifies the port at which the service endpoint below + * needs to be exposed. + * @member {array} hosts description for routing. */ -export interface ResourceRequirements { - requests: ResourceRequests; - limits?: ResourceLimits; +export interface HttpConfig { + name: string; + port: number; + hosts: HttpHostConfig[]; } /** * @class - * Initializes a new instance of the AvailableOperationDisplay class. + * Initializes a new instance of the GatewayProperties class. * @constructor - * An operation available at the listed Azure resource provider. + * Describes properties of a gateway resource. * - * @member {string} [provider] Name of the operation provider. - * @member {string} [resource] Name of the resource on which the operation is - * available. - * @member {string} [operation] Name of the available operation. - * @member {string} [description] Description of the available operation. + * @member {string} [description] User readable description of the gateway. + * @member {object} sourceNetwork Network the gateway should listen on for + * requests. + * @member {string} [sourceNetwork.name] Name of the network + * @member {array} [sourceNetwork.endpointRefs] A list of endpoints that are + * exposed on this network. + * @member {object} destinationNetwork Network that the Application is using. + * @member {string} [destinationNetwork.name] Name of the network + * @member {array} [destinationNetwork.endpointRefs] A list of endpoints that + * are exposed on this network. + * @member {array} [tcp] Configuration for tcp connectivity for this gateway. + * @member {array} [http] Configuration for http connectivity for this gateway. + * @member {string} [status] Status of the resource. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the gateway. + * @member {string} [ipAddress] IP address of the gateway. This is populated in + * the response and is ignored for incoming requests. */ -export interface AvailableOperationDisplay { - provider?: string; - resource?: string; - operation?: string; +export interface GatewayProperties { description?: string; + sourceNetwork: NetworkRef; + destinationNetwork: NetworkRef; + tcp?: TcpConfig[]; + http?: HttpConfig[]; + readonly status?: string; + readonly statusDetails?: string; + readonly ipAddress?: string; } /** * @class - * Initializes a new instance of the OperationResult class. + * Initializes a new instance of the GatewayResourceDescription class. * @constructor - * List of operations available at the listed Azure resource provider. + * This type describes a gateway resource. * - * @member {string} [name] The name of the operation. - * @member {object} [display] The object that represents the operation. - * @member {string} [display.provider] Name of the operation provider. - * @member {string} [display.resource] Name of the resource on which the - * operation is available. - * @member {string} [display.operation] Name of the available operation. - * @member {string} [display.description] Description of the available - * operation. - * @member {string} [origin] Origin result - * @member {string} [nextLink] The URL to use for getting the next set of - * results. + * @member {string} [provisioningState] State of the resource. + * @member {string} [description] User readable description of the gateway. + * @member {object} sourceNetwork Network the gateway should listen on for + * requests. + * @member {string} [sourceNetwork.name] Name of the network + * @member {array} [sourceNetwork.endpointRefs] A list of endpoints that are + * exposed on this network. + * @member {object} destinationNetwork Network that the Application is using. + * @member {string} [destinationNetwork.name] Name of the network + * @member {array} [destinationNetwork.endpointRefs] A list of endpoints that + * are exposed on this network. + * @member {array} [tcp] Configuration for tcp connectivity for this gateway. + * @member {array} [http] Configuration for http connectivity for this gateway. + * @member {string} [status] Status of the resource. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the gateway. + * @member {string} [ipAddress] IP address of the gateway. This is populated in + * the response and is ignored for incoming requests. */ -export interface OperationResult { - name?: string; - display?: AvailableOperationDisplay; - origin?: string; - nextLink?: string; +export interface GatewayResourceDescription extends TrackedResource { + readonly provisioningState?: string; + description?: string; + sourceNetwork: NetworkRef; + destinationNetwork: NetworkRef; + tcp?: TcpConfig[]; + http?: HttpConfig[]; + readonly status?: string; + readonly statusDetails?: string; + readonly ipAddress?: string; } /** * @class - * Initializes a new instance of the ErrorModel class. + * Initializes a new instance of the ImageRegistryCredential class. * @constructor - * The error details. + * Image registry credential. * - * @member {string} [code] The error code. - * @member {string} [message] The error message. + * @member {string} server Docker image registry server, without protocol such + * as `http` and `https`. + * @member {string} username The username for the private registry. + * @member {string} [password] The password for the private registry. The + * password is required for create or update operations, however it is not + * returned in the get or list operations. */ -export interface ErrorModel { - code?: string; - message?: string; +export interface ImageRegistryCredential { + server: string; + username: string; + password?: string; } /** @@ -667,7 +782,9 @@ export interface EnvironmentVariable { * @class * Initializes a new instance of the Setting class. * @constructor - * Describes a setting for the container. + * Describes a setting for the container. The setting file path can be fetched + * from environment variable "Fabric_SettingPath". The path for Windows + * container is "C:\\secrets". The path for Linux container is "/var/secrets". * * @member {string} [name] The name of the setting. * @member {string} [value] The value of the setting. @@ -677,6 +794,20 @@ export interface Setting { value?: string; } +/** + * @class + * Initializes a new instance of the ContainerLabel class. + * @constructor + * Describes a container label. + * + * @member {string} name The name of the container label. + * @member {string} value The value of the container label. + */ +export interface ContainerLabel { + name: string; + value: string; +} + /** * @class * Initializes a new instance of the EndpointProperties class. @@ -693,25 +824,66 @@ export interface EndpointProperties { /** * @class - * Initializes a new instance of the ContainerVolume class. + * Initializes a new instance of the ResourceRequests class. * @constructor - * Describes how a volume is attached to a container. + * This type describes the requested resources for a given container. It + * describes the least amount of resources required for the container. A + * container can consume more than requested resources up to the specified + * limits before being restarted. Currently, the requested resources are + * treated as limits. * - * @member {string} name Name of the volume. - * @member {boolean} [readOnly] The flag indicating whether the volume is read - * only. Default is 'false'. - * @member {string} destinationPath The path within the container at which the - * volume should be mounted. Only valid path characters are allowed. + * @member {number} memoryInGB The memory request in GB for this container. + * @member {number} cpu Requested number of CPU cores. At present, only full + * cores are supported. */ -export interface ContainerVolume { - name: string; - readOnly?: boolean; - destinationPath: string; +export interface ResourceRequests { + memoryInGB: number; + cpu: number; } /** * @class - * Initializes a new instance of the DiagnosticsRef class. + * Initializes a new instance of the ResourceLimits class. + * @constructor + * This type describes the resource limits for a given container. It describes + * the most amount of resources a container is allowed to use before being + * restarted. + * + * @member {number} [memoryInGB] The memory limit in GB. + * @member {number} [cpu] CPU limits in cores. At present, only full cores are + * supported. + */ +export interface ResourceLimits { + memoryInGB?: number; + cpu?: number; +} + +/** + * @class + * Initializes a new instance of the ResourceRequirements class. + * @constructor + * This type describes the resource requirements for a container or a service. + * + * @member {object} requests Describes the requested resources for a given + * container. + * @member {number} [requests.memoryInGB] The memory request in GB for this + * container. + * @member {number} [requests.cpu] Requested number of CPU cores. At present, + * only full cores are supported. + * @member {object} [limits] Describes the maximum limits on the resources for + * a given container. + * @member {number} [limits.memoryInGB] The memory limit in GB. + * @member {number} [limits.cpu] CPU limits in cores. At present, only full + * cores are supported. + */ +export interface ResourceRequirements { + requests: ResourceRequests; + limits?: ResourceLimits; +} + +/** + * @class + * Initializes a new instance of the DiagnosticsRef class. * @constructor * Reference to sinks in DiagnosticsDescription. * @@ -724,6 +896,101 @@ export interface DiagnosticsRef { sinkRefs?: string[]; } +/** + * @class + * Initializes a new instance of the ReliableCollectionsRef class. + * @constructor + * Specifying this parameter adds support for reliable collections + * + * @member {string} name Name of ReliableCollection resource. Right now it's + * not used and you can use any string. + * @member {boolean} [doNotPersistState] False (the default) if + * ReliableCollections state is persisted to disk as usual. True if you do not + * want to persist state, in which case replication is still enabled and you + * can use ReliableCollections as distributed cache. + */ +export interface ReliableCollectionsRef { + name: string; + doNotPersistState?: boolean; +} + +/** + * @class + * Initializes a new instance of the ContainerState class. + * @constructor + * The container state. + * + * @member {string} [state] The state of this container + * @member {date} [startTime] Date/time when the container state started. + * @member {string} [exitCode] The container exit code. + * @member {date} [finishTime] Date/time when the container state finished. + * @member {string} [detailStatus] Human-readable status of this state. + */ +export interface ContainerState { + state?: string; + startTime?: Date; + exitCode?: string; + finishTime?: Date; + detailStatus?: string; +} + +/** + * @class + * Initializes a new instance of the ContainerEvent class. + * @constructor + * A container event. + * + * @member {string} [name] The name of the container event. + * @member {number} [count] The count of the event. + * @member {string} [firstTimestamp] Date/time of the first event. + * @member {string} [lastTimestamp] Date/time of the last event. + * @member {string} [message] The event message + * @member {string} [type] The event type. + */ +export interface ContainerEvent { + name?: string; + count?: number; + firstTimestamp?: string; + lastTimestamp?: string; + message?: string; + type?: string; +} + +/** + * @class + * Initializes a new instance of the ContainerInstanceView class. + * @constructor + * Runtime information of a container instance. + * + * @member {number} [restartCount] The number of times the container has been + * restarted. + * @member {object} [currentState] Current container instance state. + * @member {string} [currentState.state] The state of this container + * @member {date} [currentState.startTime] Date/time when the container state + * started. + * @member {string} [currentState.exitCode] The container exit code. + * @member {date} [currentState.finishTime] Date/time when the container state + * finished. + * @member {string} [currentState.detailStatus] Human-readable status of this + * state. + * @member {object} [previousState] Previous container instance state. + * @member {string} [previousState.state] The state of this container + * @member {date} [previousState.startTime] Date/time when the container state + * started. + * @member {string} [previousState.exitCode] The container exit code. + * @member {date} [previousState.finishTime] Date/time when the container state + * finished. + * @member {string} [previousState.detailStatus] Human-readable status of this + * state. + * @member {array} [events] The events of this container instance. + */ +export interface ContainerInstanceView { + restartCount?: number; + currentState?: ContainerState; + previousState?: ContainerState; + events?: ContainerEvent[]; +} + /** * @class * Initializes a new instance of the ContainerCodePackageProperties class. @@ -738,7 +1005,8 @@ export interface DiagnosticsRef { * @member {string} [imageRegistryCredential.username] The username for the * private registry. * @member {string} [imageRegistryCredential.password] The password for the - * private registry. + * private registry. The password is required for create or update operations, + * however it is not returned in the get or list operations. * @member {string} [entrypoint] Override for the default entry point in the * container. * @member {array} [commands] Command array to execute within the container in @@ -751,8 +1019,7 @@ export interface DiagnosticsRef { * path for Linux container is "/var/secrets". * @member {array} [labels] The labels to set in this container. * @member {array} [endpoints] The endpoints exposed by this container. - * @member {object} resources This type describes the resource requirements for - * a container or a service. + * @member {object} resources The resources required by this container. * @member {object} [resources.requests] Describes the requested resources for * a given container. * @member {number} [resources.requests.memoryInGB] The memory request in GB @@ -764,7 +1031,18 @@ export interface DiagnosticsRef { * @member {number} [resources.limits.memoryInGB] The memory limit in GB. * @member {number} [resources.limits.cpu] CPU limits in cores. At present, * only full cores are supported. - * @member {array} [volumeRefs] The volumes to be attached to the container. + * @member {array} [volumeRefs] Volumes to be attached to the container. The + * lifetime of these volumes is independent of the application's lifetime. + * @member {array} [volumes] Volumes to be attached to the container. The + * lifetime of these volumes is scoped to the application's lifetime. + * @member {object} [diagnostics] Reference to sinks in DiagnosticsDescription. + * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are + * enabled. + * @member {array} [diagnostics.sinkRefs] List of sinks to be used if enabled. + * References the list of sinks in DiagnosticsDescription. + * @member {array} [reliableCollectionsRefs] A list of ReliableCollection + * resources used by this particular code package. Please refer to + * ReliablecollectionsRef for more details. * @member {object} [instanceView] Runtime information of a container instance. * @member {number} [instanceView.restartCount] The number of times the * container has been restarted. @@ -793,11 +1071,6 @@ export interface DiagnosticsRef { * @member {string} [instanceView.previousState.detailStatus] Human-readable * status of this state. * @member {array} [instanceView.events] The events of this container instance. - * @member {object} [diagnostics] Reference to sinks in DiagnosticsDescription. - * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are - * enabled. - * @member {array} [diagnostics.sinkRefs] List of sinks to be used if enabled. - * References the list of sinks in DiagnosticsDescription. */ export interface ContainerCodePackageProperties { name: string; @@ -810,20 +1083,67 @@ export interface ContainerCodePackageProperties { labels?: ContainerLabel[]; endpoints?: EndpointProperties[]; resources: ResourceRequirements; - volumeRefs?: ContainerVolume[]; - readonly instanceView?: ContainerInstanceView; + volumeRefs?: VolumeReference[]; + volumes?: ApplicationScopedVolume[]; diagnostics?: DiagnosticsRef; + reliableCollectionsRefs?: ReliableCollectionsRef[]; + readonly instanceView?: ContainerInstanceView; } /** * @class - * Initializes a new instance of the ServiceReplicaProperties class. + * Initializes a new instance of the AutoScalingTrigger class. * @constructor - * Describes the properties of a service replica. + * Describes the trigger for performing auto scaling operation. * - * @member {string} osType The Operating system type required by the code in - * service. - * . Possible values include: 'Linux', 'Windows' + * @member {string} kind Polymorphic Discriminator + */ +export interface AutoScalingTrigger { + kind: string; +} + +/** + * @class + * Initializes a new instance of the AutoScalingMechanism class. + * @constructor + * Describes the mechanism for performing auto scaling operation. Derived + * classes will describe the actual mechanism. + * + * @member {string} kind Polymorphic Discriminator + */ +export interface AutoScalingMechanism { + kind: string; +} + +/** + * @class + * Initializes a new instance of the AutoScalingPolicy class. + * @constructor + * Describes the auto scaling policy + * + * @member {string} name The name of the auto scaling policy. + * @member {object} trigger Determines when auto scaling operation will be + * invoked. + * @member {string} [trigger.kind] Polymorphic Discriminator + * @member {object} mechanism The mechanism that is used to scale when auto + * scaling operation is invoked. + * @member {string} [mechanism.kind] Polymorphic Discriminator + */ +export interface AutoScalingPolicy { + name: string; + trigger: AutoScalingTrigger; + mechanism: AutoScalingMechanism; +} + +/** + * @class + * Initializes a new instance of the ServiceResourceDescription class. + * @constructor + * This type describes a service resource. + * + * @member {string} [provisioningState] State of the resource. + * @member {string} osType The operation system required by the code in + * service. Possible values include: 'Linux', 'Windows' * @member {array} codePackages Describes the set of code packages that forms * the service. A code package describes the container and the properties for * running it. All the code packages are started together on the same host and @@ -835,36 +1155,115 @@ export interface ContainerCodePackageProperties { * enabled. * @member {array} [diagnostics.sinkRefs] List of sinks to be used if enabled. * References the list of sinks in DiagnosticsDescription. + * @member {string} [description] User readable description of the service. + * @member {number} [replicaCount] The number of replicas of the service to + * create. Defaults to 1 if not specified. + * @member {array} [autoScalingPolicies] Auto scaling policies + * @member {string} [status] Status of the service. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the service. + * @member {string} [healthState] Describes the health state of an application + * resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * @member {string} [unhealthyEvaluation] When the service's health state is + * not 'Ok', this additional details from service fabric Health Manager for the + * user to know why the service is marked unhealthy. */ -export interface ServiceReplicaProperties { +export interface ServiceResourceDescription extends ManagedProxyResource { + readonly provisioningState?: string; osType: string; codePackages: ContainerCodePackageProperties[]; networkRefs?: NetworkRef[]; diagnostics?: DiagnosticsRef; + description?: string; + replicaCount?: number; + autoScalingPolicies?: AutoScalingPolicy[]; + readonly status?: string; + readonly statusDetails?: string; + readonly healthState?: string; + readonly unhealthyEvaluation?: string; } /** * @class - * Initializes a new instance of the ServiceReplicaDescription class. + * Initializes a new instance of the DiagnosticsSinkProperties class. * @constructor - * This type describes a replica of a service resource. + * Properties of a DiagnosticsSink. * - * @member {string} [replicaName] Name of the replica. + * @member {string} [name] Name of the sink. This value is referenced by + * DiagnosticsReferenceDescription + * @member {string} [description] A description of the sink. + * @member {string} kind Polymorphic Discriminator */ -export interface ServiceReplicaDescription extends ServiceReplicaProperties { - replicaName?: string; +export interface DiagnosticsSinkProperties { + name?: string; + description?: string; + kind: string; } /** * @class - * Initializes a new instance of the NetworkRef class. + * Initializes a new instance of the DiagnosticsDescription class. * @constructor - * Describes a network reference in a service. + * Describes the diagnostics options available * - * @member {string} [name] Name of the network. + * @member {array} [sinks] List of supported sinks that can be referenced. + * @member {boolean} [enabled] Status of whether or not sinks are enabled. + * @member {array} [defaultSinkRefs] The sinks to be used if diagnostics is + * enabled. Sink choices can be overridden at the service and code package + * level. */ -export interface NetworkRef { - name?: string; +export interface DiagnosticsDescription { + sinks?: DiagnosticsSinkProperties[]; + enabled?: boolean; + defaultSinkRefs?: string[]; +} + +/** + * @class + * Initializes a new instance of the ApplicationProperties class. + * @constructor + * Describes properties of a application resource. + * + * @member {string} [description] User readable description of the application. + * @member {array} [services] Describes the services in the application. This + * property is used to create or modify services of the application. On get + * only the name of the service is returned. The service description can be + * obtained by querying for the service resource. + * @member {object} [diagnostics] Describes the diagnostics definition and + * usage for an application resource. + * @member {array} [diagnostics.sinks] List of supported sinks that can be + * referenced. + * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are + * enabled. + * @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if + * diagnostics is enabled. Sink choices can be overridden at the service and + * code package level. + * @member {string} [debugParams] Internal - used by Visual Studio to setup the + * debugging session on the local development environment. + * @member {array} [serviceNames] Names of the services in the application. + * @member {string} [status] Status of the application. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the application. + * @member {string} [healthState] Describes the health state of an application + * resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * @member {string} [unhealthyEvaluation] When the application's health state + * is not 'Ok', this additional details from service fabric Health Manager for + * the user to know why the application is marked unhealthy. + */ +export interface ApplicationProperties { + description?: string; + services?: ServiceResourceDescription[]; + diagnostics?: DiagnosticsDescription; + debugParams?: string; + readonly serviceNames?: string[]; + readonly status?: string; + readonly statusDetails?: string; + readonly healthState?: string; + readonly unhealthyEvaluation?: string; } /** @@ -891,45 +1290,205 @@ export interface AzureInternalMonitoringPipelineSinkDescription extends Diagnost autoKeyConfigUrl?: string; } +/** + * @class + * Initializes a new instance of the ApplicationResourceDescription class. + * @constructor + * This type describes an application resource. + * + * @member {string} [provisioningState] State of the resource. + * @member {string} [description] User readable description of the application. + * @member {array} [services] Describes the services in the application. This + * property is used to create or modify services of the application. On get + * only the name of the service is returned. The service description can be + * obtained by querying for the service resource. + * @member {object} [diagnostics] Describes the diagnostics definition and + * usage for an application resource. + * @member {array} [diagnostics.sinks] List of supported sinks that can be + * referenced. + * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are + * enabled. + * @member {array} [diagnostics.defaultSinkRefs] The sinks to be used if + * diagnostics is enabled. Sink choices can be overridden at the service and + * code package level. + * @member {string} [debugParams] Internal - used by Visual Studio to setup the + * debugging session on the local development environment. + * @member {array} [serviceNames] Names of the services in the application. + * @member {string} [status] Status of the application. Possible values + * include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the application. + * @member {string} [healthState] Describes the health state of an application + * resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * @member {string} [unhealthyEvaluation] When the application's health state + * is not 'Ok', this additional details from service fabric Health Manager for + * the user to know why the application is marked unhealthy. + */ +export interface ApplicationResourceDescription extends TrackedResource { + readonly provisioningState?: string; + description?: string; + services?: ServiceResourceDescription[]; + diagnostics?: DiagnosticsDescription; + debugParams?: string; + readonly serviceNames?: string[]; + readonly status?: string; + readonly statusDetails?: string; + readonly healthState?: string; + readonly unhealthyEvaluation?: string; +} + +/** + * @class + * Initializes a new instance of the AddRemoveReplicaScalingMechanism class. + * @constructor + * Describes the horizontal auto scaling mechanism that adds or removes + * replicas (containers or container groups). + * + * @member {number} minCount Minimum number of containers (scale down won't be + * performed below this number). + * @member {number} maxCount Maximum number of containers (scale up won't be + * performed above this number). + * @member {number} scaleIncrement Each time auto scaling is performed, this + * number of containers will be added or removed. + */ +export interface AddRemoveReplicaScalingMechanism extends AutoScalingMechanism { + minCount: number; + maxCount: number; + scaleIncrement: number; +} /** * @class - * Initializes a new instance of the ApplicationResourceDescriptionList class. + * Initializes a new instance of the AutoScalingMetric class. * @constructor - * A pageable list of application resources. + * Describes the metric that is used for triggering auto scaling operation. + * Derived classes will describe resources or metrics. * - * @member {string} [nextLink] URI to fetch the next page of the list. + * @member {string} kind Polymorphic Discriminator */ -export interface ApplicationResourceDescriptionList extends Array { - nextLink?: string; +export interface AutoScalingMetric { + kind: string; } /** * @class - * Initializes a new instance of the ServiceList class. + * Initializes a new instance of the AutoScalingResourceMetric class. * @constructor - * A pageable list of all services in an application. + * Describes the resource that is used for triggering auto scaling. * + * @member {string} name Name of the resource. Possible values include: 'cpu', + * 'memoryInGB' + */ +export interface AutoScalingResourceMetric extends AutoScalingMetric { + name: string; +} + +/** + * @class + * Initializes a new instance of the ServiceProperties class. + * @constructor + * Describes properties of a service resource. * - * @member {string} [nextLink] URI to fetch the next page of the list. + * @member {string} [description] User readable description of the service. + * @member {number} [replicaCount] The number of replicas of the service to + * create. Defaults to 1 if not specified. + * @member {array} [autoScalingPolicies] Auto scaling policies + * @member {string} [status] Status of the service. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the service. + * @member {string} [healthState] Describes the health state of an application + * resource. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * @member {string} [unhealthyEvaluation] When the service's health state is + * not 'Ok', this additional details from service fabric Health Manager for the + * user to know why the service is marked unhealthy. */ -export interface ServiceList extends Array { - nextLink?: string; +export interface ServiceProperties { + description?: string; + replicaCount?: number; + autoScalingPolicies?: AutoScalingPolicy[]; + readonly status?: string; + readonly statusDetails?: string; + readonly healthState?: string; + readonly unhealthyEvaluation?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceReplicaProperties class. + * @constructor + * Describes the properties of a service replica. + * + * @member {string} osType The operation system required by the code in + * service. Possible values include: 'Linux', 'Windows' + * @member {array} codePackages Describes the set of code packages that forms + * the service. A code package describes the container and the properties for + * running it. All the code packages are started together on the same host and + * share the same context (network, process etc.). + * @member {array} [networkRefs] The names of the private networks that this + * service needs to be part of. + * @member {object} [diagnostics] Reference to sinks in DiagnosticsDescription. + * @member {boolean} [diagnostics.enabled] Status of whether or not sinks are + * enabled. + * @member {array} [diagnostics.sinkRefs] List of sinks to be used if enabled. + * References the list of sinks in DiagnosticsDescription. + */ +export interface ServiceReplicaProperties { + osType: string; + codePackages: ContainerCodePackageProperties[]; + networkRefs?: NetworkRef[]; + diagnostics?: DiagnosticsRef; +} + +/** + * @class + * Initializes a new instance of the ServiceReplicaDescription class. + * @constructor + * Describes a replica of a service resource. + * + * @member {string} replicaName Name of the replica. + */ +export interface ServiceReplicaDescription extends ServiceReplicaProperties { + replicaName: string; } /** * @class - * Initializes a new instance of the ServiceReplicaList class. + * Initializes a new instance of the AverageLoadScalingTrigger class. * @constructor - * A pageable list of replicas of a service resource. + * Describes the average load trigger used for auto scaling. * + * @member {object} metric Description of the metric that is used for scaling. + * @member {string} [metric.kind] Polymorphic Discriminator + * @member {number} lowerLoadThreshold Lower load threshold (if average load is + * below this threshold, service will scale down). + * @member {number} upperLoadThreshold Upper load threshold (if average load is + * above this threshold, service will scale up). + * @member {number} scaleIntervalInSeconds Scale interval that indicates how + * often will this trigger be checked. + */ +export interface AverageLoadScalingTrigger extends AutoScalingTrigger { + metric: AutoScalingMetric; + lowerLoadThreshold: number; + upperLoadThreshold: number; + scaleIntervalInSeconds: number; +} + +/** + * @class + * Initializes a new instance of the ContainerLogs class. + * @constructor + * Container logs. * - * @member {string} [nextLink] URI to fetch the next page of the list. + * @member {string} [content] Container logs. */ -export interface ServiceReplicaList extends Array { - nextLink?: string; +export interface ContainerLogs { + content?: string; } + /** * @class * Initializes a new instance of the OperationListResult class. @@ -945,13 +1504,26 @@ export interface OperationListResult extends Array { /** * @class - * Initializes a new instance of the NetworkResourceDescriptionList class. + * Initializes a new instance of the SecretResourceDescriptionList class. * @constructor - * A pageable list of network resources. + * A pageable list of secret resources. * * @member {string} [nextLink] URI to fetch the next page of the list. */ -export interface NetworkResourceDescriptionList extends Array { +export interface SecretResourceDescriptionList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the SecretValueResourceDescriptionList class. + * @constructor + * A pageable list of values of a secret resource. The information does not + * include only the name of the value and not the actual unecrypted value. + * + * @member {string} [nextLink] URI to fetch the next page of the list. + */ +export interface SecretValueResourceDescriptionList extends Array { nextLink?: string; } @@ -966,3 +1538,63 @@ export interface NetworkResourceDescriptionList extends Array { nextLink?: string; } + +/** + * @class + * Initializes a new instance of the NetworkResourceDescriptionList class. + * @constructor + * A pageable list of network resources. + * + * @member {string} [nextLink] URI to fetch the next page of the list. + */ +export interface NetworkResourceDescriptionList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the GatewayResourceDescriptionList class. + * @constructor + * A pageable list of gateway resources. + * + * @member {string} [nextLink] URI to fetch the next page of the list. + */ +export interface GatewayResourceDescriptionList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the ApplicationResourceDescriptionList class. + * @constructor + * A pageable list of application resources. + * + * @member {string} [nextLink] URI to fetch the next page of the list. + */ +export interface ApplicationResourceDescriptionList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceResourceDescriptionList class. + * @constructor + * A pageable list of service resources. + * + * @member {string} [nextLink] URI to fetch the next page of the list. + */ +export interface ServiceResourceDescriptionList extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceReplicaDescriptionList class. + * @constructor + * A pageable list of service replicas. + * + * @member {string} [nextLink] URI to fetch the next page of the list. + */ +export interface ServiceReplicaDescriptionList extends Array { + nextLink?: string; +} diff --git a/lib/services/serviceFabricMeshManagement/lib/models/index.js b/lib/services/serviceFabricMeshManagement/lib/models/index.js index 4f24b4e0aa..e647c9f51e 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/index.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/index.js @@ -18,52 +18,101 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; +exports.AvailableOperationDisplay = require('./availableOperationDisplay'); +exports.ErrorDetailsModel = require('./errorDetailsModel'); +exports.ErrorErrorModel = require('./errorErrorModel'); +exports.ErrorModel = require('./errorModel'); +exports.OperationResult = require('./operationResult'); +exports.ProvisionedResourceProperties = require('./provisionedResourceProperties'); exports.Resource = require('./resource'); exports.ProxyResource = require('./proxyResource'); exports.ManagedProxyResource = require('./managedProxyResource'); exports.TrackedResource = require('./trackedResource'); -exports.ProvisionedResourceProperties = require('./provisionedResourceProperties'); -exports.Layer4IngressConfig = require('./layer4IngressConfig'); -exports.IngressConfig = require('./ingressConfig'); -exports.NetworkResourceDescription = require('./networkResourceDescription'); -exports.NetworkProperties = require('./networkProperties'); +exports.SecretResourcePropertiesBase = require('./secretResourcePropertiesBase'); +exports.SecretResourceProperties = require('./secretResourceProperties'); +exports.InlinedValueSecretResourceProperties = require('./inlinedValueSecretResourceProperties'); +exports.SecretResourceDescription = require('./secretResourceDescription'); +exports.SecretValue = require('./secretValue'); +exports.SecretValueProperties = require('./secretValueProperties'); +exports.SecretValueResourceDescription = require('./secretValueResourceDescription'); exports.VolumeProviderParametersAzureFile = require('./volumeProviderParametersAzureFile'); -exports.VolumeResourceDescription = require('./volumeResourceDescription'); exports.VolumeProperties = require('./volumeProperties'); -exports.ServiceResourceDescription = require('./serviceResourceDescription'); -exports.DiagnosticsSinkProperties = require('./diagnosticsSinkProperties'); -exports.DiagnosticsDescription = require('./diagnosticsDescription'); -exports.ApplicationResourceDescription = require('./applicationResourceDescription'); -exports.ApplicationProperties = require('./applicationProperties'); -exports.ContainerState = require('./containerState'); -exports.ContainerEvent = require('./containerEvent'); -exports.ContainerInstanceView = require('./containerInstanceView'); -exports.ContainerLabel = require('./containerLabel'); -exports.ContainerLogs = require('./containerLogs'); +exports.VolumeReference = require('./volumeReference'); +exports.ApplicationScopedVolumeCreationParameters = require('./applicationScopedVolumeCreationParameters'); +exports.ApplicationScopedVolume = require('./applicationScopedVolume'); +exports.ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk = require('./applicationScopedVolumeCreationParametersServiceFabricVolumeDisk'); +exports.VolumeResourceDescription = require('./volumeResourceDescription'); +exports.NetworkResourcePropertiesBase = require('./networkResourcePropertiesBase'); +exports.NetworkResourceProperties = require('./networkResourceProperties'); +exports.LocalNetworkResourceProperties = require('./localNetworkResourceProperties'); +exports.EndpointRef = require('./endpointRef'); +exports.NetworkRef = require('./networkRef'); +exports.NetworkResourceDescription = require('./networkResourceDescription'); +exports.GatewayDestination = require('./gatewayDestination'); +exports.TcpConfig = require('./tcpConfig'); +exports.HttpRouteMatchPath = require('./httpRouteMatchPath'); +exports.HttpRouteMatchHeader = require('./httpRouteMatchHeader'); +exports.HttpRouteMatchRule = require('./httpRouteMatchRule'); +exports.HttpRouteConfig = require('./httpRouteConfig'); +exports.HttpHostConfig = require('./httpHostConfig'); +exports.HttpConfig = require('./httpConfig'); +exports.GatewayProperties = require('./gatewayProperties'); +exports.GatewayResourceDescription = require('./gatewayResourceDescription'); exports.ImageRegistryCredential = require('./imageRegistryCredential'); -exports.ResourceLimits = require('./resourceLimits'); -exports.ResourceRequests = require('./resourceRequests'); -exports.ResourceRequirements = require('./resourceRequirements'); -exports.AvailableOperationDisplay = require('./availableOperationDisplay'); -exports.OperationResult = require('./operationResult'); -exports.ErrorModel = require('./errorModel'); exports.EnvironmentVariable = require('./environmentVariable'); exports.Setting = require('./setting'); +exports.ContainerLabel = require('./containerLabel'); exports.EndpointProperties = require('./endpointProperties'); -exports.ContainerVolume = require('./containerVolume'); +exports.ResourceRequests = require('./resourceRequests'); +exports.ResourceLimits = require('./resourceLimits'); +exports.ResourceRequirements = require('./resourceRequirements'); exports.DiagnosticsRef = require('./diagnosticsRef'); +exports.ReliableCollectionsRef = require('./reliableCollectionsRef'); +exports.ContainerState = require('./containerState'); +exports.ContainerEvent = require('./containerEvent'); +exports.ContainerInstanceView = require('./containerInstanceView'); exports.ContainerCodePackageProperties = require('./containerCodePackageProperties'); +exports.AutoScalingTrigger = require('./autoScalingTrigger'); +exports.AutoScalingMechanism = require('./autoScalingMechanism'); +exports.AutoScalingPolicy = require('./autoScalingPolicy'); +exports.ServiceResourceDescription = require('./serviceResourceDescription'); +exports.DiagnosticsSinkProperties = require('./diagnosticsSinkProperties'); +exports.DiagnosticsDescription = require('./diagnosticsDescription'); +exports.ApplicationProperties = require('./applicationProperties'); +exports.AzureInternalMonitoringPipelineSinkDescription = require('./azureInternalMonitoringPipelineSinkDescription'); +exports.ApplicationResourceDescription = require('./applicationResourceDescription'); +exports.AddRemoveReplicaScalingMechanism = require('./addRemoveReplicaScalingMechanism'); +exports.AutoScalingMetric = require('./autoScalingMetric'); +exports.AutoScalingResourceMetric = require('./autoScalingResourceMetric'); +exports.ServiceProperties = require('./serviceProperties'); exports.ServiceReplicaProperties = require('./serviceReplicaProperties'); exports.ServiceReplicaDescription = require('./serviceReplicaDescription'); -exports.NetworkRef = require('./networkRef'); -exports.AzureInternalMonitoringPipelineSinkDescription = require('./azureInternalMonitoringPipelineSinkDescription'); -exports.ApplicationResourceDescriptionList = require('./applicationResourceDescriptionList'); -exports.ServiceList = require('./serviceList'); -exports.ServiceReplicaList = require('./serviceReplicaList'); +exports.AverageLoadScalingTrigger = require('./averageLoadScalingTrigger'); +exports.ContainerLogs = require('./containerLogs'); exports.OperationListResult = require('./operationListResult'); -exports.NetworkResourceDescriptionList = require('./networkResourceDescriptionList'); +exports.SecretResourceDescriptionList = require('./secretResourceDescriptionList'); +exports.SecretValueResourceDescriptionList = require('./secretValueResourceDescriptionList'); exports.VolumeResourceDescriptionList = require('./volumeResourceDescriptionList'); +exports.NetworkResourceDescriptionList = require('./networkResourceDescriptionList'); +exports.GatewayResourceDescriptionList = require('./gatewayResourceDescriptionList'); +exports.ApplicationResourceDescriptionList = require('./applicationResourceDescriptionList'); +exports.ServiceResourceDescriptionList = require('./serviceResourceDescriptionList'); +exports.ServiceReplicaDescriptionList = require('./serviceReplicaDescriptionList'); exports.discriminators = { + 'ProvisionedResourceProperties.SecretResourceProperties' : exports.SecretResourceProperties, + 'ProvisionedResourceProperties.inlinedValue' : exports.InlinedValueSecretResourceProperties, + 'ProvisionedResourceProperties.SecretResourcePropertiesBase' : exports.SecretResourcePropertiesBase, + 'ApplicationScopedVolumeCreationParameters' : exports.ApplicationScopedVolumeCreationParameters, + 'ApplicationScopedVolumeCreationParameters.ServiceFabricVolumeDisk' : exports.ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, + 'ProvisionedResourceProperties.NetworkResourceProperties' : exports.NetworkResourceProperties, + 'ProvisionedResourceProperties.Local' : exports.LocalNetworkResourceProperties, + 'ProvisionedResourceProperties.NetworkResourcePropertiesBase' : exports.NetworkResourcePropertiesBase, + 'AutoScalingTrigger' : exports.AutoScalingTrigger, + 'AutoScalingMechanism' : exports.AutoScalingMechanism, 'DiagnosticsSinkProperties' : exports.DiagnosticsSinkProperties, - 'DiagnosticsSinkProperties.AzureInternalMonitoringPipeline' : exports.AzureInternalMonitoringPipelineSinkDescription + 'DiagnosticsSinkProperties.AzureInternalMonitoringPipeline' : exports.AzureInternalMonitoringPipelineSinkDescription, + 'AutoScalingMechanism.AddRemoveReplica' : exports.AddRemoveReplicaScalingMechanism, + 'AutoScalingMetric' : exports.AutoScalingMetric, + 'AutoScalingMetric.Resource' : exports.AutoScalingResourceMetric, + 'AutoScalingTrigger.AverageLoad' : exports.AverageLoadScalingTrigger }; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/inlinedValueSecretResourceProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/inlinedValueSecretResourceProperties.js new file mode 100644 index 0000000000..6faef46e74 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/inlinedValueSecretResourceProperties.js @@ -0,0 +1,103 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes the properties of a secret resource whose value is provided + * explicitly as plaintext. The secret resource may have multiple values, each + * being uniquely versioned. The secret value of each version is stored + * encrypted, and delivered as plaintext into the context of applications + * referencing it. + * + * @extends models['SecretResourceProperties'] + */ +class InlinedValueSecretResourceProperties extends models['SecretResourceProperties'] { + /** + * Create a InlinedValueSecretResourceProperties. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of InlinedValueSecretResourceProperties + * + * @returns {object} metadata of InlinedValueSecretResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'inlinedValue', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'InlinedValueSecretResourceProperties', + modelProperties: { + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + contentType: { + required: false, + serializedName: 'contentType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = InlinedValueSecretResourceProperties; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/localNetworkResourceProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/localNetworkResourceProperties.js new file mode 100644 index 0000000000..774dc52df1 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/localNetworkResourceProperties.js @@ -0,0 +1,102 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Information about a Service Fabric container network local to a single + * Service Fabric cluster. + * + * @extends models['NetworkResourceProperties'] + */ +class LocalNetworkResourceProperties extends models['NetworkResourceProperties'] { + /** + * Create a LocalNetworkResourceProperties. + * @member {string} [networkAddressPrefix] Address space for the local + * container network. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LocalNetworkResourceProperties + * + * @returns {object} metadata of LocalNetworkResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'Local', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'LocalNetworkResourceProperties', + modelProperties: { + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + networkAddressPrefix: { + required: false, + serializedName: 'networkAddressPrefix', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LocalNetworkResourceProperties; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/networkRef.js b/lib/services/serviceFabricMeshManagement/lib/models/networkRef.js index 3294cee7c4..b99f00f3de 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/networkRef.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/networkRef.js @@ -17,7 +17,9 @@ class NetworkRef { /** * Create a NetworkRef. - * @member {string} [name] Name of the network. + * @member {string} [name] Name of the network + * @member {array} [endpointRefs] A list of endpoints that are exposed on + * this network. */ constructor() { } @@ -42,6 +44,21 @@ class NetworkRef { type: { name: 'String' } + }, + endpointRefs: { + required: false, + serializedName: 'endpointRefs', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'EndpointRefElementType', + type: { + name: 'Composite', + className: 'EndpointRef' + } + } + } } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/networkResourceDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/networkResourceDescription.js index 2e50f60611..391dba5219 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/networkResourceDescription.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/networkResourceDescription.js @@ -20,17 +20,14 @@ const models = require('./index'); class NetworkResourceDescription extends models['TrackedResource'] { /** * Create a NetworkResourceDescription. - * @member {string} [provisioningState] State of the resource. - * @member {string} [description] User readable description of the network. - * @member {string} addressPrefix the address prefix for this network. - * @member {object} [ingressConfig] Configuration for public connectivity for - * this network. - * @member {string} [ingressConfig.qosLevel] The QoS tier for ingress. - * Possible values include: 'Bronze' - * @member {array} [ingressConfig.layer4] Configuration for layer4 public - * connectivity for this network. - * @member {string} [ingressConfig.publicIPAddress] The public IP address for - * reaching this network. + * @member {object} properties Describes properties of a network resource. + * @member {string} [properties.description] User readable description of the + * network. + * @member {string} [properties.status] Status of the network. Possible + * values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', + * 'Failed' + * @member {string} [properties.statusDetails] Gives additional information + * about the current status of the network. */ constructor() { super(); @@ -74,13 +71,6 @@ class NetworkResourceDescription extends models['TrackedResource'] { name: 'String' } }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -95,34 +85,24 @@ class NetworkResourceDescription extends models['TrackedResource'] { } } }, - provisioningState: { - required: false, - readOnly: true, - serializedName: 'properties.provisioningState', - type: { - name: 'String' - } - }, - description: { - required: false, - serializedName: 'properties.description', - type: { - name: 'String' - } - }, - addressPrefix: { + location: { required: true, - serializedName: 'properties.addressPrefix', + serializedName: 'location', type: { name: 'String' } }, - ingressConfig: { - required: false, - serializedName: 'properties.ingressConfig', + properties: { + required: true, + serializedName: 'properties', type: { name: 'Composite', - className: 'IngressConfig' + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'NetworkResourceProperties' } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/networkResourceProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/networkResourceProperties.js new file mode 100644 index 0000000000..98a182956b --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/networkResourceProperties.js @@ -0,0 +1,97 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes properties of a network resource. + * + * @extends models['NetworkResourcePropertiesBase'] + */ +class NetworkResourceProperties extends models['NetworkResourcePropertiesBase'] { + /** + * Create a NetworkResourceProperties. + * @member {string} [description] User readable description of the network. + * @member {string} [status] Status of the network. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the network. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NetworkResourceProperties + * + * @returns {object} metadata of NetworkResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkResourceProperties', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'NetworkResourceProperties', + modelProperties: { + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NetworkResourceProperties; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/networkResourcePropertiesBase.js b/lib/services/serviceFabricMeshManagement/lib/models/networkResourcePropertiesBase.js new file mode 100644 index 0000000000..ab6194f8fb --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/networkResourcePropertiesBase.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'; + +const models = require('./index'); + +/** + * This type describes the properties of a network resource, including its + * kind. + * + * @extends models['ProvisionedResourceProperties'] + */ +class NetworkResourcePropertiesBase extends models['ProvisionedResourceProperties'] { + /** + * Create a NetworkResourcePropertiesBase. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NetworkResourcePropertiesBase + * + * @returns {object} metadata of NetworkResourcePropertiesBase + * + */ + mapper() { + return { + required: false, + serializedName: 'NetworkResourcePropertiesBase', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'NetworkResourcePropertiesBase', + modelProperties: { + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NetworkResourcePropertiesBase; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/proxyResource.js b/lib/services/serviceFabricMeshManagement/lib/models/proxyResource.js index 9be7a2b299..c2f48765af 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/proxyResource.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/proxyResource.js @@ -63,13 +63,6 @@ class ProxyResource extends models['Resource'] { type: { name: 'String' } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/reliableCollectionsRef.js b/lib/services/serviceFabricMeshManagement/lib/models/reliableCollectionsRef.js new file mode 100644 index 0000000000..6f2dbfb239 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/reliableCollectionsRef.js @@ -0,0 +1,64 @@ +/* + * 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'; + +/** + * Specifying this parameter adds support for reliable collections + * + */ +class ReliableCollectionsRef { + /** + * Create a ReliableCollectionsRef. + * @member {string} name Name of ReliableCollection resource. Right now it's + * not used and you can use any string. + * @member {boolean} [doNotPersistState] False (the default) if + * ReliableCollections state is persisted to disk as usual. True if you do + * not want to persist state, in which case replication is still enabled and + * you can use ReliableCollections as distributed cache. + */ + constructor() { + } + + /** + * Defines the metadata of ReliableCollectionsRef + * + * @returns {object} metadata of ReliableCollectionsRef + * + */ + mapper() { + return { + required: false, + serializedName: 'ReliableCollectionsRef', + type: { + name: 'Composite', + className: 'ReliableCollectionsRef', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + doNotPersistState: { + required: false, + serializedName: 'doNotPersistState', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ReliableCollectionsRef; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/resource.js b/lib/services/serviceFabricMeshManagement/lib/models/resource.js index d72ebd4406..41f47ffec3 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/resource.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/resource.js @@ -25,7 +25,6 @@ class Resource extends models['BaseResource'] { * @member {string} [name] The name of the resource * @member {string} [type] The type of the resource. Ex- * Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - * @member {string} [location] The geo-location where the resource lives */ constructor() { super(); @@ -68,13 +67,6 @@ class Resource extends models['BaseResource'] { type: { name: 'String' } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/resourceRequests.js b/lib/services/serviceFabricMeshManagement/lib/models/resourceRequests.js index d72c2af315..bd1d98bc45 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/resourceRequests.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/resourceRequests.js @@ -17,7 +17,6 @@ * limits before being restarted. Currently, the requested resources are * treated as limits. * - * */ class ResourceRequests { /** diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescription.js new file mode 100644 index 0000000000..1449c2c7d2 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescription.js @@ -0,0 +1,117 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * This type describes a secret resource. + * + * @extends models['TrackedResource'] + */ +class SecretResourceDescription extends models['TrackedResource'] { + /** + * Create a SecretResourceDescription. + * @member {object} properties Describes the properties of a secret resource. + * @member {string} [properties.description] User readable description of the + * secret. + * @member {string} [properties.status] Status of the resource. Possible + * values include: 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', + * 'Failed' + * @member {string} [properties.statusDetails] Gives additional information + * about the current status of the secret. + * @member {string} [properties.contentType] The type of the content stored + * in the secret value. The value of this property is opaque to Service + * Fabric. Once set, the value of this property cannot be changed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretResourceDescription + * + * @returns {object} metadata of SecretResourceDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretResourceDescription', + type: { + name: 'Composite', + className: 'SecretResourceDescription', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + properties: { + required: true, + serializedName: 'properties', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'SecretResourceProperties' + } + } + } + } + }; + } +} + +module.exports = SecretResourceDescription; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescriptionList.js b/lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescriptionList.js new file mode 100644 index 0000000000..decc797eee --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretResourceDescriptionList.js @@ -0,0 +1,67 @@ +/* + * 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'; + +/** + * A pageable list of secret resources. + */ +class SecretResourceDescriptionList extends Array { + /** + * Create a SecretResourceDescriptionList. + * @member {string} [nextLink] URI to fetch the next page of the list. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretResourceDescriptionList + * + * @returns {object} metadata of SecretResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretResourceDescriptionList', + type: { + name: 'Composite', + className: 'SecretResourceDescriptionList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SecretResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'SecretResourceDescription' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretResourceDescriptionList; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretResourceProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/secretResourceProperties.js new file mode 100644 index 0000000000..2a3bead573 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretResourceProperties.js @@ -0,0 +1,107 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Describes the properties of a secret resource. + * + * @extends models['SecretResourcePropertiesBase'] + */ +class SecretResourceProperties extends models['SecretResourcePropertiesBase'] { + /** + * Create a SecretResourceProperties. + * @member {string} [description] User readable description of the secret. + * @member {string} [status] Status of the resource. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the secret. + * @member {string} [contentType] The type of the content stored in the + * secret value. The value of this property is opaque to Service Fabric. Once + * set, the value of this property cannot be changed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretResourceProperties + * + * @returns {object} metadata of SecretResourceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretResourceProperties', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'SecretResourceProperties', + modelProperties: { + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + contentType: { + required: false, + serializedName: 'contentType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretResourceProperties; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretResourcePropertiesBase.js b/lib/services/serviceFabricMeshManagement/lib/models/secretResourcePropertiesBase.js new file mode 100644 index 0000000000..594c0a7bae --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretResourcePropertiesBase.js @@ -0,0 +1,70 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * This type describes the properties of a secret resource, including its kind. + * + * @extends models['ProvisionedResourceProperties'] + */ +class SecretResourcePropertiesBase extends models['ProvisionedResourceProperties'] { + /** + * Create a SecretResourcePropertiesBase. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretResourcePropertiesBase + * + * @returns {object} metadata of SecretResourcePropertiesBase + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretResourcePropertiesBase', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'kind', + clientName: 'kind' + }, + uberParent: 'ProvisionedResourceProperties', + className: 'SecretResourcePropertiesBase', + modelProperties: { + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretResourcePropertiesBase; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretValue.js b/lib/services/serviceFabricMeshManagement/lib/models/secretValue.js new file mode 100644 index 0000000000..f9f33de524 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretValue.js @@ -0,0 +1,52 @@ +/* + * 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'; + +/** + * This type represents the unencrypted value of the secret. + * + */ +class SecretValue { + /** + * Create a SecretValue. + * @member {string} [value] The actual value of the secret. + */ + constructor() { + } + + /** + * Defines the metadata of SecretValue + * + * @returns {object} metadata of SecretValue + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretValue', + type: { + name: 'Composite', + className: 'SecretValue', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretValue; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretValueProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/secretValueProperties.js new file mode 100644 index 0000000000..4949e1b599 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretValueProperties.js @@ -0,0 +1,52 @@ +/* + * 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'; + +/** + * This type describes properties of secret value resource. + * + */ +class SecretValueProperties { + /** + * Create a SecretValueProperties. + * @member {string} [value] The actual value of the secret. + */ + constructor() { + } + + /** + * Defines the metadata of SecretValueProperties + * + * @returns {object} metadata of SecretValueProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretValueProperties', + type: { + name: 'Composite', + className: 'SecretValueProperties', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretValueProperties; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescription.js new file mode 100644 index 0000000000..be1a380258 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescription.js @@ -0,0 +1,111 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * This type describes a value of a secret resource. The name of this resource + * is the version identifier corresponding to this secret value. + * + * @extends models['TrackedResource'] + */ +class SecretValueResourceDescription extends models['TrackedResource'] { + /** + * Create a SecretValueResourceDescription. + * @member {string} [provisioningState] State of the resource. + * @member {string} [value] The actual value of the secret. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretValueResourceDescription + * + * @returns {object} metadata of SecretValueResourceDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretValueResourceDescription', + type: { + name: 'Composite', + className: 'SecretValueResourceDescription', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'properties.value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretValueResourceDescription; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescriptionList.js b/lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescriptionList.js new file mode 100644 index 0000000000..70e8993313 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/secretValueResourceDescriptionList.js @@ -0,0 +1,68 @@ +/* + * 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'; + +/** + * A pageable list of values of a secret resource. The information does not + * include only the name of the value and not the actual unecrypted value. + */ +class SecretValueResourceDescriptionList extends Array { + /** + * Create a SecretValueResourceDescriptionList. + * @member {string} [nextLink] URI to fetch the next page of the list. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SecretValueResourceDescriptionList + * + * @returns {object} metadata of SecretValueResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'SecretValueResourceDescriptionList', + type: { + name: 'Composite', + className: 'SecretValueResourceDescriptionList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SecretValueResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'SecretValueResourceDescription' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SecretValueResourceDescriptionList; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/serviceProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/serviceProperties.js new file mode 100644 index 0000000000..aa5162600d --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/serviceProperties.js @@ -0,0 +1,119 @@ +/* + * 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'; + +/** + * Describes properties of a service resource. + * + */ +class ServiceProperties { + /** + * Create a ServiceProperties. + * @member {string} [description] User readable description of the service. + * @member {number} [replicaCount] The number of replicas of the service to + * create. Defaults to 1 if not specified. + * @member {array} [autoScalingPolicies] Auto scaling policies + * @member {string} [status] Status of the service. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the service. + * @member {string} [healthState] Describes the health state of an + * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' + * @member {string} [unhealthyEvaluation] When the service's health state is + * not 'Ok', this additional details from service fabric Health Manager for + * the user to know why the service is marked unhealthy. + */ + constructor() { + } + + /** + * Defines the metadata of ServiceProperties + * + * @returns {object} metadata of ServiceProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceProperties', + type: { + name: 'Composite', + className: 'ServiceProperties', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + replicaCount: { + required: false, + serializedName: 'replicaCount', + type: { + name: 'Number' + } + }, + autoScalingPolicies: { + required: false, + serializedName: 'autoScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AutoScalingPolicyElementType', + type: { + name: 'Composite', + className: 'AutoScalingPolicy' + } + } + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, + healthState: { + required: false, + readOnly: true, + serializedName: 'healthState', + type: { + name: 'String' + } + }, + unhealthyEvaluation: { + required: false, + readOnly: true, + serializedName: 'unhealthyEvaluation', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceProperties; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescription.js index 975722b462..1156262906 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescription.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescription.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * This type describes a replica of a service resource. + * Describes a replica of a service resource. * * @extends models['ServiceReplicaProperties'] */ class ServiceReplicaDescription extends models['ServiceReplicaProperties'] { /** * Create a ServiceReplicaDescription. - * @member {string} [replicaName] Name of the replica. + * @member {string} replicaName Name of the replica. */ constructor() { super(); @@ -86,7 +86,7 @@ class ServiceReplicaDescription extends models['ServiceReplicaProperties'] { } }, replicaName: { - required: false, + required: true, serializedName: 'replicaName', type: { name: 'String' diff --git a/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescriptionList.js b/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescriptionList.js new file mode 100644 index 0000000000..0bc3a722b7 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaDescriptionList.js @@ -0,0 +1,67 @@ +/* + * 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'; + +/** + * A pageable list of service replicas. + */ +class ServiceReplicaDescriptionList extends Array { + /** + * Create a ServiceReplicaDescriptionList. + * @member {string} [nextLink] URI to fetch the next page of the list. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceReplicaDescriptionList + * + * @returns {object} metadata of ServiceReplicaDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceReplicaDescriptionList', + type: { + name: 'Composite', + className: 'ServiceReplicaDescriptionList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceReplicaDescriptionElementType', + type: { + name: 'Composite', + className: 'ServiceReplicaDescription' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceReplicaDescriptionList; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaProperties.js index bb525a4ec4..746faab5e5 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaProperties.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/serviceReplicaProperties.js @@ -17,9 +17,8 @@ class ServiceReplicaProperties { /** * Create a ServiceReplicaProperties. - * @member {string} osType The Operating system type required by the code in - * service. - * . Possible values include: 'Linux', 'Windows' + * @member {string} osType The operation system required by the code in + * service. Possible values include: 'Linux', 'Windows' * @member {array} codePackages Describes the set of code packages that forms * the service. A code package describes the container and the properties for * running it. All the code packages are started together on the same host diff --git a/lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescription.js index a0f7466792..d5743f673d 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescription.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescription.js @@ -20,9 +20,9 @@ const models = require('./index'); class ServiceResourceDescription extends models['ManagedProxyResource'] { /** * Create a ServiceResourceDescription. - * @member {string} osType The Operating system type required by the code in - * service. - * . Possible values include: 'Linux', 'Windows' + * @member {string} [provisioningState] State of the resource. + * @member {string} osType The operation system required by the code in + * service. Possible values include: 'Linux', 'Windows' * @member {array} codePackages Describes the set of code packages that forms * the service. A code package describes the container and the properties for * running it. All the code packages are started together on the same host @@ -38,12 +38,17 @@ class ServiceResourceDescription extends models['ManagedProxyResource'] { * @member {string} [description] User readable description of the service. * @member {number} [replicaCount] The number of replicas of the service to * create. Defaults to 1 if not specified. - * @member {string} [healthState] The health state of a resource such as - * Application, Service, or Network. Possible values include: 'Invalid', - * 'Ok', 'Warning', 'Error', 'Unknown' - * @member {string} [status] Represents the status of the service. Possible - * values include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - * 'Failed' + * @member {array} [autoScalingPolicies] Auto scaling policies + * @member {string} [status] Status of the service. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the service. + * @member {string} [healthState] Describes the health state of an + * application resource. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' + * @member {string} [unhealthyEvaluation] When the service's health state is + * not 'Ok', this additional details from service fabric Health Manager for + * the user to know why the service is marked unhealthy. */ constructor() { super(); @@ -86,6 +91,14 @@ class ServiceResourceDescription extends models['ManagedProxyResource'] { name: 'String' } }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, osType: { required: true, serializedName: 'properties.osType', @@ -145,17 +158,49 @@ class ServiceResourceDescription extends models['ManagedProxyResource'] { name: 'Number' } }, + autoScalingPolicies: { + required: false, + serializedName: 'properties.autoScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AutoScalingPolicyElementType', + type: { + name: 'Composite', + className: 'AutoScalingPolicy' + } + } + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'properties.statusDetails', + type: { + name: 'String' + } + }, healthState: { required: false, + readOnly: true, serializedName: 'properties.healthState', type: { name: 'String' } }, - status: { + unhealthyEvaluation: { required: false, readOnly: true, - serializedName: 'properties.status', + serializedName: 'properties.unhealthyEvaluation', type: { name: 'String' } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescriptionList.js b/lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescriptionList.js new file mode 100644 index 0000000000..a38795d352 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/serviceResourceDescriptionList.js @@ -0,0 +1,67 @@ +/* + * 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'; + +/** + * A pageable list of service resources. + */ +class ServiceResourceDescriptionList extends Array { + /** + * Create a ServiceResourceDescriptionList. + * @member {string} [nextLink] URI to fetch the next page of the list. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceResourceDescriptionList + * + * @returns {object} metadata of ServiceResourceDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceResourceDescriptionList', + type: { + name: 'Composite', + className: 'ServiceResourceDescriptionList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceResourceDescriptionElementType', + type: { + name: 'Composite', + className: 'ServiceResourceDescription' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceResourceDescriptionList; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/setting.js b/lib/services/serviceFabricMeshManagement/lib/models/setting.js index 08c2599bd0..234443be5c 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/setting.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/setting.js @@ -11,7 +11,9 @@ 'use strict'; /** - * Describes a setting for the container. + * Describes a setting for the container. The setting file path can be fetched + * from environment variable "Fabric_SettingPath". The path for Windows + * container is "C:\\secrets". The path for Linux container is "/var/secrets". * */ class Setting { diff --git a/lib/services/serviceFabricMeshManagement/lib/models/tcpConfig.js b/lib/services/serviceFabricMeshManagement/lib/models/tcpConfig.js new file mode 100644 index 0000000000..78868cec39 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/tcpConfig.js @@ -0,0 +1,77 @@ +/* + * 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'; + +/** + * Describes the tcp configuration for external connectivity for this network. + * + */ +class TcpConfig { + /** + * Create a TcpConfig. + * @member {string} name tcp gateway config name. + * @member {number} port Specifies the port at which the service endpoint + * below needs to be exposed. + * @member {object} destination Describes destination endpoint for routing + * traffic. + * @member {string} [destination.applicationName] Name of the service fabric + * Mesh application. + * @member {string} [destination.serviceName] service that contains the + * endpoint. + * @member {string} [destination.endpointName] name of the endpoint in the + * service. + */ + constructor() { + } + + /** + * Defines the metadata of TcpConfig + * + * @returns {object} metadata of TcpConfig + * + */ + mapper() { + return { + required: false, + serializedName: 'TcpConfig', + type: { + name: 'Composite', + className: 'TcpConfig', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + port: { + required: true, + serializedName: 'port', + type: { + name: 'Number' + } + }, + destination: { + required: true, + serializedName: 'destination', + type: { + name: 'Composite', + className: 'GatewayDestination' + } + } + } + } + }; + } +} + +module.exports = TcpConfig; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/trackedResource.js b/lib/services/serviceFabricMeshManagement/lib/models/trackedResource.js index 79f9d74156..102a91ef01 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/trackedResource.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/trackedResource.js @@ -22,6 +22,7 @@ class TrackedResource extends models['Resource'] { /** * Create a TrackedResource. * @member {object} [tags] Resource tags. + * @member {string} location The geo-location where the resource lives */ constructor() { super(); @@ -65,13 +66,6 @@ class TrackedResource extends models['Resource'] { name: 'String' } }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -85,6 +79,13 @@ class TrackedResource extends models['Resource'] { } } } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } } } } diff --git a/lib/services/serviceFabricMeshManagement/lib/models/volumeProperties.js b/lib/services/serviceFabricMeshManagement/lib/models/volumeProperties.js index 2f87b79477..708d70cdf2 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/volumeProperties.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/volumeProperties.js @@ -11,13 +11,17 @@ 'use strict'; /** - * This type describes properties of a volume resource. + * Describes properties of a volume resource. * */ class VolumeProperties { /** * Create a VolumeProperties. * @member {string} [description] User readable description of the volume. + * @member {string} [status] Status of the volume. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the volume. * @member {object} [azureFileParameters] This type describes a volume * provided by an Azure Files file share. * @member {string} [azureFileParameters.accountName] Name of the Azure @@ -51,6 +55,22 @@ class VolumeProperties { name: 'String' } }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'statusDetails', + type: { + name: 'String' + } + }, provider: { required: true, isConstant: true, diff --git a/lib/services/serviceFabricMeshManagement/lib/models/volumeReference.js b/lib/services/serviceFabricMeshManagement/lib/models/volumeReference.js new file mode 100644 index 0000000000..735365ba28 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/models/volumeReference.js @@ -0,0 +1,70 @@ +/* + * 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'; + +/** + * Describes a reference to a volume resource. + * + */ +class VolumeReference { + /** + * Create a VolumeReference. + * @member {string} name Name of the volume being referenced. + * @member {boolean} [readOnly] The flag indicating whether the volume is + * read only. Default is 'false'. + * @member {string} destinationPath The path within the container at which + * the volume should be mounted. Only valid path characters are allowed. + */ + constructor() { + } + + /** + * Defines the metadata of VolumeReference + * + * @returns {object} metadata of VolumeReference + * + */ + mapper() { + return { + required: false, + serializedName: 'VolumeReference', + type: { + name: 'Composite', + className: 'VolumeReference', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + readOnly: { + required: false, + serializedName: 'readOnly', + type: { + name: 'Boolean' + } + }, + destinationPath: { + required: true, + serializedName: 'destinationPath', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VolumeReference; diff --git a/lib/services/serviceFabricMeshManagement/lib/models/volumeResourceDescription.js b/lib/services/serviceFabricMeshManagement/lib/models/volumeResourceDescription.js index 30967aed94..630521fa2d 100644 --- a/lib/services/serviceFabricMeshManagement/lib/models/volumeResourceDescription.js +++ b/lib/services/serviceFabricMeshManagement/lib/models/volumeResourceDescription.js @@ -22,6 +22,10 @@ class VolumeResourceDescription extends models['TrackedResource'] { * Create a VolumeResourceDescription. * @member {string} [provisioningState] State of the resource. * @member {string} [description] User readable description of the volume. + * @member {string} [status] Status of the volume. Possible values include: + * 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + * @member {string} [statusDetails] Gives additional information about the + * current status of the volume. * @member {object} [azureFileParameters] This type describes a volume * provided by an Azure Files file share. * @member {string} [azureFileParameters.accountName] Name of the Azure @@ -73,13 +77,6 @@ class VolumeResourceDescription extends models['TrackedResource'] { name: 'String' } }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, tags: { required: false, serializedName: 'tags', @@ -94,6 +91,13 @@ class VolumeResourceDescription extends models['TrackedResource'] { } } }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, @@ -109,6 +113,22 @@ class VolumeResourceDescription extends models['TrackedResource'] { name: 'String' } }, + status: { + required: false, + readOnly: true, + serializedName: 'properties.status', + type: { + name: 'String' + } + }, + statusDetails: { + required: false, + readOnly: true, + serializedName: 'properties.statusDetails', + type: { + name: 'String' + } + }, provider: { required: true, isConstant: true, diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/application.js b/lib/services/serviceFabricMeshManagement/lib/operations/application.js index d08c846bca..ec00c4b559 100644 --- a/lib/services/serviceFabricMeshManagement/lib/operations/application.js +++ b/lib/services/serviceFabricMeshManagement/lib/operations/application.js @@ -17,28 +17,25 @@ const WebResource = msRest.WebResource; /** * @summary Creates or updates an application resource. * - * Creates an application resource with the specified name and description. If - * an application with the same name already exists, then its description is - * updated to the one indicated in this request. - * - * Use network resources to provide public connectivity to the services of an - * application. - * + * Creates an application resource with the specified name, description and + * properties. If an application resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * - * @param {object} applicationResourceDescription Description for creating an - * application resource. + * @param {object} applicationResourceDescription Description for creating a + * Application resource. * * @param {string} [applicationResourceDescription.description] User readable * description of the application. * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. * * @param {object} [applicationResourceDescription.diagnostics] Describes the * diagnostics definition and usage for an application resource. @@ -53,8 +50,15 @@ const WebResource = msRest.WebResource; * The sinks to be used if diagnostics is enabled. Sink choices can be * overridden at the service and code package level. * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * * @param {object} [applicationResourceDescription.tags] Resource tags. * + * @param {string} applicationResourceDescription.location The geo-location + * where the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -74,7 +78,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, applicationName, applicationResourceDescription, options, callback) { +function _create(resourceGroupName, applicationResourceName, applicationResourceDescription, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -92,8 +96,8 @@ function _create(resourceGroupName, applicationName, applicationResourceDescript 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 (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); } if (applicationResourceDescription === null || applicationResourceDescription === undefined) { throw new Error('applicationResourceDescription cannot be null or undefined.'); @@ -107,10 +111,10 @@ function _create(resourceGroupName, applicationName, applicationResourceDescript // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{applicationName}', applicationName); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -158,7 +162,7 @@ function _create(resourceGroupName, applicationName, applicationResourceDescript return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 201) { + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -227,15 +231,14 @@ function _create(resourceGroupName, applicationName, applicationResourceDescript } /** - * @summary Gets the application resource. + * @summary Gets the application resource with the given name. * - * Gets the information about the application resource with a given name. The - * information includes the information about the application's services and - * other runtime properties. + * Gets the information about the application resource with the given name. The + * information include the description and other properties of the application. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -256,7 +259,7 @@ function _create(resourceGroupName, applicationName, applicationResourceDescript * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, applicationName, options, callback) { +function _get(resourceGroupName, applicationResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -274,8 +277,8 @@ function _get(resourceGroupName, applicationName, 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 (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -286,10 +289,10 @@ function _get(resourceGroupName, applicationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{applicationName}', applicationName); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -381,7 +384,7 @@ function _get(resourceGroupName, applicationName, options, callback) { * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -400,7 +403,7 @@ function _get(resourceGroupName, applicationName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, applicationName, options, callback) { +function _deleteMethod(resourceGroupName, applicationResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -418,8 +421,8 @@ function _deleteMethod(resourceGroupName, applicationName, 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 (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -430,10 +433,10 @@ function _deleteMethod(resourceGroupName, applicationName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{applicationName}', applicationName); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -467,7 +470,7 @@ function _deleteMethod(resourceGroupName, applicationName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -505,8 +508,8 @@ function _deleteMethod(resourceGroupName, applicationName, options, callback) { * @summary Gets all the application resources in a given resource group. * * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * group. The information include the description and other properties of the + * Application. * * @param {string} resourceGroupName Azure resource group name * @@ -646,9 +649,9 @@ function _listByResourceGroup(resourceGroupName, options, callback) { /** * @summary Gets all the application resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {object} [options] Optional Parameters. * @@ -783,8 +786,8 @@ function _listBySubscription(options, callback) { * @summary Gets all the application resources in a given resource group. * * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * group. The information include the description and other properties of the + * Application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -915,9 +918,9 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { /** * @summary Gets all the application resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1065,28 +1068,25 @@ class Application { /** * @summary Creates or updates an application resource. * - * Creates an application resource with the specified name and description. If - * an application with the same name already exists, then its description is - * updated to the one indicated in this request. - * - * Use network resources to provide public connectivity to the services of an - * application. - * + * Creates an application resource with the specified name, description and + * properties. If an application resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * - * @param {object} applicationResourceDescription Description for creating an - * application resource. + * @param {object} applicationResourceDescription Description for creating a + * Application resource. * * @param {string} [applicationResourceDescription.description] User readable * description of the application. * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. * * @param {object} [applicationResourceDescription.diagnostics] Describes the * diagnostics definition and usage for an application resource. @@ -1101,8 +1101,15 @@ class Application { * The sinks to be used if diagnostics is enabled. Sink choices can be * overridden at the service and code package level. * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * * @param {object} [applicationResourceDescription.tags] Resource tags. * + * @param {string} applicationResourceDescription.location The geo-location + * where the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1114,11 +1121,11 @@ class Application { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, applicationName, applicationResourceDescription, options) { + createWithHttpOperationResponse(resourceGroupName, applicationResourceName, applicationResourceDescription, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, applicationName, applicationResourceDescription, options, (err, result, request, response) => { + self._create(resourceGroupName, applicationResourceName, applicationResourceDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1131,28 +1138,25 @@ class Application { /** * @summary Creates or updates an application resource. * - * Creates an application resource with the specified name and description. If - * an application with the same name already exists, then its description is - * updated to the one indicated in this request. - * - * Use network resources to provide public connectivity to the services of an - * application. - * + * Creates an application resource with the specified name, description and + * properties. If an application resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * - * @param {object} applicationResourceDescription Description for creating an - * application resource. + * @param {object} applicationResourceDescription Description for creating a + * Application resource. * * @param {string} [applicationResourceDescription.description] User readable * description of the application. * - * @param {string} [applicationResourceDescription.debugParams] Internal use. - * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. * * @param {object} [applicationResourceDescription.diagnostics] Describes the * diagnostics definition and usage for an application resource. @@ -1167,8 +1171,15 @@ class Application { * The sinks to be used if diagnostics is enabled. Sink choices can be * overridden at the service and code package level. * + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. + * * @param {object} [applicationResourceDescription.tags] Resource tags. * + * @param {string} applicationResourceDescription.location The geo-location + * where the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1197,7 +1208,7 @@ class Application { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, applicationName, applicationResourceDescription, options, optionalCallback) { + create(resourceGroupName, applicationResourceName, applicationResourceDescription, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1206,27 +1217,26 @@ class Application { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, applicationName, applicationResourceDescription, options, (err, result, request, response) => { + self._create(resourceGroupName, applicationResourceName, applicationResourceDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, applicationName, applicationResourceDescription, options, optionalCallback); + return self._create(resourceGroupName, applicationResourceName, applicationResourceDescription, options, optionalCallback); } } /** - * @summary Gets the application resource. + * @summary Gets the application resource with the given name. * - * Gets the information about the application resource with a given name. The - * information includes the information about the application's services and - * other runtime properties. + * Gets the information about the application resource with the given name. The + * information include the description and other properties of the application. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1239,11 +1249,11 @@ class Application { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, applicationName, options) { + getWithHttpOperationResponse(resourceGroupName, applicationResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, applicationName, options, (err, result, request, response) => { + self._get(resourceGroupName, applicationResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1254,15 +1264,14 @@ class Application { } /** - * @summary Gets the application resource. + * @summary Gets the application resource with the given name. * - * Gets the information about the application resource with a given name. The - * information includes the information about the application's services and - * other runtime properties. + * Gets the information about the application resource with the given name. The + * information include the description and other properties of the application. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1292,7 +1301,7 @@ class Application { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, applicationName, options, optionalCallback) { + get(resourceGroupName, applicationResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1301,14 +1310,14 @@ class Application { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, applicationName, options, (err, result, request, response) => { + self._get(resourceGroupName, applicationResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, applicationName, options, optionalCallback); + return self._get(resourceGroupName, applicationResourceName, options, optionalCallback); } } @@ -1319,7 +1328,7 @@ class Application { * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1332,11 +1341,11 @@ class Application { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, applicationName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, applicationResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, applicationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, applicationResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1353,7 +1362,7 @@ class Application { * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1381,7 +1390,7 @@ class Application { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, applicationName, options, optionalCallback) { + deleteMethod(resourceGroupName, applicationResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1390,14 +1399,14 @@ class Application { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, applicationName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, applicationResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, applicationName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, applicationResourceName, options, optionalCallback); } } @@ -1405,8 +1414,8 @@ class Application { * @summary Gets all the application resources in a given resource group. * * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * group. The information include the description and other properties of the + * Application. * * @param {string} resourceGroupName Azure resource group name * @@ -1439,8 +1448,8 @@ class Application { * @summary Gets all the application resources in a given resource group. * * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * group. The information include the description and other properties of the + * Application. * * @param {string} resourceGroupName Azure resource group name * @@ -1495,9 +1504,9 @@ class Application { /** * @summary Gets all the application resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {object} [options] Optional Parameters. * @@ -1527,9 +1536,9 @@ class Application { /** * @summary Gets all the application resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {object} [options] Optional Parameters. * @@ -1583,8 +1592,8 @@ class Application { * @summary Gets all the application resources in a given resource group. * * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * group. The information include the description and other properties of the + * Application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1618,8 +1627,8 @@ class Application { * @summary Gets all the application resources in a given resource group. * * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * group. The information include the description and other properties of the + * Application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1675,9 +1684,9 @@ class Application { /** * @summary Gets all the application resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1710,9 +1719,9 @@ class Application { /** * @summary Gets all the application resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/codePackage.js b/lib/services/serviceFabricMeshManagement/lib/operations/codePackage.js index f993e36745..d0a5f31ad6 100644 --- a/lib/services/serviceFabricMeshManagement/lib/operations/codePackage.js +++ b/lib/services/serviceFabricMeshManagement/lib/operations/codePackage.js @@ -15,19 +15,20 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * @summary Gets the logs for the container. + * @summary Gets the logs from the container. * - * Get the logs for the container of a given code package of an application. + * Gets the logs for the container of the specified code package of the service + * replica. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * - * @param {string} serviceName The identity of the service. + * @param {string} serviceResourceName The identity of the service. * - * @param {string} replicaName The identity of the service replica. + * @param {string} replicaName Service Fabric replica name. * - * @param {string} codePackageName The name of the code package. + * @param {string} codePackageName The name of code package of the service. * * @param {object} [options] Optional Parameters. * @@ -50,7 +51,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getContainerLog(resourceGroupName, applicationName, serviceName, replicaName, codePackageName, options, callback) { +function _getContainerLogs(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, codePackageName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -69,11 +70,11 @@ function _getContainerLog(resourceGroupName, applicationName, serviceName, repli 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 (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); } - if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') { - throw new Error('serviceName cannot be null or undefined and it must be of type string.'); + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); } if (replicaName === null || replicaName === undefined || typeof replicaName.valueOf() !== 'string') { throw new Error('replicaName cannot be null or undefined and it must be of type string.'); @@ -93,13 +94,13 @@ function _getContainerLog(resourceGroupName, applicationName, serviceName, repli // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas/{replicaName}/codePackages/{codePackageName}/logs'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas/{replicaName}/codePackages/{codePackageName}/logs'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{applicationName}', applicationName); - requestUrl = requestUrl.replace('{serviceName}', serviceName); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); requestUrl = requestUrl.replace('{replicaName}', replicaName); - requestUrl = requestUrl.replace('{codePackageName}', codePackageName); + requestUrl = requestUrl.replace('{codePackageName}', encodeURIComponent(codePackageName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (tail !== null && tail !== undefined) { @@ -195,23 +196,24 @@ class CodePackage { */ constructor(client) { this.client = client; - this._getContainerLog = _getContainerLog; + this._getContainerLogs = _getContainerLogs; } /** - * @summary Gets the logs for the container. + * @summary Gets the logs from the container. * - * Get the logs for the container of a given code package of an application. + * Gets the logs for the container of the specified code package of the service + * replica. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * - * @param {string} serviceName The identity of the service. + * @param {string} serviceResourceName The identity of the service. * - * @param {string} replicaName The identity of the service replica. + * @param {string} replicaName Service Fabric replica name. * - * @param {string} codePackageName The name of the code package. + * @param {string} codePackageName The name of code package of the service. * * @param {object} [options] Optional Parameters. * @@ -227,11 +229,11 @@ class CodePackage { * * @reject {Error} - The error object. */ - getContainerLogWithHttpOperationResponse(resourceGroupName, applicationName, serviceName, replicaName, codePackageName, options) { + getContainerLogsWithHttpOperationResponse(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, codePackageName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getContainerLog(resourceGroupName, applicationName, serviceName, replicaName, codePackageName, options, (err, result, request, response) => { + self._getContainerLogs(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, codePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -242,19 +244,20 @@ class CodePackage { } /** - * @summary Gets the logs for the container. + * @summary Gets the logs from the container. * - * Get the logs for the container of a given code package of an application. + * Gets the logs for the container of the specified code package of the service + * replica. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. * - * @param {string} serviceName The identity of the service. + * @param {string} serviceResourceName The identity of the service. * - * @param {string} replicaName The identity of the service replica. + * @param {string} replicaName Service Fabric replica name. * - * @param {string} codePackageName The name of the code package. + * @param {string} codePackageName The name of code package of the service. * * @param {object} [options] Optional Parameters. * @@ -286,7 +289,7 @@ class CodePackage { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getContainerLog(resourceGroupName, applicationName, serviceName, replicaName, codePackageName, options, optionalCallback) { + getContainerLogs(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, codePackageName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -295,14 +298,14 @@ class CodePackage { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getContainerLog(resourceGroupName, applicationName, serviceName, replicaName, codePackageName, options, (err, result, request, response) => { + self._getContainerLogs(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, codePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getContainerLog(resourceGroupName, applicationName, serviceName, replicaName, codePackageName, options, optionalCallback); + return self._getContainerLogs(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, codePackageName, options, optionalCallback); } } diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/gateway.js b/lib/services/serviceFabricMeshManagement/lib/operations/gateway.js new file mode 100644 index 0000000000..f367ac0a16 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/operations/gateway.js @@ -0,0 +1,1758 @@ +/* + * 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'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary Creates or updates a gateway resource. + * + * Creates a gateway resource with the specified name, description and + * properties. If a gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use gateway resources + * to create a gateway for public connectivity for services within your + * application. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [gatewayResourceDescription.tags] Resource tags. + * + * @param {string} gatewayResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _create(resourceGroupName, gatewayResourceName, gatewayResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (gatewayResourceName === null || gatewayResourceName === undefined || typeof gatewayResourceName.valueOf() !== 'string') { + throw new Error('gatewayResourceName cannot be null or undefined and it must be of type string.'); + } + if (gatewayResourceDescription === null || gatewayResourceDescription === undefined) { + throw new Error('gatewayResourceDescription cannot be null or undefined.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways/{gatewayResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayResourceName}', gatewayResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (gatewayResourceDescription !== null && gatewayResourceDescription !== undefined) { + let requestModelMapper = new client.models['GatewayResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, gatewayResourceDescription, 'gatewayResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(gatewayResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the gateway resource with the given name. + * + * Gets the information about the gateway resource with the given name. The + * information include the description and other properties of the gateway. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, gatewayResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (gatewayResourceName === null || gatewayResourceName === undefined || typeof gatewayResourceName.valueOf() !== 'string') { + throw new Error('gatewayResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways/{gatewayResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayResourceName}', gatewayResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the gateway resource. + * + * Deletes the gateway resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, gatewayResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (gatewayResourceName === null || gatewayResourceName === undefined || typeof gatewayResourceName.valueOf() !== 'string') { + throw new Error('gatewayResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways/{gatewayResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayResourceName}', gatewayResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the gateway resources in a given resource group. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/gateways'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the gateway resources in a given subscription. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscription(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/gateways'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the gateway resources in a given resource group. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the gateway resources in a given subscription. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GatewayResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Gateway. */ +class Gateway { + /** + * Create a Gateway. + * @param {ServiceFabricMeshManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._create = _create; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listByResourceGroup = _listByResourceGroup; + this._listBySubscription = _listBySubscription; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listBySubscriptionNext = _listBySubscriptionNext; + } + + /** + * @summary Creates or updates a gateway resource. + * + * Creates a gateway resource with the specified name, description and + * properties. If a gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use gateway resources + * to create a gateway for public connectivity for services within your + * application. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [gatewayResourceDescription.tags] Resource tags. + * + * @param {string} gatewayResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName, gatewayResourceName, gatewayResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(resourceGroupName, gatewayResourceName, gatewayResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates or updates a gateway resource. + * + * Creates a gateway resource with the specified name, description and + * properties. If a gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use gateway resources + * to create a gateway for public connectivity for services within your + * application. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [gatewayResourceDescription.tags] Resource tags. + * + * @param {string} gatewayResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + create(resourceGroupName, gatewayResourceName, gatewayResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._create(resourceGroupName, gatewayResourceName, gatewayResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(resourceGroupName, gatewayResourceName, gatewayResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the gateway resource with the given name. + * + * Gets the information about the gateway resource with the given name. The + * information include the description and other properties of the gateway. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, gatewayResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, gatewayResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the gateway resource with the given name. + * + * Gets the information about the gateway resource with the given name. The + * information include the description and other properties of the gateway. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, gatewayResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, gatewayResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, gatewayResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the gateway resource. + * + * Deletes the gateway resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, gatewayResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, gatewayResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the gateway resource. + * + * Deletes the gateway resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, gatewayResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, gatewayResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, gatewayResourceName, options, optionalCallback); + } + } + + /** + * @summary Gets all the gateway resources in a given resource group. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the gateway resources in a given resource group. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * @summary Gets all the gateway resources in a given subscription. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the gateway resources in a given subscription. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscription(options, optionalCallback); + } + } + + /** + * @summary Gets all the gateway resources in a given resource group. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the gateway resources in a given resource group. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary Gets all the gateway resources in a given subscription. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the gateway resources in a given subscription. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = Gateway; diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/index.d.ts b/lib/services/serviceFabricMeshManagement/lib/operations/index.d.ts index 655f18e495..46fad47171 100644 --- a/lib/services/serviceFabricMeshManagement/lib/operations/index.d.ts +++ b/lib/services/serviceFabricMeshManagement/lib/operations/index.d.ts @@ -14,53 +14,78 @@ import * as models from '../models'; /** * @class - * Application + * Operations * __NOTE__: An instance of this class is automatically created for an * instance of the ServiceFabricMeshManagementClient. */ -export interface Application { +export interface Operations { /** - * @summary Creates or updates an application resource. + * @summary Lists all of the available operations. * - * Creates an application resource with the specified name and description. If - * an application with the same name already exists, then its description is - * updated to the one indicated in this request. + * Lists all the available operations provided by Service Fabric SeaBreeze + * resource provider. * - * Use network resources to provide public connectivity to the services of an - * application. + * @param {object} [options] Optional Parameters. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} resourceGroupName Azure resource group name + * @returns {Promise} A promise is returned * - * @param {string} applicationName The identity of the application. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} applicationResourceDescription Description for creating an - * application resource. + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists all of the available operations. * - * @param {string} [applicationResourceDescription.description] User readable - * description of the application. + * Lists all the available operations provided by Service Fabric SeaBreeze + * resource provider. * - * @param {string} [applicationResourceDescription.debugParams] Internal use. + * @param {object} [options] Optional Parameters. * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [applicationResourceDescription.diagnostics] Describes the - * diagnostics definition and usage for an application resource. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {array} [applicationResourceDescription.diagnostics.sinks] List of - * supported sinks that can be referenced. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status - * of whether or not sinks are enabled. + * {Promise} A promise is returned. * - * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] - * The sinks to be used if diagnostics is enabled. Sink choices can be - * overridden at the service and code package level. + * @resolve {OperationListResult} - The deserialized result object. * - * @param {object} [applicationResourceDescription.tags] Resource tags. + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists all of the available operations. + * + * Lists all the available operations provided by Service Fabric SeaBreeze + * resource provider. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -69,52 +94,140 @@ export interface Application { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, applicationName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Creates or updates an application resource. + * @summary Lists all of the available operations. + * + * Lists all the available operations provided by Service Fabric SeaBreeze + * resource provider. * - * Creates an application resource with the specified name and description. If - * an application with the same name already exists, then its description is - * updated to the one indicated in this request. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * Use network resources to provide public connectivity to the services of an - * application. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Secret + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricMeshManagementClient. + */ +export interface Secret { + + + /** + * @summary Creates or updates a secret resource. * + * Creates a secret resource with the specified name, description and + * properties. If a secret resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. * - * @param {object} applicationResourceDescription Description for creating an - * application resource. + * @param {object} secretResourceDescription Description for creating a secret + * resource. * - * @param {string} [applicationResourceDescription.description] User readable - * description of the application. + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. * - * @param {string} [applicationResourceDescription.debugParams] Internal use. + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. * - * @param {array} [applicationResourceDescription.services] describes the - * services in the application. + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. * - * @param {object} [applicationResourceDescription.diagnostics] Describes the - * diagnostics definition and usage for an application resource. + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator * - * @param {array} [applicationResourceDescription.diagnostics.sinks] List of - * supported sinks that can be referenced. + * @param {object} [secretResourceDescription.tags] Resource tags. * - * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status - * of whether or not sinks are enabled. + * @param {string} secretResourceDescription.location The geo-location where + * the resource lives * - * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] - * The sinks to be used if diagnostics is enabled. Sink choices can be - * overridden at the service and code package level. + * @param {object} [options] Optional Parameters. * - * @param {object} [applicationResourceDescription.tags] Resource tags. + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a secret resource. + * + * Creates a secret resource with the specified name, description and + * properties. If a secret resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [secretResourceDescription.tags] Resource tags. + * + * @param {string} secretResourceDescription.location The geo-location where + * the resource lives * * @param {object} [options] Optional Parameters. * @@ -128,7 +241,7 @@ export interface Application { * * {Promise} A promise is returned. * - * @resolve {ApplicationResourceDescription} - The deserialized result object. + * @resolve {SecretResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -136,29 +249,28 @@ export interface Application { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicationResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescription} for more + * {SecretResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, applicationName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, applicationName: string, applicationResourceDescription: models.ApplicationResourceDescription, callback: ServiceCallback): void; - create(resourceGroupName: string, applicationName: string, applicationResourceDescription: models.ApplicationResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, callback: ServiceCallback): void; + create(resourceGroupName: string, secretResourceName: string, secretResourceDescription: models.SecretResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the application resource. + * @summary Gets the secret resource with the given name. * - * Gets the information about the application resource with a given name. The - * information includes the information about the application's services and - * other runtime properties. + * Gets the information about the secret resource with the given name. The + * information include the description and other properties of the secret. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. * * @param {object} [options] Optional Parameters. * @@ -167,22 +279,21 @@ export interface Application { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the application resource. + * @summary Gets the secret resource with the given name. * - * Gets the information about the application resource with a given name. The - * information includes the information about the application's services and - * other runtime properties. + * Gets the information about the secret resource with the given name. The + * information include the description and other properties of the secret. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. * * @param {object} [options] Optional Parameters. * @@ -196,7 +307,7 @@ export interface Application { * * {Promise} A promise is returned. * - * @resolve {ApplicationResourceDescription} - The deserialized result object. + * @resolve {SecretResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -204,27 +315,27 @@ export interface Application { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicationResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescription} for more + * {SecretResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, applicationName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, applicationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, secretResourceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, secretResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Deletes the application resource. + * @summary Deletes the secret resource. * - * Deletes the application resource identified by the name. + * Deletes the secret resource identified by the name. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. * * @param {object} [options] Optional Parameters. * @@ -237,16 +348,16 @@ export interface Application { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Deletes the application resource. + * @summary Deletes the secret resource. * - * Deletes the application resource identified by the name. + * Deletes the secret resource identified by the name. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. * * @param {object} [options] Optional Parameters. * @@ -274,17 +385,16 @@ export interface Application { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, applicationName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, applicationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, secretResourceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, secretResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the application resources in a given resource group. + * @summary Gets all the secret resources in a given resource group. * - * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. * * @param {string} resourceGroupName Azure resource group name * @@ -295,18 +405,17 @@ export interface Application { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the application resources in a given resource group. + * @summary Gets all the secret resources in a given resource group. * - * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. * * @param {string} resourceGroupName Azure resource group name * @@ -322,7 +431,7 @@ export interface Application { * * {Promise} A promise is returned. * - * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. + * @resolve {SecretResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -330,25 +439,24 @@ export interface Application { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescriptionList} for more + * {SecretResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the application resources in a given subscription. + * @summary Gets all the secret resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. * * @param {object} [options] Optional Parameters. * @@ -357,18 +465,17 @@ export interface Application { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the application resources in a given subscription. + * @summary Gets all the secret resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. * * @param {object} [options] Optional Parameters. * @@ -382,7 +489,7 @@ export interface Application { * * {Promise} A promise is returned. * - * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. + * @resolve {SecretResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -390,25 +497,24 @@ export interface Application { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescriptionList} for more + * {SecretResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the application resources in a given resource group. + * @summary Gets all the secret resources in a given resource group. * - * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -420,18 +526,17 @@ export interface Application { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the application resources in a given resource group. + * @summary Gets all the secret resources in a given resource group. * - * Gets the information about all application resources in a given resource - * group. The information includes the information about the application's - * services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -448,7 +553,7 @@ export interface Application { * * {Promise} A promise is returned. * - * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. + * @resolve {SecretResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -456,25 +561,24 @@ export interface Application { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescriptionList} for more + * {SecretResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the application resources in a given subscription. + * @summary Gets all the secret resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -486,18 +590,17 @@ export interface Application { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the application resources in a given subscription. + * @summary Gets all the secret resources in a given subscription. * - * Gets the information about all application resources in a given - * subscription. The information includes the information about the - * application's services and other runtime properties. + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -514,7 +617,7 @@ export interface Application { * * {Promise} A promise is returned. * - * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. + * @resolve {SecretResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -522,38 +625,53 @@ export interface Application { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationResourceDescriptionList} for more + * {SecretResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * Service + * SecretValueOperations * __NOTE__: An instance of this class is automatically created for an * instance of the ServiceFabricMeshManagementClient. */ -export interface Service { +export interface SecretValueOperations { /** - * @summary Gets services of a given application. + * @summary Adds the specified value as a new version of the specified secret + * resource. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [secretValueResourceDescription.tags] Resource tags. + * + * @param {string} secretValueResourceDescription.location The geo-location + * where the resource lives * * @param {object} [options] Optional Parameters. * @@ -562,22 +680,37 @@ export interface Service { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByApplicationNameWithHttpOperationResponse(resourceGroupName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets services of a given application. + * @summary Adds the specified value as a new version of the specified secret + * resource. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [secretValueResourceDescription.tags] Resource tags. + * + * @param {string} secretValueResourceDescription.location The geo-location + * where the resource lives * * @param {object} [options] Optional Parameters. * @@ -591,7 +724,7 @@ export interface Service { * * {Promise} A promise is returned. * - * @resolve {ServiceList} - The deserialized result object. + * @resolve {SecretValueResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -599,28 +732,31 @@ export interface Service { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceList} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceList} for more information. + * {SecretValueResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByApplicationName(resourceGroupName: string, applicationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByApplicationName(resourceGroupName: string, applicationName: string, callback: ServiceCallback): void; - listByApplicationName(resourceGroupName: string, applicationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, callback: ServiceCallback): void; + create(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, secretValueResourceDescription: models.SecretValueResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the properties of the service. + * @summary Gets the specified secret value resource. * - * The operation returns the properties of the service. + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. * - * @param {string} serviceName The identity of the service. + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. * * @param {object} [options] Optional Parameters. * @@ -629,22 +765,24 @@ export interface Service { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, applicationName: string, serviceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the properties of the service. + * @summary Gets the specified secret value resource. * - * The operation returns the properties of the service. + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} secretResourceName The name of the secret resource. * - * @param {string} serviceName The identity of the service. + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. * * @param {object} [options] Optional Parameters. * @@ -658,7 +796,7 @@ export interface Service { * * {Promise} A promise is returned. * - * @resolve {ServiceResourceDescription} - The deserialized result object. + * @resolve {SecretValueResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -666,28 +804,32 @@ export interface Service { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceDescription} for more + * {SecretValueResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, applicationName: string, serviceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, applicationName: string, serviceName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, applicationName: string, serviceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets services of a given application. + * @summary Deletes the specified value of the named secret resource. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. * * @param {object} [options] Optional Parameters. * @@ -696,21 +838,25 @@ export interface Service { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByApplicationNameNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets services of a given application. + * @summary Deletes the specified value of the named secret resource. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. * * @param {object} [options] Optional Parameters. * @@ -724,7 +870,7 @@ export interface Service { * * {Promise} A promise is returned. * - * @resolve {ServiceList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -732,39 +878,1258 @@ export interface Service { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceList} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByApplicationNameNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByApplicationNameNext(nextPageLink: string, callback: ServiceCallback): void; - listByApplicationNameNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Replica - * __NOTE__: An instance of this class is automatically created for an - * instance of the ServiceFabricMeshManagementClient. - */ -export interface Replica { + deleteMethod(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets replicas of a given service. + * @summary List names of all values of the the specified secret resource. * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretValueResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretValueResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, secretResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, secretResourceName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, secretResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listValueWithHttpOperationResponse(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretValue} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretValue} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValue} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listValue(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listValue(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, callback: ServiceCallback): void; + listValue(resourceGroupName: string, secretResourceName: string, secretValueResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SecretValueResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SecretValueResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Volume + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricMeshManagementClient. + */ +export interface Volume { + + + /** + * @summary Creates or updates a volume resource. + * + * Creates a volume resource with the specified name, description and + * properties. If a volume resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} volumeResourceDescription Description for creating a Volume + * resource. + * + * @param {string} [volumeResourceDescription.description] User readable + * description of the volume. + * + * @param {object} [volumeResourceDescription.azureFileParameters] This type + * describes a volume provided by an Azure Files file share. + * + * @param {string} volumeResourceDescription.azureFileParameters.accountName + * Name of the Azure storage account for the File Share. + * + * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] + * Access key of the Azure storage account for the File Share. + * + * @param {string} volumeResourceDescription.azureFileParameters.shareName Name + * of the Azure Files file share that provides storage for the volume. + * + * @param {object} [volumeResourceDescription.tags] Resource tags. + * + * @param {string} volumeResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName: string, volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a volume resource. + * + * Creates a volume resource with the specified name, description and + * properties. If a volume resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} volumeResourceDescription Description for creating a Volume + * resource. + * + * @param {string} [volumeResourceDescription.description] User readable + * description of the volume. + * + * @param {object} [volumeResourceDescription.azureFileParameters] This type + * describes a volume provided by an Azure Files file share. + * + * @param {string} volumeResourceDescription.azureFileParameters.accountName + * Name of the Azure storage account for the File Share. + * + * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] + * Access key of the Azure storage account for the File Share. + * + * @param {string} volumeResourceDescription.azureFileParameters.shareName Name + * of the Azure Files file share that provides storage for the volume. + * + * @param {object} [volumeResourceDescription.tags] Resource tags. + * + * @param {string} volumeResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + create(resourceGroupName: string, volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, callback: ServiceCallback): void; + create(resourceGroupName: string, volumeResourceName: string, volumeResourceDescription: models.VolumeResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the volume resource with the given name. + * + * Gets the information about the volume resource with the given name. The + * information include the description and other properties of the volume. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the volume resource with the given name. + * + * Gets the information about the volume resource with the given name. The + * information include the description and other properties of the volume. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, volumeResourceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, volumeResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the volume resource. + * + * Deletes the volume resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the volume resource. + * + * Deletes the volume resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} volumeResourceName The identity of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, volumeResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, volumeResourceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, volumeResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the volume resources in a given resource group. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the volume resources in a given resource group. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the volume resources in a given subscription. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the volume resources in a given subscription. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the volume resources in a given resource group. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the volume resources in a given resource group. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the Volume. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the volume resources in a given subscription. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the volume resources in a given subscription. + * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link VolumeResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Network + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricMeshManagementClient. + */ +export interface Network { + + + /** + * @summary Creates or updates a network resource. + * + * Creates a network resource with the specified name, description and + * properties. If a network resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} networkResourceDescription Description for creating a + * Network resource. + * + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. + * + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. + * + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [networkResourceDescription.tags] Resource tags. + * + * @param {string} networkResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName: string, networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a network resource. + * + * Creates a network resource with the specified name, description and + * properties. If a network resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} networkResourceDescription Description for creating a + * Network resource. + * + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. + * + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. + * + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [networkResourceDescription.tags] Resource tags. + * + * @param {string} networkResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + create(resourceGroupName: string, networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, callback: ServiceCallback): void; + create(resourceGroupName: string, networkResourceName: string, networkResourceDescription: models.NetworkResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the network resource with the given name. + * + * Gets the information about the network resource with the given name. The + * information include the description and other properties of the network. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the network resource with the given name. + * + * Gets the information about the network resource with the given name. The + * information include the description and other properties of the network. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkResourceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Deletes the network resource. + * + * Deletes the network resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Deletes the network resource. + * + * Deletes the network resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} networkResourceName The identity of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, networkResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, networkResourceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the network resources in a given resource group. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the network resources in a given resource group. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the network resources in a given subscription. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the network resources in a given subscription. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the network resources in a given resource group. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the network resources in a given resource group. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the Network. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the network resources in a given subscription. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the network resources in a given subscription. + * + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkResourceDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Gateway + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricMeshManagementClient. + */ +export interface Gateway { + + + /** + * @summary Creates or updates a gateway resource. + * + * Creates a gateway resource with the specified name, description and + * properties. If a gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use gateway resources + * to create a gateway for public connectivity for services within your + * application. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. + * + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [gatewayResourceDescription.tags] Resource tags. * - * @param {string} serviceName The identity of the service. + * @param {string} gatewayResourceDescription.location The geo-location where + * the resource lives * * @param {object} [options] Optional Parameters. * @@ -773,24 +2138,53 @@ export interface Replica { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByServiceNameWithHttpOperationResponse(resourceGroupName: string, applicationName: string, serviceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets replicas of a given service. + * @summary Creates or updates a gateway resource. * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * Creates a gateway resource with the specified name, description and + * properties. If a gateway resource with the same name exists, then it is + * updated with the specified description and properties. Use gateway resources + * to create a gateway for public connectivity for services within your + * application. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} gatewayResourceName The identity of the gateway. + * + * @param {object} gatewayResourceDescription Description for creating a + * Gateway resource. + * + * @param {string} [gatewayResourceDescription.description] User readable + * description of the gateway. + * + * @param {object} gatewayResourceDescription.sourceNetwork Network the gateway + * should listen on for requests. * - * @param {string} serviceName The identity of the service. + * @param {object} gatewayResourceDescription.destinationNetwork Network that + * the Application is using. + * + * @param {string} [gatewayResourceDescription.destinationNetwork.name] Name of + * the network + * + * @param {array} [gatewayResourceDescription.destinationNetwork.endpointRefs] + * A list of endpoints that are exposed on this network. + * + * @param {array} [gatewayResourceDescription.tcp] Configuration for tcp + * connectivity for this gateway. + * + * @param {array} [gatewayResourceDescription.http] Configuration for http + * connectivity for this gateway. + * + * @param {object} [gatewayResourceDescription.tags] Resource tags. + * + * @param {string} gatewayResourceDescription.location The geo-location where + * the resource lives * * @param {object} [options] Optional Parameters. * @@ -804,7 +2198,7 @@ export interface Replica { * * {Promise} A promise is returned. * - * @resolve {ServiceReplicaList} - The deserialized result object. + * @resolve {GatewayResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -812,32 +2206,28 @@ export interface Replica { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceReplicaList} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceReplicaList} for more information. + * {GatewayResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByServiceName(resourceGroupName: string, applicationName: string, serviceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByServiceName(resourceGroupName: string, applicationName: string, serviceName: string, callback: ServiceCallback): void; - listByServiceName(resourceGroupName: string, applicationName: string, serviceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, callback: ServiceCallback): void; + create(resourceGroupName: string, gatewayResourceName: string, gatewayResourceDescription: models.GatewayResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets a specific replica of a given service. + * @summary Gets the gateway resource with the given name. * - * Gets the information about the specified replica of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * Gets the information about the gateway resource with the given name. The + * information include the description and other properties of the gateway. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. - * - * @param {string} serviceName The identity of the service. - * - * @param {string} replicaName The identity of the service replica. + * @param {string} gatewayResourceName The identity of the gateway. * * @param {object} [options] Optional Parameters. * @@ -846,26 +2236,21 @@ export interface Replica { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets a specific replica of a given service. + * @summary Gets the gateway resource with the given name. * - * Gets the information about the specified replica of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * Gets the information about the gateway resource with the given name. The + * information include the description and other properties of the gateway. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. - * - * @param {string} serviceName The identity of the service. - * - * @param {string} replicaName The identity of the service replica. + * @param {string} gatewayResourceName The identity of the gateway. * * @param {object} [options] Optional Parameters. * @@ -879,7 +2264,7 @@ export interface Replica { * * {Promise} A promise is returned. * - * @resolve {ServiceReplicaDescription} - The deserialized result object. + * @resolve {GatewayResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -887,28 +2272,27 @@ export interface Replica { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceReplicaDescription} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceReplicaDescription} for more + * {GatewayResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, gatewayResourceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, gatewayResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets replicas of a given service. + * @summary Deletes the gateway resource. * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * Deletes the gateway resource identified by the name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. * * @param {object} [options] Optional Parameters. * @@ -917,21 +2301,20 @@ export interface Replica { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByServiceNameNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets replicas of a given service. + * @summary Deletes the gateway resource. * - * Gets the information about all replicas of a given service of an - * application. The information includes the runtime properties of the replica - * instance. + * Deletes the gateway resource identified by the name. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} gatewayResourceName The identity of the gateway. * * @param {object} [options] Optional Parameters. * @@ -945,7 +2328,7 @@ export interface Replica { * * {Promise} A promise is returned. * - * @resolve {ServiceReplicaList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -953,77 +2336,105 @@ export interface Replica { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServiceReplicaList} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceReplicaList} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByServiceNameNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByServiceNameNext(nextPageLink: string, callback: ServiceCallback): void; - listByServiceNameNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * CodePackage - * __NOTE__: An instance of this class is automatically created for an - * instance of the ServiceFabricMeshManagementClient. - */ -export interface CodePackage { + deleteMethod(resourceGroupName: string, gatewayResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, gatewayResourceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, gatewayResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the logs for the container. + * @summary Gets all the gateway resources in a given resource group. * - * Get the logs for the container of a given code package of an application. + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. - * - * @param {string} serviceName The identity of the service. - * - * @param {string} replicaName The identity of the service replica. - * - * @param {string} codePackageName The name of the code package. - * * @param {object} [options] Optional Parameters. * - * @param {number} [options.tail] Number of lines to show from the end of the - * logs. Default is 100. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getContainerLogWithHttpOperationResponse(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, codePackageName: string, options?: { tail? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the logs for the container. + * @summary Gets all the gateway resources in a given resource group. * - * Get the logs for the container of a given code package of an application. + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {GatewayResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. * - * @param {string} serviceName The identity of the service. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} replicaName The identity of the service replica. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the gateway resources in a given subscription. * - * @param {string} codePackageName The name of the code package. + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.tail] Number of lines to show from the end of the - * logs. Default is 100. + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the gateway resources in a given subscription. + * + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1035,7 +2446,7 @@ export interface CodePackage { * * {Promise} A promise is returned. * - * @resolve {ContainerLogs} - The deserialized result object. + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1043,32 +2454,27 @@ export interface CodePackage { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ContainerLogs} [result] - The deserialized result object if an error did not occur. - * See {@link ContainerLogs} for more information. + * {GatewayResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getContainerLog(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, codePackageName: string, options?: { tail? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getContainerLog(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, codePackageName: string, callback: ServiceCallback): void; - getContainerLog(resourceGroupName: string, applicationName: string, serviceName: string, replicaName: string, codePackageName: string, options: { tail? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Operations - * __NOTE__: An instance of this class is automatically created for an - * instance of the ServiceFabricMeshManagementClient. - */ -export interface Operations { + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Lists all of the available operations. + * @summary Gets all the gateway resources in a given resource group. * - * Lists all the available operations provided by Service Fabric SeaBreeze - * resource provider. + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1077,17 +2483,20 @@ export interface Operations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Lists all of the available operations. + * @summary Gets all the gateway resources in a given resource group. * - * Lists all the available operations provided by Service Fabric SeaBreeze - * resource provider. + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the Gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1101,7 +2510,7 @@ export interface Operations { * * {Promise} A promise is returned. * - * @resolve {OperationListResult} - The deserialized result object. + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1109,23 +2518,24 @@ export interface Operations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link OperationListResult} for more information. + * {GatewayResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Lists all of the available operations. + * @summary Gets all the gateway resources in a given subscription. * - * Lists all the available operations provided by Service Fabric SeaBreeze - * resource provider. + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1137,17 +2547,17 @@ export interface Operations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Lists all of the available operations. + * @summary Gets all the gateway resources in a given subscription. * - * Lists all the available operations provided by Service Fabric SeaBreeze - * resource provider. + * Gets the information about all gateway resources in a given resource group. + * The information include the description and other properties of the gateway. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1164,7 +2574,7 @@ export interface Operations { * * {Promise} A promise is returned. * - * @resolve {OperationListResult} - The deserialized result object. + * @resolve {GatewayResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1172,61 +2582,72 @@ export interface Operations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link OperationListResult} for more information. + * {GatewayResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayResourceDescriptionList} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * Network + * Application * __NOTE__: An instance of this class is automatically created for an * instance of the ServiceFabricMeshManagementClient. */ -export interface Network { +export interface Application { /** - * @summary Creates or updates a network resource. + * @summary Creates or updates an application resource. + * + * Creates an application resource with the specified name, description and + * properties. If an application resource with the same name exists, then it is + * updated with the specified description and properties. * - * Creates a network resource with the specified name and description. If a - * network with the same name already exists, then its description is updated - * to the one indicated in this request. + * @param {string} resourceGroupName Azure resource group name * - * Use network resources to create private network and configure public - * connectivity for services within your application. + * @param {string} applicationResourceName The identity of the application. * + * @param {object} applicationResourceDescription Description for creating a + * Application resource. * - * @param {string} resourceGroupName Azure resource group name + * @param {string} [applicationResourceDescription.description] User readable + * description of the application. * - * @param {string} networkName The identity of the network. + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. * - * @param {object} networkResourceDescription Description for creating a - * network resource. + * @param {object} [applicationResourceDescription.diagnostics] Describes the + * diagnostics definition and usage for an application resource. * - * @param {string} [networkResourceDescription.description] User readable - * description of the network. + * @param {array} [applicationResourceDescription.diagnostics.sinks] List of + * supported sinks that can be referenced. * - * @param {string} networkResourceDescription.addressPrefix the address prefix - * for this network. + * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status + * of whether or not sinks are enabled. * - * @param {object} [networkResourceDescription.ingressConfig] Configuration for - * public connectivity for this network. + * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] + * The sinks to be used if diagnostics is enabled. Sink choices can be + * overridden at the service and code package level. * - * @param {string} [networkResourceDescription.ingressConfig.qosLevel] The QoS - * tier for ingress. Possible values include: 'Bronze' + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. * - * @param {array} [networkResourceDescription.ingressConfig.layer4] - * Configuration for layer4 public connectivity for this network. + * @param {object} [applicationResourceDescription.tags] Resource tags. * - * @param {object} [networkResourceDescription.tags] Resource tags. + * @param {string} applicationResourceDescription.location The geo-location + * where the resource lives * * @param {object} [options] Optional Parameters. * @@ -1235,46 +2656,56 @@ export interface Network { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, networkName: string, networkResourceDescription: models.NetworkResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Creates or updates a network resource. + * @summary Creates or updates an application resource. * - * Creates a network resource with the specified name and description. If a - * network with the same name already exists, then its description is updated - * to the one indicated in this request. + * Creates an application resource with the specified name, description and + * properties. If an application resource with the same name exists, then it is + * updated with the specified description and properties. * - * Use network resources to create private network and configure public - * connectivity for services within your application. + * @param {string} resourceGroupName Azure resource group name * + * @param {string} applicationResourceName The identity of the application. * - * @param {string} resourceGroupName Azure resource group name + * @param {object} applicationResourceDescription Description for creating a + * Application resource. + * + * @param {string} [applicationResourceDescription.description] User readable + * description of the application. * - * @param {string} networkName The identity of the network. + * @param {array} [applicationResourceDescription.services] Describes the + * services in the application. This property is used to create or modify + * services of the application. On get only the name of the service is + * returned. The service description can be obtained by querying for the + * service resource. * - * @param {object} networkResourceDescription Description for creating a - * network resource. + * @param {object} [applicationResourceDescription.diagnostics] Describes the + * diagnostics definition and usage for an application resource. * - * @param {string} [networkResourceDescription.description] User readable - * description of the network. + * @param {array} [applicationResourceDescription.diagnostics.sinks] List of + * supported sinks that can be referenced. * - * @param {string} networkResourceDescription.addressPrefix the address prefix - * for this network. + * @param {boolean} [applicationResourceDescription.diagnostics.enabled] Status + * of whether or not sinks are enabled. * - * @param {object} [networkResourceDescription.ingressConfig] Configuration for - * public connectivity for this network. + * @param {array} [applicationResourceDescription.diagnostics.defaultSinkRefs] + * The sinks to be used if diagnostics is enabled. Sink choices can be + * overridden at the service and code package level. * - * @param {string} [networkResourceDescription.ingressConfig.qosLevel] The QoS - * tier for ingress. Possible values include: 'Bronze' + * @param {string} [applicationResourceDescription.debugParams] Internal - used + * by Visual Studio to setup the debugging session on the local development + * environment. * - * @param {array} [networkResourceDescription.ingressConfig.layer4] - * Configuration for layer4 public connectivity for this network. + * @param {object} [applicationResourceDescription.tags] Resource tags. * - * @param {object} [networkResourceDescription.tags] Resource tags. + * @param {string} applicationResourceDescription.location The geo-location + * where the resource lives * * @param {object} [options] Optional Parameters. * @@ -1288,7 +2719,7 @@ export interface Network { * * {Promise} A promise is returned. * - * @resolve {NetworkResourceDescription} - The deserialized result object. + * @resolve {ApplicationResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1296,29 +2727,28 @@ export interface Network { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkResourceDescription} for more + * {ApplicationResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, networkName: string, networkResourceDescription: models.NetworkResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, networkName: string, networkResourceDescription: models.NetworkResourceDescription, callback: ServiceCallback): void; - create(resourceGroupName: string, networkName: string, networkResourceDescription: models.NetworkResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, callback: ServiceCallback): void; + create(resourceGroupName: string, applicationResourceName: string, applicationResourceDescription: models.ApplicationResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the network resource. - * - * Gets the information about the network resource with a given name. This - * information includes the network description and other runtime information. + * @summary Gets the application resource with the given name. * + * Gets the information about the application resource with the given name. The + * information include the description and other properties of the application. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1327,22 +2757,21 @@ export interface Network { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the network resource. - * - * Gets the information about the network resource with a given name. This - * information includes the network description and other runtime information. + * @summary Gets the application resource with the given name. * + * Gets the information about the application resource with the given name. The + * information include the description and other properties of the application. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1356,7 +2785,7 @@ export interface Network { * * {Promise} A promise is returned. * - * @resolve {NetworkResourceDescription} - The deserialized result object. + * @resolve {ApplicationResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1364,27 +2793,27 @@ export interface Network { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkResourceDescription} for more + * {ApplicationResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, applicationResourceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Deletes the network resource. + * @summary Deletes the application resource. * - * Deletes the network resource identified by the name. + * Deletes the application resource identified by the name. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1397,16 +2826,16 @@ export interface Network { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Deletes the network resource. + * @summary Deletes the application resource. * - * Deletes the network resource identified by the name. + * Deletes the application resource identified by the name. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1434,18 +2863,17 @@ export interface Network { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, networkName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, networkName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, networkName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, applicationResourceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the network resources in a given resource group. - * - * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. + * @summary Gets all the application resources in a given resource group. * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. * * @param {string} resourceGroupName Azure resource group name * @@ -1456,19 +2884,18 @@ export interface Network { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the network resources in a given resource group. - * - * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. + * @summary Gets all the application resources in a given resource group. * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. * * @param {string} resourceGroupName Azure resource group name * @@ -1484,7 +2911,7 @@ export interface Network { * * {Promise} A promise is returned. * - * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1492,25 +2919,25 @@ export interface Network { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkResourceDescriptionList} for more + * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the network resources in a given subscription. + * @summary Gets all the application resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {object} [options] Optional Parameters. * @@ -1519,18 +2946,18 @@ export interface Network { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the network resources in a given subscription. + * @summary Gets all the application resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {object} [options] Optional Parameters. * @@ -1544,7 +2971,7 @@ export interface Network { * * {Promise} A promise is returned. * - * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1552,26 +2979,25 @@ export interface Network { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkResourceDescriptionList} for more + * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the network resources in a given resource group. - * - * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. + * @summary Gets all the application resources in a given resource group. * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1583,19 +3009,18 @@ export interface Network { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the network resources in a given resource group. - * - * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. + * @summary Gets all the application resources in a given resource group. * + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * Application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1612,7 +3037,7 @@ export interface Network { * * {Promise} A promise is returned. * - * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1620,25 +3045,25 @@ export interface Network { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkResourceDescriptionList} for more + * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the network resources in a given subscription. + * @summary Gets all the application resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1650,18 +3075,18 @@ export interface Network { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the network resources in a given subscription. + * @summary Gets all the application resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all application resources in a given resource + * group. The information include the description and other properties of the + * application. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1678,7 +3103,7 @@ export interface Network { * * {Promise} A promise is returned. * - * @resolve {NetworkResourceDescriptionList} - The deserialized result object. + * @resolve {ApplicationResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1686,59 +3111,39 @@ export interface Network { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkResourceDescriptionList} for more + * {ApplicationResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * Volume + * Service * __NOTE__: An instance of this class is automatically created for an * instance of the ServiceFabricMeshManagementClient. */ -export interface Volume { +export interface Service { /** - * @summary Creates or updates a volume resource. - * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. + * @summary Gets the service resource with the given name. * + * Gets the information about the service resource with the given name. The + * information include the description and other properties of the service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. - * - * @param {object} volumeResourceDescription Description for creating a volume - * resource. - * - * @param {string} [volumeResourceDescription.description] User readable - * description of the volume. - * - * @param {object} [volumeResourceDescription.azureFileParameters] This type - * describes a volume provided by an Azure Files file share. - * - * @param {string} volumeResourceDescription.azureFileParameters.accountName - * Name of the Azure storage account for the File Share. - * - * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] - * Access key of the Azure storage account for the File Share. - * - * @param {string} volumeResourceDescription.azureFileParameters.shareName Name - * of the Azure Files file share that provides storage for the volume. + * @param {string} applicationResourceName The identity of the application. * - * @param {object} [volumeResourceDescription.tags] Resource tags. + * @param {string} serviceResourceName The identity of the service. * * @param {object} [options] Optional Parameters. * @@ -1747,43 +3152,23 @@ export interface Volume { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, volumeName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Creates or updates a volume resource. - * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. + * @summary Gets the service resource with the given name. * + * Gets the information about the service resource with the given name. The + * information include the description and other properties of the service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. - * - * @param {object} volumeResourceDescription Description for creating a volume - * resource. - * - * @param {string} [volumeResourceDescription.description] User readable - * description of the volume. - * - * @param {object} [volumeResourceDescription.azureFileParameters] This type - * describes a volume provided by an Azure Files file share. - * - * @param {string} volumeResourceDescription.azureFileParameters.accountName - * Name of the Azure storage account for the File Share. + * @param {string} applicationResourceName The identity of the application. * - * @param {string} [volumeResourceDescription.azureFileParameters.accountKey] - * Access key of the Azure storage account for the File Share. - * - * @param {string} volumeResourceDescription.azureFileParameters.shareName Name - * of the Azure Files file share that provides storage for the volume. - * - * @param {object} [volumeResourceDescription.tags] Resource tags. + * @param {string} serviceResourceName The identity of the service. * * @param {object} [options] Optional Parameters. * @@ -1797,7 +3182,7 @@ export interface Volume { * * {Promise} A promise is returned. * - * @resolve {VolumeResourceDescription} - The deserialized result object. + * @resolve {ServiceResourceDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1805,29 +3190,28 @@ export interface Volume { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VolumeResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescription} for more + * {ServiceResourceDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceResourceDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, volumeName: string, volumeResourceDescription: models.VolumeResourceDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, volumeName: string, volumeResourceDescription: models.VolumeResourceDescription, callback: ServiceCallback): void; - create(resourceGroupName: string, volumeName: string, volumeResourceDescription: models.VolumeResourceDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. + * @summary Lists all the service resources. * + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1836,22 +3220,21 @@ export interface Volume { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, volumeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. + * @summary Lists all the service resources. * + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -1865,7 +3248,7 @@ export interface Volume { * * {Promise} A promise is returned. * - * @resolve {VolumeResourceDescription} - The deserialized result object. + * @resolve {ServiceResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1873,27 +3256,27 @@ export interface Volume { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VolumeResourceDescription} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescription} for more + * {ServiceResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceResourceDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, volumeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, volumeName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, volumeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, applicationResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, applicationResourceName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, applicationResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Deletes the volume resource. + * @summary Lists all the service resources. * - * Deletes the volume identified by the name. + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * - * @param {string} resourceGroupName Azure resource group name - * - * @param {string} volumeName The identity of the volume. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1902,20 +3285,20 @@ export interface Volume { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, volumeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Deletes the volume resource. + * @summary Lists all the service resources. * - * Deletes the volume identified by the name. - * - * @param {string} resourceGroupName Azure resource group name + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * - * @param {string} volumeName The identity of the volume. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1929,7 +3312,7 @@ export interface Volume { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceResourceDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1937,27 +3320,43 @@ export interface Volume { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ServiceResourceDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceResourceDescriptionList} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, volumeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, volumeName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, volumeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ServiceReplica + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricMeshManagementClient. + */ +export interface ServiceReplica { /** - * @summary Gets all the volume resources in a given resource group. - * - * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. + * @summary Gets the given replica of the service of an application. * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. * * @param {string} resourceGroupName Azure resource group name * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1965,22 +3364,27 @@ export interface Volume { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the volume resources in a given resource group. - * - * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. + * @summary Gets the given replica of the service of an application. * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. * * @param {string} resourceGroupName Azure resource group name * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1993,7 +3397,7 @@ export interface Volume { * * {Promise} A promise is returned. * - * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * @resolve {ServiceReplicaDescription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2001,25 +3405,31 @@ export interface Volume { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescriptionList} for more + * {ServiceReplicaDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescription} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the volume resources in a given subscription. + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. + * + * @param {string} resourceGroupName Azure resource group name * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. + * @param {string} applicationResourceName The identity of the application. * + * @param {string} serviceResourceName The identity of the service. * * @param {object} [options] Optional Parameters. * @@ -2028,18 +3438,24 @@ export interface Volume { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the volume resources in a given subscription. + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} applicationResourceName The identity of the application. * + * @param {string} serviceResourceName The identity of the service. * * @param {object} [options] Optional Parameters. * @@ -2053,7 +3469,7 @@ export interface Volume { * * {Promise} A promise is returned. * - * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * @resolve {ServiceReplicaDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2061,26 +3477,25 @@ export interface Volume { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescriptionList} for more + * {ServiceReplicaDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets all the volume resources in a given resource group. - * - * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. + * @summary Gets replicas of a given service. * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -2092,19 +3507,18 @@ export interface Volume { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the volume resources in a given resource group. - * - * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. + * @summary Gets replicas of a given service. * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -2121,7 +3535,7 @@ export interface Volume { * * {Promise} A promise is returned. * - * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * @resolve {ServiceReplicaDescriptionList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2129,54 +3543,81 @@ export interface Volume { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescriptionList} for more + * {ServiceReplicaDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescriptionList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * CodePackage + * __NOTE__: An instance of this class is automatically created for an + * instance of the ServiceFabricMeshManagementClient. + */ +export interface CodePackage { /** - * @summary Gets all the volume resources in a given subscription. + * @summary Gets the logs from the container. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. + * Gets the logs for the container of the specified code package of the service + * replica. * + * @param {string} resourceGroupName Azure resource group name * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {string} codePackageName The name of code package of the service. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getContainerLogsWithHttpOperationResponse(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, options?: { tail? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets all the volume resources in a given subscription. + * @summary Gets the logs from the container. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. + * Gets the logs for the container of the specified code package of the service + * replica. * + * @param {string} resourceGroupName Azure resource group name * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {string} codePackageName The name of code package of the service. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2187,7 +3628,7 @@ export interface Volume { * * {Promise} A promise is returned. * - * @resolve {VolumeResourceDescriptionList} - The deserialized result object. + * @resolve {ContainerLogs} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2195,15 +3636,14 @@ export interface Volume { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VolumeResourceDescriptionList} [result] - The deserialized result object if an error did not occur. - * See {@link VolumeResourceDescriptionList} for more - * information. + * {ContainerLogs} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerLogs} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getContainerLogs(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, options?: { tail? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getContainerLogs(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, callback: ServiceCallback): void; + getContainerLogs(resourceGroupName: string, applicationResourceName: string, serviceResourceName: string, replicaName: string, codePackageName: string, options: { tail? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/index.js b/lib/services/serviceFabricMeshManagement/lib/operations/index.js index 05efe78f73..892e236286 100644 --- a/lib/services/serviceFabricMeshManagement/lib/operations/index.js +++ b/lib/services/serviceFabricMeshManagement/lib/operations/index.js @@ -14,10 +14,13 @@ 'use strict'; +exports.Operations = require('./operations'); +exports.Secret = require('./secret'); +exports.SecretValueOperations = require('./secretValueOperations'); +exports.Volume = require('./volume'); +exports.Network = require('./network'); +exports.Gateway = require('./gateway'); exports.Application = require('./application'); exports.Service = require('./service'); -exports.Replica = require('./replica'); +exports.ServiceReplica = require('./serviceReplica'); exports.CodePackage = require('./codePackage'); -exports.Operations = require('./operations'); -exports.Network = require('./network'); -exports.Volume = require('./volume'); diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/network.js b/lib/services/serviceFabricMeshManagement/lib/operations/network.js index 6ea7d1a621..f5ea80638e 100644 --- a/lib/services/serviceFabricMeshManagement/lib/operations/network.js +++ b/lib/services/serviceFabricMeshManagement/lib/operations/network.js @@ -17,38 +17,31 @@ const WebResource = msRest.WebResource; /** * @summary Creates or updates a network resource. * - * Creates a network resource with the specified name and description. If a - * network with the same name already exists, then its description is updated - * to the one indicated in this request. - * - * Use network resources to create private network and configure public - * connectivity for services within your application. - * + * Creates a network resource with the specified name, description and + * properties. If a network resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} networkResourceDescription Description for creating a - * network resource. - * - * @param {string} [networkResourceDescription.description] User readable - * description of the network. - * - * @param {string} networkResourceDescription.addressPrefix the address prefix - * for this network. + * Network resource. * - * @param {object} [networkResourceDescription.ingressConfig] Configuration for - * public connectivity for this network. + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. * - * @param {string} [networkResourceDescription.ingressConfig.qosLevel] The QoS - * tier for ingress. Possible values include: 'Bronze' + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. * - * @param {array} [networkResourceDescription.ingressConfig.layer4] - * Configuration for layer4 public connectivity for this network. + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator * * @param {object} [networkResourceDescription.tags] Resource tags. * + * @param {string} networkResourceDescription.location The geo-location where + * the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -68,7 +61,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, networkName, networkResourceDescription, options, callback) { +function _create(resourceGroupName, networkResourceName, networkResourceDescription, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -86,8 +79,8 @@ function _create(resourceGroupName, networkName, networkResourceDescription, opt 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 (networkName === null || networkName === undefined || typeof networkName.valueOf() !== 'string') { - throw new Error('networkName cannot be null or undefined and it must be of type string.'); + if (networkResourceName === null || networkResourceName === undefined || typeof networkResourceName.valueOf() !== 'string') { + throw new Error('networkResourceName cannot be null or undefined and it must be of type string.'); } if (networkResourceDescription === null || networkResourceDescription === undefined) { throw new Error('networkResourceDescription cannot be null or undefined.'); @@ -101,10 +94,10 @@ function _create(resourceGroupName, networkName, networkResourceDescription, opt // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{networkName}', networkName); + requestUrl = requestUrl.replace('{networkResourceName}', networkResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -152,7 +145,7 @@ function _create(resourceGroupName, networkName, networkResourceDescription, opt return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 201) { + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -221,15 +214,14 @@ function _create(resourceGroupName, networkName, networkResourceDescription, opt } /** - * @summary Gets the network resource. - * - * Gets the information about the network resource with a given name. This - * information includes the network description and other runtime information. + * @summary Gets the network resource with the given name. * + * Gets the information about the network resource with the given name. The + * information include the description and other properties of the network. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} [options] Optional Parameters. * @@ -250,7 +242,7 @@ function _create(resourceGroupName, networkName, networkResourceDescription, opt * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, networkName, options, callback) { +function _get(resourceGroupName, networkResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -268,8 +260,8 @@ function _get(resourceGroupName, networkName, 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 (networkName === null || networkName === undefined || typeof networkName.valueOf() !== 'string') { - throw new Error('networkName cannot be null or undefined and it must be of type string.'); + if (networkResourceName === null || networkResourceName === undefined || typeof networkResourceName.valueOf() !== 'string') { + throw new Error('networkResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -280,10 +272,10 @@ function _get(resourceGroupName, networkName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{networkName}', networkName); + requestUrl = requestUrl.replace('{networkResourceName}', networkResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -375,7 +367,7 @@ function _get(resourceGroupName, networkName, options, callback) { * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} [options] Optional Parameters. * @@ -394,7 +386,7 @@ function _get(resourceGroupName, networkName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, networkName, options, callback) { +function _deleteMethod(resourceGroupName, networkResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -412,8 +404,8 @@ function _deleteMethod(resourceGroupName, networkName, 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 (networkName === null || networkName === undefined || typeof networkName.valueOf() !== 'string') { - throw new Error('networkName cannot be null or undefined and it must be of type string.'); + if (networkResourceName === null || networkResourceName === undefined || typeof networkResourceName.valueOf() !== 'string') { + throw new Error('networkResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -424,10 +416,10 @@ function _deleteMethod(resourceGroupName, networkName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{networkName}', networkName); + requestUrl = requestUrl.replace('{networkResourceName}', networkResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -461,7 +453,7 @@ function _deleteMethod(resourceGroupName, networkName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -499,9 +491,7 @@ function _deleteMethod(resourceGroupName, networkName, options, callback) { * @summary Gets all the network resources in a given resource group. * * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. - * + * The information include the description and other properties of the Network. * * @param {string} resourceGroupName Azure resource group name * @@ -641,9 +631,8 @@ function _listByResourceGroup(resourceGroupName, options, callback) { /** * @summary Gets all the network resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. * * @param {object} [options] Optional Parameters. * @@ -778,9 +767,7 @@ function _listBySubscription(options, callback) { * @summary Gets all the network resources in a given resource group. * * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. - * + * The information include the description and other properties of the Network. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -911,9 +898,8 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { /** * @summary Gets all the network resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1061,38 +1047,31 @@ class Network { /** * @summary Creates or updates a network resource. * - * Creates a network resource with the specified name and description. If a - * network with the same name already exists, then its description is updated - * to the one indicated in this request. - * - * Use network resources to create private network and configure public - * connectivity for services within your application. - * + * Creates a network resource with the specified name, description and + * properties. If a network resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} networkResourceDescription Description for creating a - * network resource. + * Network resource. * - * @param {string} [networkResourceDescription.description] User readable - * description of the network. + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. * - * @param {string} networkResourceDescription.addressPrefix the address prefix - * for this network. + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. * - * @param {object} [networkResourceDescription.ingressConfig] Configuration for - * public connectivity for this network. - * - * @param {string} [networkResourceDescription.ingressConfig.qosLevel] The QoS - * tier for ingress. Possible values include: 'Bronze' - * - * @param {array} [networkResourceDescription.ingressConfig.layer4] - * Configuration for layer4 public connectivity for this network. + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator * * @param {object} [networkResourceDescription.tags] Resource tags. * + * @param {string} networkResourceDescription.location The geo-location where + * the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1104,11 +1083,11 @@ class Network { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, networkName, networkResourceDescription, options) { + createWithHttpOperationResponse(resourceGroupName, networkResourceName, networkResourceDescription, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, networkName, networkResourceDescription, options, (err, result, request, response) => { + self._create(resourceGroupName, networkResourceName, networkResourceDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1121,38 +1100,31 @@ class Network { /** * @summary Creates or updates a network resource. * - * Creates a network resource with the specified name and description. If a - * network with the same name already exists, then its description is updated - * to the one indicated in this request. - * - * Use network resources to create private network and configure public - * connectivity for services within your application. - * + * Creates a network resource with the specified name, description and + * properties. If a network resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} networkResourceDescription Description for creating a - * network resource. - * - * @param {string} [networkResourceDescription.description] User readable - * description of the network. - * - * @param {string} networkResourceDescription.addressPrefix the address prefix - * for this network. + * Network resource. * - * @param {object} [networkResourceDescription.ingressConfig] Configuration for - * public connectivity for this network. + * @param {object} networkResourceDescription.properties Describes properties + * of a network resource. * - * @param {string} [networkResourceDescription.ingressConfig.qosLevel] The QoS - * tier for ingress. Possible values include: 'Bronze' + * @param {string} [networkResourceDescription.properties.description] User + * readable description of the network. * - * @param {array} [networkResourceDescription.ingressConfig.layer4] - * Configuration for layer4 public connectivity for this network. + * @param {string} networkResourceDescription.properties.kind Polymorphic + * Discriminator * * @param {object} [networkResourceDescription.tags] Resource tags. * + * @param {string} networkResourceDescription.location The geo-location where + * the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1181,7 +1153,7 @@ class Network { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, networkName, networkResourceDescription, options, optionalCallback) { + create(resourceGroupName, networkResourceName, networkResourceDescription, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1190,27 +1162,26 @@ class Network { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, networkName, networkResourceDescription, options, (err, result, request, response) => { + self._create(resourceGroupName, networkResourceName, networkResourceDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, networkName, networkResourceDescription, options, optionalCallback); + return self._create(resourceGroupName, networkResourceName, networkResourceDescription, options, optionalCallback); } } /** - * @summary Gets the network resource. - * - * Gets the information about the network resource with a given name. This - * information includes the network description and other runtime information. + * @summary Gets the network resource with the given name. * + * Gets the information about the network resource with the given name. The + * information include the description and other properties of the network. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} [options] Optional Parameters. * @@ -1223,11 +1194,11 @@ class Network { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, networkName, options) { + getWithHttpOperationResponse(resourceGroupName, networkResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, networkName, options, (err, result, request, response) => { + self._get(resourceGroupName, networkResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1238,15 +1209,14 @@ class Network { } /** - * @summary Gets the network resource. - * - * Gets the information about the network resource with a given name. This - * information includes the network description and other runtime information. + * @summary Gets the network resource with the given name. * + * Gets the information about the network resource with the given name. The + * information include the description and other properties of the network. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} [options] Optional Parameters. * @@ -1276,7 +1246,7 @@ class Network { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, networkName, options, optionalCallback) { + get(resourceGroupName, networkResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1285,14 +1255,14 @@ class Network { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, networkName, options, (err, result, request, response) => { + self._get(resourceGroupName, networkResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, networkName, options, optionalCallback); + return self._get(resourceGroupName, networkResourceName, options, optionalCallback); } } @@ -1303,7 +1273,7 @@ class Network { * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} [options] Optional Parameters. * @@ -1316,11 +1286,11 @@ class Network { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, networkName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, networkResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, networkName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, networkResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1337,7 +1307,7 @@ class Network { * * @param {string} resourceGroupName Azure resource group name * - * @param {string} networkName The identity of the network. + * @param {string} networkResourceName The identity of the network. * * @param {object} [options] Optional Parameters. * @@ -1365,7 +1335,7 @@ class Network { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, networkName, options, optionalCallback) { + deleteMethod(resourceGroupName, networkResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1374,14 +1344,14 @@ class Network { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, networkName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, networkResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, networkName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, networkResourceName, options, optionalCallback); } } @@ -1389,9 +1359,7 @@ class Network { * @summary Gets all the network resources in a given resource group. * * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. - * + * The information include the description and other properties of the Network. * * @param {string} resourceGroupName Azure resource group name * @@ -1424,9 +1392,7 @@ class Network { * @summary Gets all the network resources in a given resource group. * * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. - * + * The information include the description and other properties of the Network. * * @param {string} resourceGroupName Azure resource group name * @@ -1481,9 +1447,8 @@ class Network { /** * @summary Gets all the network resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. * * @param {object} [options] Optional Parameters. * @@ -1513,9 +1478,8 @@ class Network { /** * @summary Gets all the network resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. * * @param {object} [options] Optional Parameters. * @@ -1569,9 +1533,7 @@ class Network { * @summary Gets all the network resources in a given resource group. * * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. - * + * The information include the description and other properties of the Network. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1605,9 +1567,7 @@ class Network { * @summary Gets all the network resources in a given resource group. * * Gets the information about all network resources in a given resource group. - * The information includes the network description and other runtime - * properties. - * + * The information include the description and other properties of the Network. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1663,9 +1623,8 @@ class Network { /** * @summary Gets all the network resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1698,9 +1657,8 @@ class Network { /** * @summary Gets all the network resources in a given subscription. * - * Gets the information about all network resources in a given subscription. - * The information includes the network description and other runtime - * properties. + * Gets the information about all network resources in a given resource group. + * The information include the description and other properties of the network. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/secret.js b/lib/services/serviceFabricMeshManagement/lib/operations/secret.js new file mode 100644 index 0000000000..e46725571c --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/operations/secret.js @@ -0,0 +1,1731 @@ +/* + * 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'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary Creates or updates a secret resource. + * + * Creates a secret resource with the specified name, description and + * properties. If a secret resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [secretResourceDescription.tags] Resource tags. + * + * @param {string} secretResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _create(resourceGroupName, secretResourceName, secretResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretResourceDescription === null || secretResourceDescription === undefined) { + throw new Error('secretResourceDescription cannot be null or undefined.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (secretResourceDescription !== null && secretResourceDescription !== undefined) { + let requestModelMapper = new client.models['SecretResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, secretResourceDescription, 'secretResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(secretResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the secret resource with the given name. + * + * Gets the information about the secret resource with the given name. The + * information include the description and other properties of the secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, secretResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the secret resource. + * + * Deletes the secret resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, secretResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the secret resources in a given resource group. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the secret resources in a given subscription. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscription(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/secrets'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the secret resources in a given resource group. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the secret resources in a given subscription. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Secret. */ +class Secret { + /** + * Create a Secret. + * @param {ServiceFabricMeshManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._create = _create; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listByResourceGroup = _listByResourceGroup; + this._listBySubscription = _listBySubscription; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listBySubscriptionNext = _listBySubscriptionNext; + } + + /** + * @summary Creates or updates a secret resource. + * + * Creates a secret resource with the specified name, description and + * properties. If a secret resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [secretResourceDescription.tags] Resource tags. + * + * @param {string} secretResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName, secretResourceName, secretResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(resourceGroupName, secretResourceName, secretResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates or updates a secret resource. + * + * Creates a secret resource with the specified name, description and + * properties. If a secret resource with the same name exists, then it is + * updated with the specified description and properties. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} secretResourceDescription Description for creating a secret + * resource. + * + * @param {object} secretResourceDescription.properties Describes the + * properties of a secret resource. + * + * @param {string} [secretResourceDescription.properties.description] User + * readable description of the secret. + * + * @param {string} [secretResourceDescription.properties.contentType] The type + * of the content stored in the secret value. The value of this property is + * opaque to Service Fabric. Once set, the value of this property cannot be + * changed. + * + * @param {string} secretResourceDescription.properties.kind Polymorphic + * Discriminator + * + * @param {object} [secretResourceDescription.tags] Resource tags. + * + * @param {string} secretResourceDescription.location The geo-location where + * the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + create(resourceGroupName, secretResourceName, secretResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._create(resourceGroupName, secretResourceName, secretResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(resourceGroupName, secretResourceName, secretResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the secret resource with the given name. + * + * Gets the information about the secret resource with the given name. The + * information include the description and other properties of the secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, secretResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, secretResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the secret resource with the given name. + * + * Gets the information about the secret resource with the given name. The + * information include the description and other properties of the secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, secretResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, secretResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, secretResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the secret resource. + * + * Deletes the secret resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, secretResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, secretResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the secret resource. + * + * Deletes the secret resource identified by the name. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, secretResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, secretResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, secretResourceName, options, optionalCallback); + } + } + + /** + * @summary Gets all the secret resources in a given resource group. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the secret resources in a given resource group. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * @summary Gets all the secret resources in a given subscription. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the secret resources in a given subscription. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscription(options, optionalCallback); + } + } + + /** + * @summary Gets all the secret resources in a given resource group. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the secret resources in a given resource group. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the Secret. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary Gets all the secret resources in a given subscription. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets all the secret resources in a given subscription. + * + * Gets the information about all secret resources in a given resource group. + * The information include the description and other properties of the secret. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = Secret; diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/secretValueOperations.js b/lib/services/serviceFabricMeshManagement/lib/operations/secretValueOperations.js new file mode 100644 index 0000000000..6d52320104 --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/operations/secretValueOperations.js @@ -0,0 +1,1569 @@ +/* + * 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'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [secretValueResourceDescription.tags] Resource tags. + * + * @param {string} secretValueResourceDescription.location The geo-location + * where the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _create(resourceGroupName, secretResourceName, secretValueResourceName, secretValueResourceDescription, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceDescription === null || secretValueResourceDescription === undefined) { + throw new Error('secretValueResourceDescription cannot be null or undefined.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (secretValueResourceDescription !== null && secretValueResourceDescription !== undefined) { + let requestModelMapper = new client.models['SecretValueResourceDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, secretValueResourceDescription, 'secretValueResourceDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(secretValueResourceDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, secretResourceName, secretValueResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, secretResourceName, secretValueResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, secretResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValue} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listValue(resourceGroupName, secretResourceName, secretValueResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (secretResourceName === null || secretResourceName === undefined || typeof secretResourceName.valueOf() !== 'string') { + throw new Error('secretResourceName cannot be null or undefined and it must be of type string.'); + } + if (secretValueResourceName === null || secretValueResourceName === undefined || typeof secretValueResourceName.valueOf() !== 'string') { + throw new Error('secretValueResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{secretResourceName}', secretResourceName); + requestUrl = requestUrl.replace('{secretValueResourceName}', secretValueResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValue']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SecretValueResourceDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a SecretValueOperations. */ +class SecretValueOperations { + /** + * Create a SecretValueOperations. + * @param {ServiceFabricMeshManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._create = _create; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._list = _list; + this._listValue = _listValue; + this._listNext = _listNext; + } + + /** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [secretValueResourceDescription.tags] Resource tags. + * + * @param {string} secretValueResourceDescription.location The geo-location + * where the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName, secretResourceName, secretValueResourceName, secretValueResourceDescription, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._create(resourceGroupName, secretResourceName, secretValueResourceName, secretValueResourceDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Adds the specified value as a new version of the specified secret + * resource. + * + * Creates a new value of the specified secret resource. The name of the value + * is typically the version identifier. Once created the value cannot be + * changed. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} secretValueResourceDescription Description for creating a + * value of a secret resource. + * + * @param {string} [secretValueResourceDescription.value] The actual value of + * the secret. + * + * @param {object} [secretValueResourceDescription.tags] Resource tags. + * + * @param {string} secretValueResourceDescription.location The geo-location + * where the resource lives + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValueResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + create(resourceGroupName, secretResourceName, secretValueResourceName, secretValueResourceDescription, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._create(resourceGroupName, secretResourceName, secretValueResourceName, secretValueResourceDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._create(resourceGroupName, secretResourceName, secretValueResourceName, secretValueResourceDescription, options, optionalCallback); + } + } + + /** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, secretResourceName, secretValueResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the specified secret value resource. + * + * Get the information about the specified named secret value resources. The + * information does not include the actual value of the secret. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValueResourceDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, secretResourceName, secretValueResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, secretResourceName, secretValueResourceName, options, optionalCallback); + } + } + + /** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, secretResourceName, secretValueResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes the specified value of the named secret resource. + * + * Deletes the secret value resource identified by the name. The name of the + * resource is typically the version associated with that value. Deletion will + * fail if the specified value is in use. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, secretResourceName, secretValueResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, secretResourceName, secretValueResourceName, options, optionalCallback); + } + } + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, secretResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, secretResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValueResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, secretResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, secretResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, secretResourceName, options, optionalCallback); + } + } + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listValueWithHttpOperationResponse(resourceGroupName, secretResourceName, secretValueResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listValue(resourceGroupName, secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Lists the specified value of the secret resource. + * + * Lists the decrypted value of the specified named value of the secret + * resource. This is a privileged operation. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} secretResourceName The name of the secret resource. + * + * @param {string} secretValueResourceName The name of the secret resource + * value which is typically the version identifier for the value. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValue} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValue} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listValue(resourceGroupName, secretResourceName, secretValueResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listValue(resourceGroupName, secretResourceName, secretValueResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listValue(resourceGroupName, secretResourceName, secretValueResourceName, options, optionalCallback); + } + } + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List names of all values of the the specified secret resource. + * + * Gets information about all secret value resources of the specified secret + * resource. The information includes the names of the secret value resources, + * but not the actual values. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SecretValueResourceDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SecretValueResourceDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = SecretValueOperations; diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/service.js b/lib/services/serviceFabricMeshManagement/lib/operations/service.js index 897ac23711..251a29eafc 100644 --- a/lib/services/serviceFabricMeshManagement/lib/operations/service.js +++ b/lib/services/serviceFabricMeshManagement/lib/operations/service.js @@ -15,15 +15,16 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * @summary Gets services of a given application. + * @summary Gets the service resource with the given name. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Gets the information about the service resource with the given name. The + * information include the description and other properties of the service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. * * @param {object} [options] Optional Parameters. * @@ -37,13 +38,14 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceList} for more information. + * See {@link ServiceResourceDescription} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByApplicationName(resourceGroupName, applicationName, options, callback) { +function _get(resourceGroupName, applicationResourceName, serviceResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -61,8 +63,11 @@ function _listByApplicationName(resourceGroupName, applicationName, options, cal 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 (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -73,10 +78,11 @@ function _listByApplicationName(resourceGroupName, applicationName, options, cal // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{applicationName}', applicationName); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -120,12 +126,13 @@ function _listByApplicationName(resourceGroupName, applicationName, options, cal try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['ErrorModel']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -145,7 +152,7 @@ function _listByApplicationName(resourceGroupName, applicationName, options, cal parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ServiceList']().mapper(); + let resultMapper = new client.models['ServiceResourceDescription']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -161,15 +168,14 @@ function _listByApplicationName(resourceGroupName, applicationName, options, cal } /** - * @summary Gets the properties of the service. + * @summary Lists all the service resources. * - * The operation returns the properties of the service. + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. - * - * @param {string} serviceName The identity of the service. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -183,14 +189,14 @@ function _listByApplicationName(resourceGroupName, applicationName, options, cal * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceDescription} for more + * See {@link ServiceResourceDescriptionList} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, applicationName, serviceName, options, callback) { +function _list(resourceGroupName, applicationResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -208,11 +214,8 @@ function _get(resourceGroupName, applicationName, serviceName, 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 (applicationName === null || applicationName === undefined || typeof applicationName.valueOf() !== 'string') { - throw new Error('applicationName cannot be null or undefined and it must be of type string.'); - } - if (serviceName === null || serviceName === undefined || typeof serviceName.valueOf() !== 'string') { - throw new Error('serviceName cannot be null or undefined and it must be of type string.'); + if (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -223,11 +226,10 @@ function _get(resourceGroupName, applicationName, serviceName, options, callback // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{applicationName}', applicationName); - requestUrl = requestUrl.replace('{serviceName}', serviceName); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -271,12 +273,13 @@ function _get(resourceGroupName, applicationName, serviceName, options, callback try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['ErrorModel']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -296,7 +299,7 @@ function _get(resourceGroupName, applicationName, serviceName, options, callback parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ServiceResourceDescription']().mapper(); + let resultMapper = new client.models['ServiceResourceDescriptionList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -312,11 +315,10 @@ function _get(resourceGroupName, applicationName, serviceName, options, callback } /** - * @summary Gets services of a given application. + * @summary Lists all the service resources. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -333,13 +335,14 @@ function _get(resourceGroupName, applicationName, serviceName, options, callback * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceList} for more information. + * See {@link ServiceResourceDescriptionList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByApplicationNameNext(nextPageLink, options, callback) { +function _listNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -402,12 +405,13 @@ function _listByApplicationNameNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['ErrorModel']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -427,7 +431,7 @@ function _listByApplicationNameNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ServiceList']().mapper(); + let resultMapper = new client.models['ServiceResourceDescriptionList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -450,21 +454,22 @@ class Service { */ constructor(client) { this.client = client; - this._listByApplicationName = _listByApplicationName; this._get = _get; - this._listByApplicationNameNext = _listByApplicationNameNext; + this._list = _list; + this._listNext = _listNext; } /** - * @summary Gets services of a given application. + * @summary Gets the service resource with the given name. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Gets the information about the service resource with the given name. The + * information include the description and other properties of the service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. * * @param {object} [options] Optional Parameters. * @@ -473,15 +478,15 @@ class Service { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByApplicationNameWithHttpOperationResponse(resourceGroupName, applicationName, options) { + getWithHttpOperationResponse(resourceGroupName, applicationResourceName, serviceResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByApplicationName(resourceGroupName, applicationName, options, (err, result, request, response) => { + self._get(resourceGroupName, applicationResourceName, serviceResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -492,15 +497,16 @@ class Service { } /** - * @summary Gets services of a given application. + * @summary Gets the service resource with the given name. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Gets the information about the service resource with the given name. The + * information include the description and other properties of the service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. * * @param {object} [options] Optional Parameters. * @@ -514,7 +520,7 @@ class Service { * * {Promise} A promise is returned * - * @resolve {ServiceList} - The deserialized result object. + * @resolve {ServiceResourceDescription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -523,13 +529,14 @@ class Service { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceList} for more information. + * See {@link ServiceResourceDescription} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByApplicationName(resourceGroupName, applicationName, options, optionalCallback) { + get(resourceGroupName, applicationResourceName, serviceResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -538,27 +545,26 @@ class Service { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByApplicationName(resourceGroupName, applicationName, options, (err, result, request, response) => { + self._get(resourceGroupName, applicationResourceName, serviceResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByApplicationName(resourceGroupName, applicationName, options, optionalCallback); + return self._get(resourceGroupName, applicationResourceName, serviceResourceName, options, optionalCallback); } } /** - * @summary Gets the properties of the service. + * @summary Lists all the service resources. * - * The operation returns the properties of the service. + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. - * - * @param {string} serviceName The identity of the service. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -567,15 +573,15 @@ class Service { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, applicationName, serviceName, options) { + listWithHttpOperationResponse(resourceGroupName, applicationResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, applicationName, serviceName, options, (err, result, request, response) => { + self._list(resourceGroupName, applicationResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -586,15 +592,14 @@ class Service { } /** - * @summary Gets the properties of the service. + * @summary Lists all the service resources. * - * The operation returns the properties of the service. + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} applicationName The identity of the application. - * - * @param {string} serviceName The identity of the service. + * @param {string} applicationResourceName The identity of the application. * * @param {object} [options] Optional Parameters. * @@ -608,7 +613,7 @@ class Service { * * {Promise} A promise is returned * - * @resolve {ServiceResourceDescription} - The deserialized result object. + * @resolve {ServiceResourceDescriptionList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -617,14 +622,14 @@ class Service { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceResourceDescription} for more + * See {@link ServiceResourceDescriptionList} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, applicationName, serviceName, options, optionalCallback) { + list(resourceGroupName, applicationResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -633,23 +638,22 @@ class Service { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, applicationName, serviceName, options, (err, result, request, response) => { + self._list(resourceGroupName, applicationResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, applicationName, serviceName, options, optionalCallback); + return self._list(resourceGroupName, applicationResourceName, options, optionalCallback); } } /** - * @summary Gets services of a given application. + * @summary Lists all the service resources. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -661,15 +665,15 @@ class Service { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByApplicationNameNextWithHttpOperationResponse(nextPageLink, options) { + listNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByApplicationNameNext(nextPageLink, options, (err, result, request, response) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -680,11 +684,10 @@ class Service { } /** - * @summary Gets services of a given application. + * @summary Lists all the service resources. * - * Gets the information about all services of a given service of an - * application. The information includes the runtime properties of the service - * instance. + * Gets the information about all services of an application resource. The + * information include the description and other properties of the Service. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -701,7 +704,7 @@ class Service { * * {Promise} A promise is returned * - * @resolve {ServiceList} - The deserialized result object. + * @resolve {ServiceResourceDescriptionList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -710,13 +713,14 @@ class Service { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceList} for more information. + * See {@link ServiceResourceDescriptionList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByApplicationNameNext(nextPageLink, options, optionalCallback) { + listNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -725,14 +729,14 @@ class Service { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByApplicationNameNext(nextPageLink, options, (err, result, request, response) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByApplicationNameNext(nextPageLink, options, optionalCallback); + return self._listNext(nextPageLink, options, optionalCallback); } } diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/serviceReplica.js b/lib/services/serviceFabricMeshManagement/lib/operations/serviceReplica.js new file mode 100644 index 0000000000..577cd736ba --- /dev/null +++ b/lib/services/serviceFabricMeshManagement/lib/operations/serviceReplica.js @@ -0,0 +1,774 @@ +/* + * 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'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); + } + if (replicaName === null || replicaName === undefined || typeof replicaName.valueOf() !== 'string') { + throw new Error('replicaName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas/{replicaName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); + requestUrl = requestUrl.replace('{replicaName}', replicaName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ServiceReplicaDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, applicationResourceName, serviceResourceName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + 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 (applicationResourceName === null || applicationResourceName === undefined || typeof applicationResourceName.valueOf() !== 'string') { + throw new Error('applicationResourceName cannot be null or undefined and it must be of type string.'); + } + if (serviceResourceName === null || serviceResourceName === undefined || typeof serviceResourceName.valueOf() !== 'string') { + throw new Error('serviceResourceName cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{applicationResourceName}', applicationResourceName); + requestUrl = requestUrl.replace('{serviceResourceName}', serviceResourceName); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ServiceReplicaDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ServiceReplicaDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ServiceReplica. */ +class ServiceReplica { + /** + * Create a ServiceReplica. + * @param {ServiceFabricMeshManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._list = _list; + this._listNext = _listNext; + } + + /** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the given replica of the service of an application. + * + * Gets the information about the service replica with the given name. The + * information include the description and other properties of the service + * replica. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {string} replicaName Service Fabric replica name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ServiceReplicaDescription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, applicationResourceName, serviceResourceName, replicaName, options, optionalCallback); + } + } + + /** + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, applicationResourceName, serviceResourceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. + * + * @param {string} resourceGroupName Azure resource group name + * + * @param {string} applicationResourceName The identity of the application. + * + * @param {string} serviceResourceName The identity of the service. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ServiceReplicaDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, applicationResourceName, serviceResourceName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, applicationResourceName, serviceResourceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, applicationResourceName, serviceResourceName, options, optionalCallback); + } + } + + /** + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets replicas of a given service. + * + * Gets the information about all replicas of a given service of an + * application. The information includes the runtime properties of the replica + * instance. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ServiceReplicaDescriptionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceReplicaDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ServiceReplica; diff --git a/lib/services/serviceFabricMeshManagement/lib/operations/volume.js b/lib/services/serviceFabricMeshManagement/lib/operations/volume.js index c92dfd3638..5ce6a3da5a 100644 --- a/lib/services/serviceFabricMeshManagement/lib/operations/volume.js +++ b/lib/services/serviceFabricMeshManagement/lib/operations/volume.js @@ -17,16 +17,15 @@ const WebResource = msRest.WebResource; /** * @summary Creates or updates a volume resource. * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. - * + * Creates a volume resource with the specified name, description and + * properties. If a volume resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * - * @param {object} volumeResourceDescription Description for creating a volume + * @param {object} volumeResourceDescription Description for creating a Volume * resource. * * @param {string} [volumeResourceDescription.description] User readable @@ -46,6 +45,9 @@ const WebResource = msRest.WebResource; * * @param {object} [volumeResourceDescription.tags] Resource tags. * + * @param {string} volumeResourceDescription.location The geo-location where + * the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -65,7 +67,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, volumeName, volumeResourceDescription, options, callback) { +function _create(resourceGroupName, volumeResourceName, volumeResourceDescription, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -87,8 +89,8 @@ function _create(resourceGroupName, volumeName, volumeResourceDescription, optio 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 (volumeName === null || volumeName === undefined || typeof volumeName.valueOf() !== 'string') { - throw new Error('volumeName cannot be null or undefined and it must be of type string.'); + if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { + throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); } if (volumeResourceDescription === null || volumeResourceDescription === undefined) { throw new Error('volumeResourceDescription cannot be null or undefined.'); @@ -102,10 +104,10 @@ function _create(resourceGroupName, volumeName, volumeResourceDescription, optio // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{volumeName}', volumeName); + requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -153,7 +155,7 @@ function _create(resourceGroupName, volumeName, volumeResourceDescription, optio return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 201) { + if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -222,15 +224,14 @@ function _create(resourceGroupName, volumeName, volumeResourceDescription, optio } /** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. + * @summary Gets the volume resource with the given name. * + * Gets the information about the volume resource with the given name. The + * information include the description and other properties of the volume. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * * @param {object} [options] Optional Parameters. * @@ -251,7 +252,7 @@ function _create(resourceGroupName, volumeName, volumeResourceDescription, optio * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, volumeName, options, callback) { +function _get(resourceGroupName, volumeResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -269,8 +270,8 @@ function _get(resourceGroupName, volumeName, 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 (volumeName === null || volumeName === undefined || typeof volumeName.valueOf() !== 'string') { - throw new Error('volumeName cannot be null or undefined and it must be of type string.'); + if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { + throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -281,10 +282,10 @@ function _get(resourceGroupName, volumeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{volumeName}', volumeName); + requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -372,11 +373,11 @@ function _get(resourceGroupName, volumeName, options, callback) { /** * @summary Deletes the volume resource. * - * Deletes the volume identified by the name. + * Deletes the volume resource identified by the name. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * * @param {object} [options] Optional Parameters. * @@ -395,7 +396,7 @@ function _get(resourceGroupName, volumeName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteMethod(resourceGroupName, volumeName, options, callback) { +function _deleteMethod(resourceGroupName, volumeResourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -413,8 +414,8 @@ function _deleteMethod(resourceGroupName, volumeName, 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 (volumeName === null || volumeName === undefined || typeof volumeName.valueOf() !== 'string') { - throw new Error('volumeName cannot be null or undefined and it must be of type string.'); + if (volumeResourceName === null || volumeResourceName === undefined || typeof volumeResourceName.valueOf() !== 'string') { + throw new Error('volumeResourceName cannot be null or undefined and it must be of type string.'); } 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.'); @@ -425,10 +426,10 @@ function _deleteMethod(resourceGroupName, volumeName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{volumeName}', volumeName); + requestUrl = requestUrl.replace('{volumeResourceName}', volumeResourceName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -462,7 +463,7 @@ function _deleteMethod(resourceGroupName, volumeName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -500,9 +501,7 @@ function _deleteMethod(resourceGroupName, volumeName, options, callback) { * @summary Gets all the volume resources in a given resource group. * * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. - * + * The information include the description and other properties of the Volume. * * @param {string} resourceGroupName Azure resource group name * @@ -642,9 +641,8 @@ function _listByResourceGroup(resourceGroupName, options, callback) { /** * @summary Gets all the volume resources in a given subscription. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. - * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. * * @param {object} [options] Optional Parameters. * @@ -779,9 +777,7 @@ function _listBySubscription(options, callback) { * @summary Gets all the volume resources in a given resource group. * * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. - * + * The information include the description and other properties of the Volume. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -912,9 +908,8 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { /** * @summary Gets all the volume resources in a given subscription. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. - * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1062,16 +1057,15 @@ class Volume { /** * @summary Creates or updates a volume resource. * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. - * + * Creates a volume resource with the specified name, description and + * properties. If a volume resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * - * @param {object} volumeResourceDescription Description for creating a volume + * @param {object} volumeResourceDescription Description for creating a Volume * resource. * * @param {string} [volumeResourceDescription.description] User readable @@ -1091,6 +1085,9 @@ class Volume { * * @param {object} [volumeResourceDescription.tags] Resource tags. * + * @param {string} volumeResourceDescription.location The geo-location where + * the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1102,11 +1099,11 @@ class Volume { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, volumeName, volumeResourceDescription, options) { + createWithHttpOperationResponse(resourceGroupName, volumeResourceName, volumeResourceDescription, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, volumeName, volumeResourceDescription, options, (err, result, request, response) => { + self._create(resourceGroupName, volumeResourceName, volumeResourceDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1119,16 +1116,15 @@ class Volume { /** * @summary Creates or updates a volume resource. * - * Creates a volume resource with the specified name and description. If a - * volume with the same name already exists, then its description is updated to - * the one indicated in this request. - * + * Creates a volume resource with the specified name, description and + * properties. If a volume resource with the same name exists, then it is + * updated with the specified description and properties. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * - * @param {object} volumeResourceDescription Description for creating a volume + * @param {object} volumeResourceDescription Description for creating a Volume * resource. * * @param {string} [volumeResourceDescription.description] User readable @@ -1148,6 +1144,9 @@ class Volume { * * @param {object} [volumeResourceDescription.tags] Resource tags. * + * @param {string} volumeResourceDescription.location The geo-location where + * the resource lives + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1176,7 +1175,7 @@ class Volume { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, volumeName, volumeResourceDescription, options, optionalCallback) { + create(resourceGroupName, volumeResourceName, volumeResourceDescription, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1185,27 +1184,26 @@ class Volume { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, volumeName, volumeResourceDescription, options, (err, result, request, response) => { + self._create(resourceGroupName, volumeResourceName, volumeResourceDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, volumeName, volumeResourceDescription, options, optionalCallback); + return self._create(resourceGroupName, volumeResourceName, volumeResourceDescription, options, optionalCallback); } } /** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. + * @summary Gets the volume resource with the given name. * + * Gets the information about the volume resource with the given name. The + * information include the description and other properties of the volume. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * * @param {object} [options] Optional Parameters. * @@ -1218,11 +1216,11 @@ class Volume { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, volumeName, options) { + getWithHttpOperationResponse(resourceGroupName, volumeResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, volumeName, options, (err, result, request, response) => { + self._get(resourceGroupName, volumeResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1233,15 +1231,14 @@ class Volume { } /** - * @summary Gets the volume resource. - * - * Gets the information about the volume resource with a given name. This - * information includes the volume description and other runtime information. + * @summary Gets the volume resource with the given name. * + * Gets the information about the volume resource with the given name. The + * information include the description and other properties of the volume. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * * @param {object} [options] Optional Parameters. * @@ -1271,7 +1268,7 @@ class Volume { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, volumeName, options, optionalCallback) { + get(resourceGroupName, volumeResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1280,25 +1277,25 @@ class Volume { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, volumeName, options, (err, result, request, response) => { + self._get(resourceGroupName, volumeResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, volumeName, options, optionalCallback); + return self._get(resourceGroupName, volumeResourceName, options, optionalCallback); } } /** * @summary Deletes the volume resource. * - * Deletes the volume identified by the name. + * Deletes the volume resource identified by the name. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * * @param {object} [options] Optional Parameters. * @@ -1311,11 +1308,11 @@ class Volume { * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, volumeName, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, volumeResourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, volumeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, volumeResourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1328,11 +1325,11 @@ class Volume { /** * @summary Deletes the volume resource. * - * Deletes the volume identified by the name. + * Deletes the volume resource identified by the name. * * @param {string} resourceGroupName Azure resource group name * - * @param {string} volumeName The identity of the volume. + * @param {string} volumeResourceName The identity of the volume. * * @param {object} [options] Optional Parameters. * @@ -1360,7 +1357,7 @@ class Volume { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName, volumeName, options, optionalCallback) { + deleteMethod(resourceGroupName, volumeResourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1369,14 +1366,14 @@ class Volume { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, volumeName, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, volumeResourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, volumeName, options, optionalCallback); + return self._deleteMethod(resourceGroupName, volumeResourceName, options, optionalCallback); } } @@ -1384,9 +1381,7 @@ class Volume { * @summary Gets all the volume resources in a given resource group. * * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. - * + * The information include the description and other properties of the Volume. * * @param {string} resourceGroupName Azure resource group name * @@ -1419,9 +1414,7 @@ class Volume { * @summary Gets all the volume resources in a given resource group. * * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. - * + * The information include the description and other properties of the Volume. * * @param {string} resourceGroupName Azure resource group name * @@ -1476,9 +1469,8 @@ class Volume { /** * @summary Gets all the volume resources in a given subscription. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. - * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. * * @param {object} [options] Optional Parameters. * @@ -1508,9 +1500,8 @@ class Volume { /** * @summary Gets all the volume resources in a given subscription. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. - * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. * * @param {object} [options] Optional Parameters. * @@ -1564,9 +1555,7 @@ class Volume { * @summary Gets all the volume resources in a given resource group. * * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. - * + * The information include the description and other properties of the Volume. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1600,9 +1589,7 @@ class Volume { * @summary Gets all the volume resources in a given resource group. * * Gets the information about all volume resources in a given resource group. - * The information includes the volume description and other runtime - * information. - * + * The information include the description and other properties of the Volume. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1658,9 +1645,8 @@ class Volume { /** * @summary Gets all the volume resources in a given subscription. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. - * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1693,9 +1679,8 @@ class Volume { /** * @summary Gets all the volume resources in a given subscription. * - * Gets the information about all volume resources in a given subscription. The - * information includes the volume description and other runtime information. - * + * Gets the information about all volume resources in a given resource group. + * The information include the description and other properties of the volume. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. diff --git a/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.d.ts b/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.d.ts index 744228e123..feeffbad0f 100644 --- a/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.d.ts +++ b/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.d.ts @@ -56,13 +56,16 @@ export default class ServiceFabricMeshManagementClient extends AzureServiceClien generateClientRequestId: boolean; // Operation groups + operations: operations.Operations; + secret: operations.Secret; + secretValueOperations: operations.SecretValueOperations; + volume: operations.Volume; + network: operations.Network; + gateway: operations.Gateway; application: operations.Application; service: operations.Service; - replica: operations.Replica; + serviceReplica: operations.ServiceReplica; codePackage: operations.CodePackage; - operations: operations.Operations; - network: operations.Network; - volume: operations.Volume; } export { ServiceFabricMeshManagementClient, models as ServiceFabricMeshManagementModels }; diff --git a/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.js b/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.js index 414cafe32b..ecd3f07d41 100644 --- a/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.js +++ b/lib/services/serviceFabricMeshManagement/lib/serviceFabricMeshManagementClient.js @@ -50,7 +50,7 @@ class ServiceFabricMeshManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2018-07-01-preview'; + this.apiVersion = '2018-09-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -72,13 +72,16 @@ class ServiceFabricMeshManagementClient extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } + this.operations = new operations.Operations(this); + this.secret = new operations.Secret(this); + this.secretValueOperations = new operations.SecretValueOperations(this); + this.volume = new operations.Volume(this); + this.network = new operations.Network(this); + this.gateway = new operations.Gateway(this); this.application = new operations.Application(this); this.service = new operations.Service(this); - this.replica = new operations.Replica(this); + this.serviceReplica = new operations.ServiceReplica(this); this.codePackage = new operations.CodePackage(this); - this.operations = new operations.Operations(this); - this.network = new operations.Network(this); - this.volume = new operations.Volume(this); this.models = models; msRest.addSerializationMixin(this); } diff --git a/lib/services/serviceFabricMeshManagement/package.json b/lib/services/serviceFabricMeshManagement/package.json index f59178dbf1..c5745bce6e 100644 --- a/lib/services/serviceFabricMeshManagement/package.json +++ b/lib/services/serviceFabricMeshManagement/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/serviceFabricMeshManagementClient.js", "types": "./lib/serviceFabricMeshManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/serviceFabricMeshManagement", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git"