diff --git a/lib/services/logicManagement/LICENSE.txt b/lib/services/logicManagement/LICENSE.txt index 0313a903d7..5431ba98b9 100644 --- a/lib/services/logicManagement/LICENSE.txt +++ b/lib/services/logicManagement/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2017 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/logicManagement/README.md b/lib/services/logicManagement/README.md index d382150c44..13683f4f53 100644 --- a/lib/services/logicManagement/README.md +++ b/lib/services/logicManagement/README.md @@ -1,38 +1,42 @@ -# Microsoft Azure SDK for Node.js - LogicManagement - -This project provides a Node.js package that makes it easy to manage Microsoft Azure Logic. -## API-Version: 2016-06-01 -## Minimum node.js version >= 6.x.x - -## How to Install - -```bash -npm install azure-arm-logic -``` - -## How to Use - -### Authentication, client creation and listing workflows as an example - - ```javascript - const msRestAzure = require('ms-rest-azure'); - const LogicManagement = require("azure-arm-logic"); - - // Interactive Login - // It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful, - // the user will get a DeviceTokenCredentials object. - msRestAzure.interactiveLogin().then((credentials) => { - let client = new LogicManagement(credentials, 'your-subscription-id'); - return client.workflows.listBySubscription(); - }).then((workflows) => { - console.log('List of workflows:'); - console.dir(workflows, {depth: null, colors: true}); -}).catch((err) => { - console.log('An error ocurred'); - console.dir(err, {depth: null, colors: true}); - }); -``` - -## Related projects - -- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) \ No newline at end of file +--- +uid: azure-arm-logic +summary: *content + +--- +# Microsoft Azure SDK for Node.js - LogicManagementClient +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +## Features + + +## How to Install + +```bash +npm install azure-arm-logic +``` + +## How to use + +### Authentication, client creation and listBySubscription workflows as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const LogicManagementClient = require("azure-arm-logic"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new LogicManagementClient(creds, subscriptionId); + const top = 1; + const filter = "testfilter"; + return client.workflows.listBySubscription(top, filter).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); + +## Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/logicManagement/lib/logicManagementClient.d.ts b/lib/services/logicManagement/lib/logicManagementClient.d.ts index 899b54dcf1..7827a13988 100644 --- a/lib/services/logicManagement/lib/logicManagementClient.d.ts +++ b/lib/services/logicManagement/lib/logicManagementClient.d.ts @@ -13,7 +13,7 @@ import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; import * as models from "./models"; import * as operations from "./operations"; -declare class LogicManagementClient extends AzureServiceClient { +export default class LogicManagementClient extends AzureServiceClient { /** * Initializes a new instance of the LogicManagementClient class. * @constructor @@ -34,11 +34,11 @@ declare class LogicManagementClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); @@ -62,7 +62,12 @@ declare class LogicManagementClient extends AzureServiceClient { workflowTriggerHistories: operations.WorkflowTriggerHistories; workflowRuns: operations.WorkflowRuns; workflowRunActions: operations.WorkflowRunActions; + workflowRunActionRepetitions: operations.WorkflowRunActionRepetitions; + workflowRunActionScopedRepetitions: operations.WorkflowRunActionScopedRepetitions; + workflowRunOperations: operations.WorkflowRunOperations; integrationAccounts: operations.IntegrationAccounts; + integrationAccountAssemblies: operations.IntegrationAccountAssemblies; + integrationAccountBatchConfigurations: operations.IntegrationAccountBatchConfigurations; schemas: operations.Schemas; maps: operations.Maps; partners: operations.Partners; @@ -179,4 +184,4 @@ declare class LogicManagementClient extends AzureServiceClient { listOperationsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } -export = LogicManagementClient; +export { LogicManagementClient, models as LogicManagementModels }; diff --git a/lib/services/logicManagement/lib/logicManagementClient.js b/lib/services/logicManagement/lib/logicManagementClient.js index a9bfced36c..e1e9cd790e 100644 --- a/lib/services/logicManagement/lib/logicManagementClient.js +++ b/lib/services/logicManagement/lib/logicManagementClient.js @@ -293,9 +293,9 @@ class LogicManagementClient extends ServiceClient { * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { @@ -337,7 +337,12 @@ class LogicManagementClient extends ServiceClient { this.workflowTriggerHistories = new operations.WorkflowTriggerHistories(this); this.workflowRuns = new operations.WorkflowRuns(this); this.workflowRunActions = new operations.WorkflowRunActions(this); + this.workflowRunActionRepetitions = new operations.WorkflowRunActionRepetitions(this); + this.workflowRunActionScopedRepetitions = new operations.WorkflowRunActionScopedRepetitions(this); + this.workflowRunOperations = new operations.WorkflowRunOperations(this); this.integrationAccounts = new operations.IntegrationAccounts(this); + this.integrationAccountAssemblies = new operations.IntegrationAccountAssemblies(this); + this.integrationAccountBatchConfigurations = new operations.IntegrationAccountBatchConfigurations(this); this.schemas = new operations.Schemas(this); this.maps = new operations.Maps(this); this.partners = new operations.Partners(this); @@ -515,3 +520,6 @@ class LogicManagementClient extends ServiceClient { } module.exports = LogicManagementClient; +module.exports['default'] = LogicManagementClient; +module.exports.LogicManagementClient = LogicManagementClient; +module.exports.LogicManagementModels = models; diff --git a/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js b/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js index 7bb7343415..22622a355a 100644 --- a/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js +++ b/lib/services/logicManagement/lib/models/aS2AcknowledgementConnectionSettings.js @@ -11,7 +11,7 @@ 'use strict'; /** - * The AS2 agreement acknowledegment connection settings. + * The AS2 agreement acknowledgement connection settings. * */ class AS2AcknowledgementConnectionSettings { diff --git a/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js b/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js index dc085b6e7e..22f6c3f81f 100644 --- a/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js +++ b/lib/services/logicManagement/lib/models/aS2OneWayAgreement.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * The integration account AS2 oneway agreement. + * The integration account AS2 one-way agreement. * */ class AS2OneWayAgreement { diff --git a/lib/services/logicManagement/lib/models/accessKeyRegenerateActionDefinition.js b/lib/services/logicManagement/lib/models/accessKeyRegenerateActionDefinition.js new file mode 100644 index 0000000000..0da1f80394 --- /dev/null +++ b/lib/services/logicManagement/lib/models/accessKeyRegenerateActionDefinition.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Class representing a AccessKeyRegenerateActionDefinition. + */ +class AccessKeyRegenerateActionDefinition { + /** + * Create a AccessKeyRegenerateActionDefinition. + * @member {string} keyType Possible values include: 'NotSpecified', + * 'Primary', 'Secondary' + */ + constructor() { + } + + /** + * Defines the metadata of AccessKeyRegenerateActionDefinition + * + * @returns {object} metadata of AccessKeyRegenerateActionDefinition + * + */ + mapper() { + return { + required: false, + serializedName: 'AccessKeyRegenerateActionDefinition', + type: { + name: 'Composite', + className: 'AccessKeyRegenerateActionDefinition', + modelProperties: { + keyType: { + required: true, + serializedName: 'keyType', + type: { + name: 'Enum', + allowedValues: [ 'NotSpecified', 'Primary', 'Secondary' ] + } + } + } + } + }; + } +} + +module.exports = AccessKeyRegenerateActionDefinition; diff --git a/lib/services/logicManagement/lib/models/artifactContentPropertiesDefinition.js b/lib/services/logicManagement/lib/models/artifactContentPropertiesDefinition.js new file mode 100644 index 0000000000..fdbf96fb93 --- /dev/null +++ b/lib/services/logicManagement/lib/models/artifactContentPropertiesDefinition.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'); + +/** + * The artifact content properties definition. + * + * @extends models['ArtifactProperties'] + */ +class ArtifactContentPropertiesDefinition extends models['ArtifactProperties'] { + /** + * Create a ArtifactContentPropertiesDefinition. + * @member {object} [content] + * @member {string} [contentType] The content type. + * @member {object} [contentLink] The content link. + * @member {string} [contentLink.uri] The content link URI. + * @member {string} [contentLink.contentVersion] The content version. + * @member {number} [contentLink.contentSize] The content size. + * @member {object} [contentLink.contentHash] The content hash. + * @member {string} [contentLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [contentLink.contentHash.value] The value of the content + * hash. + * @member {object} [contentLink.metadata] The metadata. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ArtifactContentPropertiesDefinition + * + * @returns {object} metadata of ArtifactContentPropertiesDefinition + * + */ + mapper() { + return { + required: false, + serializedName: 'ArtifactContentPropertiesDefinition', + type: { + name: 'Composite', + className: 'ArtifactContentPropertiesDefinition', + modelProperties: { + createdTime: { + required: false, + serializedName: 'createdTime', + type: { + name: 'DateTime' + } + }, + changedTime: { + required: false, + serializedName: 'changedTime', + type: { + name: 'DateTime' + } + }, + metadata: { + required: false, + serializedName: 'metadata', + type: { + name: 'Object' + } + }, + content: { + required: false, + serializedName: 'content', + type: { + name: 'Object' + } + }, + contentType: { + required: false, + serializedName: 'contentType', + type: { + name: 'String' + } + }, + contentLink: { + required: false, + serializedName: 'contentLink', + type: { + name: 'Composite', + className: 'ContentLink' + } + } + } + } + }; + } +} + +module.exports = ArtifactContentPropertiesDefinition; diff --git a/lib/services/logicManagement/lib/models/artifactProperties.js b/lib/services/logicManagement/lib/models/artifactProperties.js new file mode 100644 index 0000000000..9470a5c55d --- /dev/null +++ b/lib/services/logicManagement/lib/models/artifactProperties.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'; + +/** + * The artifact properties definition. + * + */ +class ArtifactProperties { + /** + * Create a ArtifactProperties. + * @member {date} [createdTime] The artifact creation time. + * @member {date} [changedTime] The artifact changed time. + * @member {object} [metadata] + */ + constructor() { + } + + /** + * Defines the metadata of ArtifactProperties + * + * @returns {object} metadata of ArtifactProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ArtifactProperties', + type: { + name: 'Composite', + className: 'ArtifactProperties', + modelProperties: { + createdTime: { + required: false, + serializedName: 'createdTime', + type: { + name: 'DateTime' + } + }, + changedTime: { + required: false, + serializedName: 'changedTime', + type: { + name: 'DateTime' + } + }, + metadata: { + required: false, + serializedName: 'metadata', + type: { + name: 'Object' + } + } + } + } + }; + } +} + +module.exports = ArtifactProperties; diff --git a/lib/services/logicManagement/lib/models/assemblyCollection.js b/lib/services/logicManagement/lib/models/assemblyCollection.js new file mode 100644 index 0000000000..edc1ce569c --- /dev/null +++ b/lib/services/logicManagement/lib/models/assemblyCollection.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'; + +/** + * A collection of assembly definitions. + */ +class AssemblyCollection extends Array { + /** + * Create a AssemblyCollection. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AssemblyCollection + * + * @returns {object} metadata of AssemblyCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'AssemblyCollection', + type: { + name: 'Composite', + className: 'AssemblyCollection', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AssemblyDefinitionElementType', + type: { + name: 'Composite', + className: 'AssemblyDefinition' + } + } + } + } + } + } + }; + } +} + +module.exports = AssemblyCollection; diff --git a/lib/services/logicManagement/lib/models/assemblyDefinition.js b/lib/services/logicManagement/lib/models/assemblyDefinition.js new file mode 100644 index 0000000000..28774b9f64 --- /dev/null +++ b/lib/services/logicManagement/lib/models/assemblyDefinition.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'); + +/** + * The assembly definition. + * + * @extends models['Resource'] + */ +class AssemblyDefinition extends models['Resource'] { + /** + * Create a AssemblyDefinition. + * @member {object} properties The assembly properties. + * @member {string} [properties.assemblyName] The assembly name. + * @member {string} [properties.assemblyVersion] The assembly version. + * @member {string} [properties.assemblyCulture] The assembly culture. + * @member {string} [properties.assemblyPublicKeyToken] The assembly public + * key token. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AssemblyDefinition + * + * @returns {object} metadata of AssemblyDefinition + * + */ + mapper() { + return { + required: false, + serializedName: 'AssemblyDefinition', + type: { + name: 'Composite', + className: 'AssemblyDefinition', + 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' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + properties: { + required: true, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'AssemblyProperties' + } + } + } + } + }; + } +} + +module.exports = AssemblyDefinition; diff --git a/lib/services/logicManagement/lib/models/assemblyProperties.js b/lib/services/logicManagement/lib/models/assemblyProperties.js new file mode 100644 index 0000000000..96a0c07445 --- /dev/null +++ b/lib/services/logicManagement/lib/models/assemblyProperties.js @@ -0,0 +1,123 @@ +/* + * 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'); + +/** + * The assembly properties definition. + * + * @extends models['ArtifactContentPropertiesDefinition'] + */ +class AssemblyProperties extends models['ArtifactContentPropertiesDefinition'] { + /** + * Create a AssemblyProperties. + * @member {string} assemblyName The assembly name. + * @member {string} [assemblyVersion] The assembly version. + * @member {string} [assemblyCulture] The assembly culture. + * @member {string} [assemblyPublicKeyToken] The assembly public key token. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AssemblyProperties + * + * @returns {object} metadata of AssemblyProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'AssemblyProperties', + type: { + name: 'Composite', + className: 'AssemblyProperties', + modelProperties: { + createdTime: { + required: false, + serializedName: 'createdTime', + type: { + name: 'DateTime' + } + }, + changedTime: { + required: false, + serializedName: 'changedTime', + type: { + name: 'DateTime' + } + }, + metadata: { + required: false, + serializedName: 'metadata', + type: { + name: 'Object' + } + }, + content: { + required: false, + serializedName: 'content', + type: { + name: 'Object' + } + }, + contentType: { + required: false, + serializedName: 'contentType', + type: { + name: 'String' + } + }, + contentLink: { + required: false, + serializedName: 'contentLink', + type: { + name: 'Composite', + className: 'ContentLink' + } + }, + assemblyName: { + required: true, + serializedName: 'assemblyName', + type: { + name: 'String' + } + }, + assemblyVersion: { + required: false, + serializedName: 'assemblyVersion', + type: { + name: 'String' + } + }, + assemblyCulture: { + required: false, + serializedName: 'assemblyCulture', + type: { + name: 'String' + } + }, + assemblyPublicKeyToken: { + required: false, + serializedName: 'assemblyPublicKeyToken', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AssemblyProperties; diff --git a/lib/services/logicManagement/lib/models/azureResourceErrorInfo.js b/lib/services/logicManagement/lib/models/azureResourceErrorInfo.js new file mode 100644 index 0000000000..eec422d28f --- /dev/null +++ b/lib/services/logicManagement/lib/models/azureResourceErrorInfo.js @@ -0,0 +1,79 @@ +/* + * 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'); + +/** + * The azure resource error info. + * + * @extends models['ErrorInfo'] + */ +class AzureResourceErrorInfo extends models['ErrorInfo'] { + /** + * Create a AzureResourceErrorInfo. + * @member {string} message The error message. + * @member {array} [details] The error details. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AzureResourceErrorInfo + * + * @returns {object} metadata of AzureResourceErrorInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureResourceErrorInfo', + type: { + name: 'Composite', + className: 'AzureResourceErrorInfo', + modelProperties: { + code: { + required: true, + serializedName: 'code', + type: { + name: 'String' + } + }, + message: { + required: true, + serializedName: 'message', + type: { + name: 'String' + } + }, + details: { + required: false, + serializedName: 'details', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AzureResourceErrorInfoElementType', + type: { + name: 'Composite', + className: 'AzureResourceErrorInfo' + } + } + } + } + } + } + }; + } +} + +module.exports = AzureResourceErrorInfo; diff --git a/lib/services/logicManagement/lib/models/batchConfiguration.js b/lib/services/logicManagement/lib/models/batchConfiguration.js new file mode 100644 index 0000000000..94496ca543 --- /dev/null +++ b/lib/services/logicManagement/lib/models/batchConfiguration.js @@ -0,0 +1,133 @@ +/* + * 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'); + +/** + * The batch configuration resource definition. + * + * @extends models['Resource'] + */ +class BatchConfiguration extends models['Resource'] { + /** + * Create a BatchConfiguration. + * @member {object} properties The batch configuration properties. + * @member {string} [properties.batchGroupName] The name of the batch group. + * @member {object} [properties.releaseCriteria] The batch release criteria. + * @member {number} [properties.releaseCriteria.messageCount] The message + * count. + * @member {number} [properties.releaseCriteria.batchSize] The batch size in + * bytes. + * @member {object} [properties.releaseCriteria.recurrence] The recurrence. + * @member {string} [properties.releaseCriteria.recurrence.frequency] The + * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', + * 'Hour', 'Day', 'Week', 'Month', 'Year' + * @member {number} [properties.releaseCriteria.recurrence.interval] The + * interval. + * @member {string} [properties.releaseCriteria.recurrence.startTime] The + * start time. + * @member {string} [properties.releaseCriteria.recurrence.endTime] The end + * time. + * @member {string} [properties.releaseCriteria.recurrence.timeZone] The time + * zone. + * @member {object} [properties.releaseCriteria.recurrence.schedule] The + * recurrence schedule. + * @member {array} [properties.releaseCriteria.recurrence.schedule.minutes] + * The minutes. + * @member {array} [properties.releaseCriteria.recurrence.schedule.hours] The + * hours. + * @member {array} [properties.releaseCriteria.recurrence.schedule.weekDays] + * The days of the week. + * @member {array} [properties.releaseCriteria.recurrence.schedule.monthDays] + * The month days. + * @member {array} + * [properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] The + * monthly occurrences. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of BatchConfiguration + * + * @returns {object} metadata of BatchConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'BatchConfiguration', + type: { + name: 'Composite', + className: 'BatchConfiguration', + 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' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + properties: { + required: true, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'BatchConfigurationProperties' + } + } + } + } + }; + } +} + +module.exports = BatchConfiguration; diff --git a/lib/services/logicManagement/lib/models/batchConfigurationCollection.js b/lib/services/logicManagement/lib/models/batchConfigurationCollection.js new file mode 100644 index 0000000000..016314a2a3 --- /dev/null +++ b/lib/services/logicManagement/lib/models/batchConfigurationCollection.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'; + +/** + * A collection of batch configurations. + */ +class BatchConfigurationCollection extends Array { + /** + * Create a BatchConfigurationCollection. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of BatchConfigurationCollection + * + * @returns {object} metadata of BatchConfigurationCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'BatchConfigurationCollection', + type: { + name: 'Composite', + className: 'BatchConfigurationCollection', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'BatchConfigurationElementType', + type: { + name: 'Composite', + className: 'BatchConfiguration' + } + } + } + } + } + } + }; + } +} + +module.exports = BatchConfigurationCollection; diff --git a/lib/services/logicManagement/lib/models/batchConfigurationProperties.js b/lib/services/logicManagement/lib/models/batchConfigurationProperties.js new file mode 100644 index 0000000000..293bf38ca1 --- /dev/null +++ b/lib/services/logicManagement/lib/models/batchConfigurationProperties.js @@ -0,0 +1,106 @@ +/* + * 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'); + +/** + * The batch configuration properties definition. + * + * @extends models['ArtifactProperties'] + */ +class BatchConfigurationProperties extends models['ArtifactProperties'] { + /** + * Create a BatchConfigurationProperties. + * @member {string} batchGroupName The name of the batch group. + * @member {object} releaseCriteria The batch release criteria. + * @member {number} [releaseCriteria.messageCount] The message count. + * @member {number} [releaseCriteria.batchSize] The batch size in bytes. + * @member {object} [releaseCriteria.recurrence] The recurrence. + * @member {string} [releaseCriteria.recurrence.frequency] The frequency. + * Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', + * 'Day', 'Week', 'Month', 'Year' + * @member {number} [releaseCriteria.recurrence.interval] The interval. + * @member {string} [releaseCriteria.recurrence.startTime] The start time. + * @member {string} [releaseCriteria.recurrence.endTime] The end time. + * @member {string} [releaseCriteria.recurrence.timeZone] The time zone. + * @member {object} [releaseCriteria.recurrence.schedule] The recurrence + * schedule. + * @member {array} [releaseCriteria.recurrence.schedule.minutes] The minutes. + * @member {array} [releaseCriteria.recurrence.schedule.hours] The hours. + * @member {array} [releaseCriteria.recurrence.schedule.weekDays] The days of + * the week. + * @member {array} [releaseCriteria.recurrence.schedule.monthDays] The month + * days. + * @member {array} [releaseCriteria.recurrence.schedule.monthlyOccurrences] + * The monthly occurrences. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of BatchConfigurationProperties + * + * @returns {object} metadata of BatchConfigurationProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'BatchConfigurationProperties', + type: { + name: 'Composite', + className: 'BatchConfigurationProperties', + modelProperties: { + createdTime: { + required: false, + serializedName: 'createdTime', + type: { + name: 'DateTime' + } + }, + changedTime: { + required: false, + serializedName: 'changedTime', + type: { + name: 'DateTime' + } + }, + metadata: { + required: false, + serializedName: 'metadata', + type: { + name: 'Object' + } + }, + batchGroupName: { + required: true, + serializedName: 'batchGroupName', + type: { + name: 'String' + } + }, + releaseCriteria: { + required: true, + serializedName: 'releaseCriteria', + type: { + name: 'Composite', + className: 'BatchReleaseCriteria' + } + } + } + } + }; + } +} + +module.exports = BatchConfigurationProperties; diff --git a/lib/services/logicManagement/lib/models/batchReleaseCriteria.js b/lib/services/logicManagement/lib/models/batchReleaseCriteria.js new file mode 100644 index 0000000000..eac77b3b46 --- /dev/null +++ b/lib/services/logicManagement/lib/models/batchReleaseCriteria.js @@ -0,0 +1,85 @@ +/* + * 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'); + +/** + * The batch release criteria. + * + */ +class BatchReleaseCriteria { + /** + * Create a BatchReleaseCriteria. + * @member {number} [messageCount] The message count. + * @member {number} [batchSize] The batch size in bytes. + * @member {object} [recurrence] The recurrence. + * @member {string} [recurrence.frequency] The frequency. Possible values + * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', + * 'Month', 'Year' + * @member {number} [recurrence.interval] The interval. + * @member {string} [recurrence.startTime] The start time. + * @member {string} [recurrence.endTime] The end time. + * @member {string} [recurrence.timeZone] The time zone. + * @member {object} [recurrence.schedule] The recurrence schedule. + * @member {array} [recurrence.schedule.minutes] The minutes. + * @member {array} [recurrence.schedule.hours] The hours. + * @member {array} [recurrence.schedule.weekDays] The days of the week. + * @member {array} [recurrence.schedule.monthDays] The month days. + * @member {array} [recurrence.schedule.monthlyOccurrences] The monthly + * occurrences. + */ + constructor() { + } + + /** + * Defines the metadata of BatchReleaseCriteria + * + * @returns {object} metadata of BatchReleaseCriteria + * + */ + mapper() { + return { + required: false, + serializedName: 'BatchReleaseCriteria', + type: { + name: 'Composite', + className: 'BatchReleaseCriteria', + modelProperties: { + messageCount: { + required: false, + serializedName: 'messageCount', + type: { + name: 'Number' + } + }, + batchSize: { + required: false, + serializedName: 'batchSize', + type: { + name: 'Number' + } + }, + recurrence: { + required: false, + serializedName: 'recurrence', + type: { + name: 'Composite', + className: 'WorkflowTriggerRecurrence' + } + } + } + } + }; + } +} + +module.exports = BatchReleaseCriteria; diff --git a/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js b/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js index daf0fbfe91..964455ae94 100644 --- a/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js +++ b/lib/services/logicManagement/lib/models/edifactDelimiterOverride.js @@ -19,7 +19,7 @@ class EdifactDelimiterOverride { * Create a EdifactDelimiterOverride. * @member {string} [messageId] The message id. * @member {string} [messageVersion] The message version. - * @member {string} [messageRelease] The message releaseversion. + * @member {string} [messageRelease] The message release. * @member {number} dataElementSeparator The data element separator. * @member {number} componentSeparator The component separator. * @member {number} segmentTerminator The segment terminator. diff --git a/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js b/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js index b97258af7c..008890156f 100644 --- a/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js +++ b/lib/services/logicManagement/lib/models/edifactEnvelopeOverride.js @@ -11,7 +11,7 @@ 'use strict'; /** - * The Edifact enevlope override settings. + * The Edifact envelope override settings. * */ class EdifactEnvelopeOverride { diff --git a/lib/services/logicManagement/lib/models/errorInfo.js b/lib/services/logicManagement/lib/models/errorInfo.js new file mode 100644 index 0000000000..441a6d7c45 --- /dev/null +++ b/lib/services/logicManagement/lib/models/errorInfo.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'; + +/** + * The error info. + * + */ +class ErrorInfo { + /** + * Create a ErrorInfo. + * @member {string} code The error code. + */ + constructor() { + } + + /** + * Defines the metadata of ErrorInfo + * + * @returns {object} metadata of ErrorInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'ErrorInfo', + type: { + name: 'Composite', + className: 'ErrorInfo', + modelProperties: { + code: { + required: true, + serializedName: 'code', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ErrorInfo; diff --git a/lib/services/logicManagement/lib/models/errorResponse.js b/lib/services/logicManagement/lib/models/errorResponse.js index 514f509a8e..2d2b9ddc30 100644 --- a/lib/services/logicManagement/lib/models/errorResponse.js +++ b/lib/services/logicManagement/lib/models/errorResponse.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * Error reponse indicates Logic service is not able to process the incoming + * Error response indicates Logic service is not able to process the incoming * request. The error property contains the error details. * */ diff --git a/lib/services/logicManagement/lib/models/expression.js b/lib/services/logicManagement/lib/models/expression.js new file mode 100644 index 0000000000..81c0178065 --- /dev/null +++ b/lib/services/logicManagement/lib/models/expression.js @@ -0,0 +1,88 @@ +/* + * 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'); + +/** + * Class representing a Expression. + */ +class Expression { + /** + * Create a Expression. + * @member {string} [text] + * @member {object} [value] + * @member {array} [subexpressions] + * @member {object} [error] + * @member {string} [error.message] The error message. + * @member {array} [error.details] The error details. + */ + constructor() { + } + + /** + * Defines the metadata of Expression + * + * @returns {object} metadata of Expression + * + */ + mapper() { + return { + required: false, + serializedName: 'Expression', + type: { + name: 'Composite', + className: 'Expression', + modelProperties: { + text: { + required: false, + serializedName: 'text', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'Object' + } + }, + subexpressions: { + required: false, + serializedName: 'subexpressions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressionElementType', + type: { + name: 'Composite', + className: 'Expression' + } + } + } + }, + error: { + required: false, + serializedName: 'error', + type: { + name: 'Composite', + className: 'AzureResourceErrorInfo' + } + } + } + } + }; + } +} + +module.exports = Expression; diff --git a/lib/services/logicManagement/lib/models/expressionRoot.js b/lib/services/logicManagement/lib/models/expressionRoot.js new file mode 100644 index 0000000000..6d24d0396b --- /dev/null +++ b/lib/services/logicManagement/lib/models/expressionRoot.js @@ -0,0 +1,92 @@ +/* + * 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'); + +/** + * Class representing a ExpressionRoot. + * @extends models['Expression'] + */ +class ExpressionRoot extends models['Expression'] { + /** + * Create a ExpressionRoot. + * @member {string} [path] The path. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExpressionRoot + * + * @returns {object} metadata of ExpressionRoot + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressionRoot', + type: { + name: 'Composite', + className: 'ExpressionRoot', + modelProperties: { + text: { + required: false, + serializedName: 'text', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'Object' + } + }, + subexpressions: { + required: false, + serializedName: 'subexpressions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressionElementType', + type: { + name: 'Composite', + className: 'Expression' + } + } + } + }, + error: { + required: false, + serializedName: 'error', + type: { + name: 'Composite', + className: 'AzureResourceErrorInfo' + } + }, + path: { + required: false, + serializedName: 'path', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressionRoot; diff --git a/lib/services/logicManagement/lib/models/expressionTraces.js b/lib/services/logicManagement/lib/models/expressionTraces.js new file mode 100644 index 0000000000..4159b8fcda --- /dev/null +++ b/lib/services/logicManagement/lib/models/expressionTraces.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'; + +/** + * Class representing a ExpressionTraces. + */ +class ExpressionTraces extends Array { + /** + * Create a ExpressionTraces. + * @member {array} [inputs] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExpressionTraces + * + * @returns {object} metadata of ExpressionTraces + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressionTraces', + type: { + name: 'Composite', + className: 'ExpressionTraces', + modelProperties: { + inputs: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressionRootElementType', + type: { + name: 'Composite', + className: 'ExpressionRoot' + } + } + } + } + } + } + }; + } +} + +module.exports = ExpressionTraces; diff --git a/lib/services/logicManagement/lib/models/index.d.ts b/lib/services/logicManagement/lib/models/index.d.ts index a6b7066bbb..f0b34d165f 100644 --- a/lib/services/logicManagement/lib/models/index.d.ts +++ b/lib/services/logicManagement/lib/models/index.d.ts @@ -201,7 +201,7 @@ export interface WorkflowVersion extends Resource { * @class * Initializes a new instance of the RecurrenceScheduleOccurrence class. * @constructor - * The recurrence schedule occurence. + * The recurrence schedule occurrence. * * @member {string} [day] The day of the week. Possible values include: * 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' @@ -241,8 +241,8 @@ export interface RecurrenceSchedule { * @member {string} [frequency] The frequency. Possible values include: * 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' * @member {number} [interval] The interval. - * @member {date} [startTime] The start time. - * @member {date} [endTime] The end time. + * @member {string} [startTime] The start time. + * @member {string} [endTime] The end time. * @member {string} [timeZone] The time zone. * @member {object} [schedule] The recurrence schedule. * @member {array} [schedule.minutes] The minutes. @@ -254,8 +254,8 @@ export interface RecurrenceSchedule { export interface WorkflowTriggerRecurrence { frequency?: string; interval?: number; - startTime?: Date; - endTime?: Date; + startTime?: string; + endTime?: string; timeZone?: string; schedule?: RecurrenceSchedule; } @@ -286,8 +286,8 @@ export interface WorkflowTriggerRecurrence { * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', * 'Year' * @member {number} [recurrence.interval] The interval. - * @member {date} [recurrence.startTime] The start time. - * @member {date} [recurrence.endTime] The end time. + * @member {string} [recurrence.startTime] The start time. + * @member {string} [recurrence.endTime] The end time. * @member {string} [recurrence.timeZone] The time zone. * @member {object} [recurrence.schedule] The recurrence schedule. * @member {array} [recurrence.schedule.minutes] The minutes. @@ -341,12 +341,14 @@ export interface WorkflowTriggerFilter { * @member {string} [sp] The SAS permissions. * @member {string} [sv] The SAS version. * @member {string} [sig] The SAS signature. + * @member {string} [se] The SAS timestamp. */ export interface WorkflowTriggerListCallbackUrlQueries { apiVersion?: string; sp?: string; sv?: string; sig?: string; + se?: string; } /** @@ -370,6 +372,7 @@ export interface WorkflowTriggerListCallbackUrlQueries { * @member {string} [queries.sp] The SAS permissions. * @member {string} [queries.sv] The SAS version. * @member {string} [queries.sig] The SAS signature. + * @member {string} [queries.se] The SAS timestamp. */ export interface WorkflowTriggerCallbackUrl { readonly value?: string; @@ -533,6 +536,7 @@ export interface WorkflowTriggerHistoryFilter { * @member {string} [outputsLink.contentHash.value] The value of the content * hash. * @member {object} [outputsLink.metadata] The metadata. + * @member {date} [scheduledTime] Gets the scheduled time. * @member {date} [startTime] Gets the start time. * @member {date} [endTime] Gets the end time. * @member {string} [trackingId] Gets the tracking id. @@ -552,6 +556,7 @@ export interface WorkflowRunTrigger { readonly inputsLink?: ContentLink; readonly outputs?: any; readonly outputsLink?: ContentLink; + readonly scheduledTime?: Date; readonly startTime?: Date; readonly endTime?: Date; readonly trackingId?: string; @@ -580,6 +585,7 @@ export interface WorkflowOutputParameter extends WorkflowParameter { * @constructor * The workflow run. * + * @member {date} [waitEndTime] Gets the wait end time. * @member {date} [startTime] Gets the start time. * @member {date} [endTime] Gets the end time. * @member {string} [status] Gets the status. Possible values include: @@ -619,6 +625,7 @@ export interface WorkflowOutputParameter extends WorkflowParameter { * @member {string} [trigger.outputsLink.contentHash.value] The value of the * content hash. * @member {object} [trigger.outputsLink.metadata] The metadata. + * @member {date} [trigger.scheduledTime] Gets the scheduled time. * @member {date} [trigger.startTime] Gets the start time. * @member {date} [trigger.endTime] Gets the end time. * @member {string} [trigger.trackingId] Gets the tracking id. @@ -657,6 +664,7 @@ export interface WorkflowOutputParameter extends WorkflowParameter { * @member {string} [response.outputsLink.contentHash.value] The value of the * content hash. * @member {object} [response.outputsLink.metadata] The metadata. + * @member {date} [response.scheduledTime] Gets the scheduled time. * @member {date} [response.startTime] Gets the start time. * @member {date} [response.endTime] Gets the end time. * @member {string} [response.trackingId] Gets the tracking id. @@ -674,6 +682,7 @@ export interface WorkflowOutputParameter extends WorkflowParameter { * @member {string} [type] Gets the workflow run type. */ export interface WorkflowRun extends SubResource { + readonly waitEndTime?: Date; readonly startTime?: Date; readonly endTime?: Date; readonly status?: string; @@ -724,7 +733,7 @@ export interface ErrorProperties { * @class * Initializes a new instance of the ErrorResponse class. * @constructor - * Error reponse indicates Logic service is not able to process the incoming + * Error response indicates Logic service is not able to process the incoming * request. The error property contains the error details. * * @member {object} [error] The error properties. @@ -1137,7 +1146,7 @@ export interface AS2MessageConnectionSettings { * @class * Initializes a new instance of the AS2AcknowledgementConnectionSettings class. * @constructor - * The AS2 agreement acknowledegment connection settings. + * The AS2 agreement acknowledgement connection settings. * * @member {boolean} ignoreCertificateNameMismatch The value indicating whether * to ignore mismatch in certificate name. @@ -1437,7 +1446,7 @@ export interface AS2ProtocolSettings { * @class * Initializes a new instance of the AS2OneWayAgreement class. * @constructor - * The integration account AS2 oneway agreement. + * The integration account AS2 one-way agreement. * * @member {object} senderBusinessIdentity The sender business identity * @member {string} [senderBusinessIdentity.qualifier] The business identity @@ -2503,7 +2512,7 @@ export interface X12ProtocolSettings { * @class * Initializes a new instance of the X12OneWayAgreement class. * @constructor - * The X12 oneway agreement. + * The X12 one-way agreement. * * @member {object} senderBusinessIdentity The sender business identity * @member {string} [senderBusinessIdentity.qualifier] The business identity @@ -3538,7 +3547,7 @@ export interface EdifactProcessingSettings { * @class * Initializes a new instance of the EdifactEnvelopeOverride class. * @constructor - * The Edifact enevlope override settings. + * The Edifact envelope override settings. * * @member {string} [messageId] The message id on which this envelope settings * has to be applied. @@ -3661,7 +3670,7 @@ export interface EdifactValidationOverride { * * @member {string} [messageId] The message id. * @member {string} [messageVersion] The message version. - * @member {string} [messageRelease] The message releaseversion. + * @member {string} [messageRelease] The message release. * @member {number} dataElementSeparator The data element separator. * @member {number} componentSeparator The component separator. * @member {number} segmentTerminator The segment terminator. @@ -7865,6 +7874,597 @@ export interface Operation { display?: OperationDisplay; } +/** + * @class + * Initializes a new instance of the KeyVaultReference class. + * @constructor + * The key vault reference. + * + */ +export interface KeyVaultReference extends ResourceReference { +} + +/** + * @class + * Initializes a new instance of the ListKeyVaultKeysDefinition class. + * @constructor + * The list key vault keys definition. + * + * @member {object} keyVault The key vault reference. + * @member {string} [skipToken] The skip token. + */ +export interface ListKeyVaultKeysDefinition { + keyVault: KeyVaultReference; + skipToken?: string; +} + +/** + * @class + * Initializes a new instance of the KeyVaultKeyAttributes class. + * @constructor + * The key attributes. + * + * @member {boolean} [enabled] Whether the key is enabled or not. + * @member {number} [created] When the key was created. + * @member {number} [updated] When the key was updated. + */ +export interface KeyVaultKeyAttributes { + enabled?: boolean; + created?: number; + updated?: number; +} + +/** + * @class + * Initializes a new instance of the KeyVaultKey class. + * @constructor + * The key vault key. + * + * @member {string} [kid] The key id. + * @member {object} [attributes] The key attributes. + * @member {boolean} [attributes.enabled] Whether the key is enabled or not. + * @member {number} [attributes.created] When the key was created. + * @member {number} [attributes.updated] When the key was updated. + */ +export interface KeyVaultKey { + kid?: string; + attributes?: KeyVaultKeyAttributes; +} + +/** + * @class + * Initializes a new instance of the TrackingEventErrorInfo class. + * @constructor + * @member {string} [message] + * @member {string} [code] + */ +export interface TrackingEventErrorInfo { + message?: string; + code?: string; +} + +/** + * @class + * Initializes a new instance of the TrackingEvent class. + * @constructor + * @member {string} eventLevel Possible values include: 'LogAlways', + * 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + * @member {date} eventTime + * @member {string} recordType Possible values include: 'NotSpecified', + * 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + * 'X12TransactionSet', 'X12InterchangeAcknowledgment', + * 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + * 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + * 'EdifactInterchangeAcknowledgment', 'EdifactFunctionalGroupAcknowledgment', + * 'EdifactTransactionSetAcknowledgment' + * @member {object} [error] + * @member {string} [error.message] + * @member {string} [error.code] + */ +export interface TrackingEvent { + eventLevel: string; + eventTime: Date; + recordType: string; + error?: TrackingEventErrorInfo; +} + +/** + * @class + * Initializes a new instance of the TrackingEventsDefinition class. + * @constructor + * @member {string} sourceType + * @member {string} [trackEventsOptions] Possible values include: 'None', + * 'DisableSourceInfoEnrich' + * @member {array} events + */ +export interface TrackingEventsDefinition { + sourceType: string; + trackEventsOptions?: string; + events: TrackingEvent[]; +} + +/** + * @class + * Initializes a new instance of the AccessKeyRegenerateActionDefinition class. + * @constructor + * @member {string} keyType Possible values include: 'NotSpecified', 'Primary', + * 'Secondary' + */ +export interface AccessKeyRegenerateActionDefinition { + keyType: string; +} + +/** + * @class + * Initializes a new instance of the SetTriggerStateActionDefinition class. + * @constructor + * @member {object} source + * @member {string} [source.provisioningState] Gets the provisioning state. + * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + * 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', + * 'Unregistering', 'Unregistered', 'Completed' + * @member {date} [source.createdTime] Gets the created time. + * @member {date} [source.changedTime] Gets the changed time. + * @member {string} [source.state] Gets the state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * @member {string} [source.status] Gets the status. Possible values include: + * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + * @member {date} [source.lastExecutionTime] Gets the last execution time. + * @member {date} [source.nextExecutionTime] Gets the next execution time. + * @member {object} [source.recurrence] Gets the workflow trigger recurrence. + * @member {string} [source.recurrence.frequency] The frequency. Possible + * values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', + * 'Month', 'Year' + * @member {number} [source.recurrence.interval] The interval. + * @member {string} [source.recurrence.startTime] The start time. + * @member {string} [source.recurrence.endTime] The end time. + * @member {string} [source.recurrence.timeZone] The time zone. + * @member {object} [source.recurrence.schedule] The recurrence schedule. + * @member {array} [source.recurrence.schedule.minutes] The minutes. + * @member {array} [source.recurrence.schedule.hours] The hours. + * @member {array} [source.recurrence.schedule.weekDays] The days of the week. + * @member {array} [source.recurrence.schedule.monthDays] The month days. + * @member {array} [source.recurrence.schedule.monthlyOccurrences] The monthly + * occurrences. + * @member {object} [source.workflow] Gets the reference to workflow. + * @member {string} [source.workflow.id] The resource id. + * @member {string} [source.workflow.name] Gets the resource name. + * @member {string} [source.workflow.type] Gets the resource type. + * @member {string} [source.name] Gets the workflow trigger name. + * @member {string} [source.type] Gets the workflow trigger type. + */ +export interface SetTriggerStateActionDefinition { + source: WorkflowTrigger; +} + +/** + * @class + * Initializes a new instance of the Expression class. + * @constructor + * @member {string} [text] + * @member {object} [value] + * @member {array} [subexpressions] + * @member {object} [error] + * @member {string} [error.message] The error message. + * @member {array} [error.details] The error details. + */ +export interface Expression { + text?: string; + value?: any; + subexpressions?: Expression[]; + error?: AzureResourceErrorInfo; +} + +/** + * @class + * Initializes a new instance of the ExpressionRoot class. + * @constructor + * @member {string} [path] The path. + */ +export interface ExpressionRoot extends Expression { + path?: string; +} + +/** + * @class + * Initializes a new instance of the ErrorInfo class. + * @constructor + * The error info. + * + * @member {string} code The error code. + */ +export interface ErrorInfo { + code: string; +} + +/** + * @class + * Initializes a new instance of the AzureResourceErrorInfo class. + * @constructor + * The azure resource error info. + * + * @member {string} message The error message. + * @member {array} [details] The error details. + */ +export interface AzureResourceErrorInfo extends ErrorInfo { + message: string; + details?: AzureResourceErrorInfo[]; +} + +/** + * @class + * Initializes a new instance of the RepetitionIndex class. + * @constructor + * The workflow run action repetition index. + * + * @member {string} [scopeName] The scope. + * @member {number} itemIndex The index. + */ +export interface RepetitionIndex { + scopeName?: string; + itemIndex: number; +} + +/** + * @class + * Initializes a new instance of the WorkflowRunActionRepetitionDefinition class. + * @constructor + * The workflow run action repetition definition. + * + * @member {date} [startTime] The start time of the workflow scope repetition. + * @member {date} [endTime] The end time of the workflow scope repetition. + * @member {object} [correlation] The correlation properties. + * @member {string} [correlation.actionTrackingId] The action tracking + * identifier. + * @member {string} [status] The status of the workflow scope repetition. + * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + * 'TimedOut', 'Aborted', 'Ignored' + * @member {string} [code] The workflow scope repetition code. + * @member {object} [error] + * @member {string} [trackingId] Gets the tracking id. + * @member {object} [inputs] Gets the inputs. + * @member {object} [inputsLink] Gets the link to inputs. + * @member {string} [inputsLink.uri] The content link URI. + * @member {string} [inputsLink.contentVersion] The content version. + * @member {number} [inputsLink.contentSize] The content size. + * @member {object} [inputsLink.contentHash] The content hash. + * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [inputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [inputsLink.metadata] The metadata. + * @member {object} [outputs] Gets the outputs. + * @member {object} [outputsLink] Gets the link to outputs. + * @member {string} [outputsLink.uri] The content link URI. + * @member {string} [outputsLink.contentVersion] The content version. + * @member {number} [outputsLink.contentSize] The content size. + * @member {object} [outputsLink.contentHash] The content hash. + * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [outputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [outputsLink.metadata] The metadata. + * @member {object} [trackedProperties] Gets the tracked properties. + * @member {array} [retryHistory] Gets the retry histories. + * @member {number} [iterationCount] + * @member {array} [repetitionIndexes] The repetition indexes. + */ +export interface WorkflowRunActionRepetitionDefinition extends Resource { + startTime?: Date; + endTime?: Date; + correlation?: RunActionCorrelation; + status?: string; + code?: string; + error?: any; + readonly trackingId?: string; + readonly inputs?: any; + readonly inputsLink?: ContentLink; + readonly outputs?: any; + readonly outputsLink?: ContentLink; + readonly trackedProperties?: any; + retryHistory?: RetryHistory[]; + iterationCount?: number; + repetitionIndexes?: RepetitionIndex[]; +} + +/** + * @class + * Initializes a new instance of the OperationResultProperties class. + * @constructor + * The run operation result properties. + * + * @member {date} [startTime] The start time of the workflow scope repetition. + * @member {date} [endTime] The end time of the workflow scope repetition. + * @member {object} [correlation] The correlation properties. + * @member {string} [correlation.actionTrackingId] The action tracking + * identifier. + * @member {string} [status] The status of the workflow scope repetition. + * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + * 'TimedOut', 'Aborted', 'Ignored' + * @member {string} [code] The workflow scope repetition code. + * @member {object} [error] + */ +export interface OperationResultProperties { + startTime?: Date; + endTime?: Date; + correlation?: RunActionCorrelation; + status?: string; + code?: string; + error?: any; +} + +/** + * @class + * Initializes a new instance of the OperationResult class. + * @constructor + * The operation result definition. + * + * @member {string} [trackingId] Gets the tracking id. + * @member {object} [inputs] Gets the inputs. + * @member {object} [inputsLink] Gets the link to inputs. + * @member {string} [inputsLink.uri] The content link URI. + * @member {string} [inputsLink.contentVersion] The content version. + * @member {number} [inputsLink.contentSize] The content size. + * @member {object} [inputsLink.contentHash] The content hash. + * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [inputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [inputsLink.metadata] The metadata. + * @member {object} [outputs] Gets the outputs. + * @member {object} [outputsLink] Gets the link to outputs. + * @member {string} [outputsLink.uri] The content link URI. + * @member {string} [outputsLink.contentVersion] The content version. + * @member {number} [outputsLink.contentSize] The content size. + * @member {object} [outputsLink.contentHash] The content hash. + * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [outputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [outputsLink.metadata] The metadata. + * @member {object} [trackedProperties] Gets the tracked properties. + * @member {array} [retryHistory] Gets the retry histories. + * @member {number} [iterationCount] + */ +export interface OperationResult extends OperationResultProperties { + readonly trackingId?: string; + readonly inputs?: any; + readonly inputsLink?: ContentLink; + readonly outputs?: any; + readonly outputsLink?: ContentLink; + readonly trackedProperties?: any; + retryHistory?: RetryHistory[]; + iterationCount?: number; +} + +/** + * @class + * Initializes a new instance of the RunCorrelation class. + * @constructor + * The correlation properties. + * + * @member {string} [clientTrackingId] The client tracking identifier. + * @member {array} [clientKeywords] The client keywords. + */ +export interface RunCorrelation { + clientTrackingId?: string; + clientKeywords?: string[]; +} + +/** + * @class + * Initializes a new instance of the RunActionCorrelation class. + * @constructor + * The workflow run action correlation properties. + * + * @member {string} [actionTrackingId] The action tracking identifier. + */ +export interface RunActionCorrelation extends RunCorrelation { + actionTrackingId?: string; +} + +/** + * @class + * Initializes a new instance of the JsonSchema class. + * @constructor + * The JSON schema. + * + * @member {string} [title] The JSON title. + * @member {string} [content] The JSON content. + */ +export interface JsonSchema { + title?: string; + content?: string; +} + +/** + * @class + * Initializes a new instance of the ArtifactProperties class. + * @constructor + * The artifact properties definition. + * + * @member {date} [createdTime] The artifact creation time. + * @member {date} [changedTime] The artifact changed time. + * @member {object} [metadata] + */ +export interface ArtifactProperties { + createdTime?: Date; + changedTime?: Date; + metadata?: any; +} + +/** + * @class + * Initializes a new instance of the ArtifactContentPropertiesDefinition class. + * @constructor + * The artifact content properties definition. + * + * @member {object} [content] + * @member {string} [contentType] The content type. + * @member {object} [contentLink] The content link. + * @member {string} [contentLink.uri] The content link URI. + * @member {string} [contentLink.contentVersion] The content version. + * @member {number} [contentLink.contentSize] The content size. + * @member {object} [contentLink.contentHash] The content hash. + * @member {string} [contentLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [contentLink.contentHash.value] The value of the content + * hash. + * @member {object} [contentLink.metadata] The metadata. + */ +export interface ArtifactContentPropertiesDefinition extends ArtifactProperties { + content?: any; + contentType?: string; + contentLink?: ContentLink; +} + +/** + * @class + * Initializes a new instance of the AssemblyProperties class. + * @constructor + * The assembly properties definition. + * + * @member {string} assemblyName The assembly name. + * @member {string} [assemblyVersion] The assembly version. + * @member {string} [assemblyCulture] The assembly culture. + * @member {string} [assemblyPublicKeyToken] The assembly public key token. + */ +export interface AssemblyProperties extends ArtifactContentPropertiesDefinition { + assemblyName: string; + assemblyVersion?: string; + assemblyCulture?: string; + assemblyPublicKeyToken?: string; +} + +/** + * @class + * Initializes a new instance of the AssemblyDefinition class. + * @constructor + * The assembly definition. + * + * @member {object} properties The assembly properties. + * @member {string} [properties.assemblyName] The assembly name. + * @member {string} [properties.assemblyVersion] The assembly version. + * @member {string} [properties.assemblyCulture] The assembly culture. + * @member {string} [properties.assemblyPublicKeyToken] The assembly public key + * token. + */ +export interface AssemblyDefinition extends Resource { + properties: AssemblyProperties; +} + +/** + * @class + * Initializes a new instance of the BatchReleaseCriteria class. + * @constructor + * The batch release criteria. + * + * @member {number} [messageCount] The message count. + * @member {number} [batchSize] The batch size in bytes. + * @member {object} [recurrence] The recurrence. + * @member {string} [recurrence.frequency] The frequency. Possible values + * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', + * 'Year' + * @member {number} [recurrence.interval] The interval. + * @member {string} [recurrence.startTime] The start time. + * @member {string} [recurrence.endTime] The end time. + * @member {string} [recurrence.timeZone] The time zone. + * @member {object} [recurrence.schedule] The recurrence schedule. + * @member {array} [recurrence.schedule.minutes] The minutes. + * @member {array} [recurrence.schedule.hours] The hours. + * @member {array} [recurrence.schedule.weekDays] The days of the week. + * @member {array} [recurrence.schedule.monthDays] The month days. + * @member {array} [recurrence.schedule.monthlyOccurrences] The monthly + * occurrences. + */ +export interface BatchReleaseCriteria { + messageCount?: number; + batchSize?: number; + recurrence?: WorkflowTriggerRecurrence; +} + +/** + * @class + * Initializes a new instance of the BatchConfigurationProperties class. + * @constructor + * The batch configuration properties definition. + * + * @member {string} batchGroupName The name of the batch group. + * @member {object} releaseCriteria The batch release criteria. + * @member {number} [releaseCriteria.messageCount] The message count. + * @member {number} [releaseCriteria.batchSize] The batch size in bytes. + * @member {object} [releaseCriteria.recurrence] The recurrence. + * @member {string} [releaseCriteria.recurrence.frequency] The frequency. + * Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', + * 'Week', 'Month', 'Year' + * @member {number} [releaseCriteria.recurrence.interval] The interval. + * @member {string} [releaseCriteria.recurrence.startTime] The start time. + * @member {string} [releaseCriteria.recurrence.endTime] The end time. + * @member {string} [releaseCriteria.recurrence.timeZone] The time zone. + * @member {object} [releaseCriteria.recurrence.schedule] The recurrence + * schedule. + * @member {array} [releaseCriteria.recurrence.schedule.minutes] The minutes. + * @member {array} [releaseCriteria.recurrence.schedule.hours] The hours. + * @member {array} [releaseCriteria.recurrence.schedule.weekDays] The days of + * the week. + * @member {array} [releaseCriteria.recurrence.schedule.monthDays] The month + * days. + * @member {array} [releaseCriteria.recurrence.schedule.monthlyOccurrences] The + * monthly occurrences. + */ +export interface BatchConfigurationProperties extends ArtifactProperties { + batchGroupName: string; + releaseCriteria: BatchReleaseCriteria; +} + +/** + * @class + * Initializes a new instance of the BatchConfiguration class. + * @constructor + * The batch configuration resource definition. + * + * @member {object} properties The batch configuration properties. + * @member {string} [properties.batchGroupName] The name of the batch group. + * @member {object} [properties.releaseCriteria] The batch release criteria. + * @member {number} [properties.releaseCriteria.messageCount] The message + * count. + * @member {number} [properties.releaseCriteria.batchSize] The batch size in + * bytes. + * @member {object} [properties.releaseCriteria.recurrence] The recurrence. + * @member {string} [properties.releaseCriteria.recurrence.frequency] The + * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', + * 'Hour', 'Day', 'Week', 'Month', 'Year' + * @member {number} [properties.releaseCriteria.recurrence.interval] The + * interval. + * @member {string} [properties.releaseCriteria.recurrence.startTime] The start + * time. + * @member {string} [properties.releaseCriteria.recurrence.endTime] The end + * time. + * @member {string} [properties.releaseCriteria.recurrence.timeZone] The time + * zone. + * @member {object} [properties.releaseCriteria.recurrence.schedule] The + * recurrence schedule. + * @member {array} [properties.releaseCriteria.recurrence.schedule.minutes] The + * minutes. + * @member {array} [properties.releaseCriteria.recurrence.schedule.hours] The + * hours. + * @member {array} [properties.releaseCriteria.recurrence.schedule.weekDays] + * The days of the week. + * @member {array} [properties.releaseCriteria.recurrence.schedule.monthDays] + * The month days. + * @member {array} + * [properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] The + * monthly occurrences. + */ +export interface BatchConfiguration extends Resource { + properties: BatchConfigurationProperties; +} + /** * @class @@ -7938,6 +8538,25 @@ export interface WorkflowRunActionListResult extends Array { nextLink?: string; } +/** + * @class + * Initializes a new instance of the ExpressionTraces class. + * @constructor + * @member {array} [inputs] + */ +export interface ExpressionTraces extends Array { +} + +/** + * @class + * Initializes a new instance of the WorkflowRunActionRepetitionDefinitionCollection class. + * @constructor + * A collection of workflow run action repetitions. + * + */ +export interface WorkflowRunActionRepetitionDefinitionCollection extends Array { +} + /** * @class * Initializes a new instance of the IntegrationAccountListResult class. @@ -7950,6 +8569,37 @@ export interface IntegrationAccountListResult extends Array nextLink?: string; } +/** + * @class + * Initializes a new instance of the KeyVaultKeyCollection class. + * @constructor + * Collection of key vault keys. + * + * @member {string} [skipToken] The skip token. + */ +export interface KeyVaultKeyCollection extends Array { +} + +/** + * @class + * Initializes a new instance of the AssemblyCollection class. + * @constructor + * A collection of assembly definitions. + * + */ +export interface AssemblyCollection extends Array { +} + +/** + * @class + * Initializes a new instance of the BatchConfigurationCollection class. + * @constructor + * A collection of batch configurations. + * + */ +export interface BatchConfigurationCollection extends Array { +} + /** * @class * Initializes a new instance of the IntegrationAccountSchemaListResult class. diff --git a/lib/services/logicManagement/lib/models/index.js b/lib/services/logicManagement/lib/models/index.js index a72f3dc5d6..3f8db40b00 100644 --- a/lib/services/logicManagement/lib/models/index.js +++ b/lib/services/logicManagement/lib/models/index.js @@ -112,13 +112,45 @@ exports.IntegrationAccountSessionFilter = require('./integrationAccountSessionFi exports.IntegrationAccountSession = require('./integrationAccountSession'); exports.OperationDisplay = require('./operationDisplay'); exports.Operation = require('./operation'); +exports.KeyVaultReference = require('./keyVaultReference'); +exports.ListKeyVaultKeysDefinition = require('./listKeyVaultKeysDefinition'); +exports.KeyVaultKeyAttributes = require('./keyVaultKeyAttributes'); +exports.KeyVaultKey = require('./keyVaultKey'); +exports.TrackingEventErrorInfo = require('./trackingEventErrorInfo'); +exports.TrackingEvent = require('./trackingEvent'); +exports.TrackingEventsDefinition = require('./trackingEventsDefinition'); +exports.AccessKeyRegenerateActionDefinition = require('./accessKeyRegenerateActionDefinition'); +exports.SetTriggerStateActionDefinition = require('./setTriggerStateActionDefinition'); +exports.Expression = require('./expression'); +exports.ExpressionRoot = require('./expressionRoot'); +exports.ErrorInfo = require('./errorInfo'); +exports.AzureResourceErrorInfo = require('./azureResourceErrorInfo'); +exports.RepetitionIndex = require('./repetitionIndex'); +exports.WorkflowRunActionRepetitionDefinition = require('./workflowRunActionRepetitionDefinition'); +exports.OperationResultProperties = require('./operationResultProperties'); +exports.OperationResult = require('./operationResult'); +exports.RunCorrelation = require('./runCorrelation'); +exports.RunActionCorrelation = require('./runActionCorrelation'); +exports.JsonSchema = require('./jsonSchema'); +exports.ArtifactProperties = require('./artifactProperties'); +exports.ArtifactContentPropertiesDefinition = require('./artifactContentPropertiesDefinition'); +exports.AssemblyProperties = require('./assemblyProperties'); +exports.AssemblyDefinition = require('./assemblyDefinition'); +exports.BatchReleaseCriteria = require('./batchReleaseCriteria'); +exports.BatchConfigurationProperties = require('./batchConfigurationProperties'); +exports.BatchConfiguration = require('./batchConfiguration'); exports.WorkflowListResult = require('./workflowListResult'); exports.WorkflowVersionListResult = require('./workflowVersionListResult'); exports.WorkflowTriggerListResult = require('./workflowTriggerListResult'); exports.WorkflowTriggerHistoryListResult = require('./workflowTriggerHistoryListResult'); exports.WorkflowRunListResult = require('./workflowRunListResult'); exports.WorkflowRunActionListResult = require('./workflowRunActionListResult'); +exports.ExpressionTraces = require('./expressionTraces'); +exports.WorkflowRunActionRepetitionDefinitionCollection = require('./workflowRunActionRepetitionDefinitionCollection'); exports.IntegrationAccountListResult = require('./integrationAccountListResult'); +exports.KeyVaultKeyCollection = require('./keyVaultKeyCollection'); +exports.AssemblyCollection = require('./assemblyCollection'); +exports.BatchConfigurationCollection = require('./batchConfigurationCollection'); exports.IntegrationAccountSchemaListResult = require('./integrationAccountSchemaListResult'); exports.IntegrationAccountMapListResult = require('./integrationAccountMapListResult'); exports.IntegrationAccountPartnerListResult = require('./integrationAccountPartnerListResult'); diff --git a/lib/services/logicManagement/lib/models/jsonSchema.js b/lib/services/logicManagement/lib/models/jsonSchema.js new file mode 100644 index 0000000000..e74da1917c --- /dev/null +++ b/lib/services/logicManagement/lib/models/jsonSchema.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'; + +/** + * The JSON schema. + * + */ +class JsonSchema { + /** + * Create a JsonSchema. + * @member {string} [title] The JSON title. + * @member {string} [content] The JSON content. + */ + constructor() { + } + + /** + * Defines the metadata of JsonSchema + * + * @returns {object} metadata of JsonSchema + * + */ + mapper() { + return { + required: false, + serializedName: 'JsonSchema', + type: { + name: 'Composite', + className: 'JsonSchema', + modelProperties: { + title: { + required: false, + serializedName: 'title', + type: { + name: 'String' + } + }, + content: { + required: false, + serializedName: 'content', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = JsonSchema; diff --git a/lib/services/logicManagement/lib/models/keyVaultKey.js b/lib/services/logicManagement/lib/models/keyVaultKey.js new file mode 100644 index 0000000000..b1ae467199 --- /dev/null +++ b/lib/services/logicManagement/lib/models/keyVaultKey.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'; + +const models = require('./index'); + +/** + * The key vault key. + * + */ +class KeyVaultKey { + /** + * Create a KeyVaultKey. + * @member {string} [kid] The key id. + * @member {object} [attributes] The key attributes. + * @member {boolean} [attributes.enabled] Whether the key is enabled or not. + * @member {number} [attributes.created] When the key was created. + * @member {number} [attributes.updated] When the key was updated. + */ + constructor() { + } + + /** + * Defines the metadata of KeyVaultKey + * + * @returns {object} metadata of KeyVaultKey + * + */ + mapper() { + return { + required: false, + serializedName: 'KeyVaultKey', + type: { + name: 'Composite', + className: 'KeyVaultKey', + modelProperties: { + kid: { + required: false, + serializedName: 'kid', + type: { + name: 'String' + } + }, + attributes: { + required: false, + serializedName: 'attributes', + type: { + name: 'Composite', + className: 'KeyVaultKeyAttributes' + } + } + } + } + }; + } +} + +module.exports = KeyVaultKey; diff --git a/lib/services/logicManagement/lib/models/keyVaultKeyAttributes.js b/lib/services/logicManagement/lib/models/keyVaultKeyAttributes.js new file mode 100644 index 0000000000..275e76a65d --- /dev/null +++ b/lib/services/logicManagement/lib/models/keyVaultKeyAttributes.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'; + +/** + * The key attributes. + * + */ +class KeyVaultKeyAttributes { + /** + * Create a KeyVaultKeyAttributes. + * @member {boolean} [enabled] Whether the key is enabled or not. + * @member {number} [created] When the key was created. + * @member {number} [updated] When the key was updated. + */ + constructor() { + } + + /** + * Defines the metadata of KeyVaultKeyAttributes + * + * @returns {object} metadata of KeyVaultKeyAttributes + * + */ + mapper() { + return { + required: false, + serializedName: 'KeyVaultKey_attributes', + type: { + name: 'Composite', + className: 'KeyVaultKeyAttributes', + modelProperties: { + enabled: { + required: false, + serializedName: 'enabled', + type: { + name: 'Boolean' + } + }, + created: { + required: false, + serializedName: 'created', + type: { + name: 'Number' + } + }, + updated: { + required: false, + serializedName: 'updated', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = KeyVaultKeyAttributes; diff --git a/lib/services/logicManagement/lib/models/keyVaultKeyCollection.js b/lib/services/logicManagement/lib/models/keyVaultKeyCollection.js new file mode 100644 index 0000000000..25897f7d35 --- /dev/null +++ b/lib/services/logicManagement/lib/models/keyVaultKeyCollection.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'; + +/** + * Collection of key vault keys. + */ +class KeyVaultKeyCollection extends Array { + /** + * Create a KeyVaultKeyCollection. + * @member {string} [skipToken] The skip token. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of KeyVaultKeyCollection + * + * @returns {object} metadata of KeyVaultKeyCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'KeyVaultKeyCollection', + type: { + name: 'Composite', + className: 'KeyVaultKeyCollection', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'KeyVaultKeyElementType', + type: { + name: 'Composite', + className: 'KeyVaultKey' + } + } + } + }, + skipToken: { + required: false, + serializedName: 'skipToken', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = KeyVaultKeyCollection; diff --git a/lib/services/logicManagement/lib/models/keyVaultReference.js b/lib/services/logicManagement/lib/models/keyVaultReference.js new file mode 100644 index 0000000000..cbcef6218c --- /dev/null +++ b/lib/services/logicManagement/lib/models/keyVaultReference.js @@ -0,0 +1,72 @@ +/* + * 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'); + +/** + * The key vault reference. + * + * @extends models['ResourceReference'] + */ +class KeyVaultReference extends models['ResourceReference'] { + /** + * Create a KeyVaultReference. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of KeyVaultReference + * + * @returns {object} metadata of KeyVaultReference + * + */ + mapper() { + return { + required: false, + serializedName: 'KeyVaultReference', + type: { + name: 'Composite', + className: 'KeyVaultReference', + 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' + } + } + } + } + }; + } +} + +module.exports = KeyVaultReference; diff --git a/lib/services/logicManagement/lib/models/listKeyVaultKeysDefinition.js b/lib/services/logicManagement/lib/models/listKeyVaultKeysDefinition.js new file mode 100644 index 0000000000..bc8934f2c6 --- /dev/null +++ b/lib/services/logicManagement/lib/models/listKeyVaultKeysDefinition.js @@ -0,0 +1,63 @@ +/* + * 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'); + +/** + * The list key vault keys definition. + * + */ +class ListKeyVaultKeysDefinition { + /** + * Create a ListKeyVaultKeysDefinition. + * @member {object} keyVault The key vault reference. + * @member {string} [skipToken] The skip token. + */ + constructor() { + } + + /** + * Defines the metadata of ListKeyVaultKeysDefinition + * + * @returns {object} metadata of ListKeyVaultKeysDefinition + * + */ + mapper() { + return { + required: false, + serializedName: 'ListKeyVaultKeysDefinition', + type: { + name: 'Composite', + className: 'ListKeyVaultKeysDefinition', + modelProperties: { + keyVault: { + required: true, + serializedName: 'keyVault', + type: { + name: 'Composite', + className: 'KeyVaultReference' + } + }, + skipToken: { + required: false, + serializedName: 'skipToken', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ListKeyVaultKeysDefinition; diff --git a/lib/services/logicManagement/lib/models/operationResult.js b/lib/services/logicManagement/lib/models/operationResult.js new file mode 100644 index 0000000000..ea03af1e60 --- /dev/null +++ b/lib/services/logicManagement/lib/models/operationResult.js @@ -0,0 +1,190 @@ +/* + * 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'); + +/** + * The operation result definition. + * + * @extends models['OperationResultProperties'] + */ +class OperationResult extends models['OperationResultProperties'] { + /** + * Create a OperationResult. + * @member {string} [trackingId] Gets the tracking id. + * @member {object} [inputs] Gets the inputs. + * @member {object} [inputsLink] Gets the link to inputs. + * @member {string} [inputsLink.uri] The content link URI. + * @member {string} [inputsLink.contentVersion] The content version. + * @member {number} [inputsLink.contentSize] The content size. + * @member {object} [inputsLink.contentHash] The content hash. + * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [inputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [inputsLink.metadata] The metadata. + * @member {object} [outputs] Gets the outputs. + * @member {object} [outputsLink] Gets the link to outputs. + * @member {string} [outputsLink.uri] The content link URI. + * @member {string} [outputsLink.contentVersion] The content version. + * @member {number} [outputsLink.contentSize] The content size. + * @member {object} [outputsLink.contentHash] The content hash. + * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [outputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [outputsLink.metadata] The metadata. + * @member {object} [trackedProperties] Gets the tracked properties. + * @member {array} [retryHistory] Gets the retry histories. + * @member {number} [iterationCount] + */ + constructor() { + super(); + } + + /** + * Defines the metadata of OperationResult + * + * @returns {object} metadata of OperationResult + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationResult', + type: { + name: 'Composite', + className: 'OperationResult', + modelProperties: { + startTime: { + required: false, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + }, + correlation: { + required: false, + serializedName: 'correlation', + type: { + name: 'Composite', + className: 'RunActionCorrelation' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'Enum', + allowedValues: [ 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' ] + } + }, + code: { + required: false, + serializedName: 'code', + type: { + name: 'String' + } + }, + error: { + required: false, + serializedName: 'error', + type: { + name: 'Object' + } + }, + trackingId: { + required: false, + readOnly: true, + serializedName: 'trackingId', + type: { + name: 'String' + } + }, + inputs: { + required: false, + readOnly: true, + serializedName: 'inputs', + type: { + name: 'Object' + } + }, + inputsLink: { + required: false, + readOnly: true, + serializedName: 'inputsLink', + type: { + name: 'Composite', + className: 'ContentLink' + } + }, + outputs: { + required: false, + readOnly: true, + serializedName: 'outputs', + type: { + name: 'Object' + } + }, + outputsLink: { + required: false, + readOnly: true, + serializedName: 'outputsLink', + type: { + name: 'Composite', + className: 'ContentLink' + } + }, + trackedProperties: { + required: false, + readOnly: true, + serializedName: 'trackedProperties', + type: { + name: 'Object' + } + }, + retryHistory: { + required: false, + serializedName: 'retryHistory', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RetryHistoryElementType', + type: { + name: 'Composite', + className: 'RetryHistory' + } + } + } + }, + iterationCount: { + required: false, + serializedName: 'iterationCount', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = OperationResult; diff --git a/lib/services/logicManagement/lib/models/operationResultProperties.js b/lib/services/logicManagement/lib/models/operationResultProperties.js new file mode 100644 index 0000000000..c9938e3c20 --- /dev/null +++ b/lib/services/logicManagement/lib/models/operationResultProperties.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'); + +/** + * The run operation result properties. + * + */ +class OperationResultProperties { + /** + * Create a OperationResultProperties. + * @member {date} [startTime] The start time of the workflow scope + * repetition. + * @member {date} [endTime] The end time of the workflow scope repetition. + * @member {object} [correlation] The correlation properties. + * @member {string} [correlation.actionTrackingId] The action tracking + * identifier. + * @member {string} [status] The status of the workflow scope repetition. + * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + * 'TimedOut', 'Aborted', 'Ignored' + * @member {string} [code] The workflow scope repetition code. + * @member {object} [error] + */ + constructor() { + } + + /** + * Defines the metadata of OperationResultProperties + * + * @returns {object} metadata of OperationResultProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationResultProperties', + type: { + name: 'Composite', + className: 'OperationResultProperties', + modelProperties: { + startTime: { + required: false, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + }, + correlation: { + required: false, + serializedName: 'correlation', + type: { + name: 'Composite', + className: 'RunActionCorrelation' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'Enum', + allowedValues: [ 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' ] + } + }, + code: { + required: false, + serializedName: 'code', + type: { + name: 'String' + } + }, + error: { + required: false, + serializedName: 'error', + type: { + name: 'Object' + } + } + } + } + }; + } +} + +module.exports = OperationResultProperties; diff --git a/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js b/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js index f1d15b7d08..7f5c6c4d67 100644 --- a/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js +++ b/lib/services/logicManagement/lib/models/recurrenceScheduleOccurrence.js @@ -11,7 +11,7 @@ 'use strict'; /** - * The recurrence schedule occurence. + * The recurrence schedule occurrence. * */ class RecurrenceScheduleOccurrence { diff --git a/lib/services/logicManagement/lib/models/repetitionIndex.js b/lib/services/logicManagement/lib/models/repetitionIndex.js new file mode 100644 index 0000000000..0d48977b20 --- /dev/null +++ b/lib/services/logicManagement/lib/models/repetitionIndex.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'; + +/** + * The workflow run action repetition index. + * + */ +class RepetitionIndex { + /** + * Create a RepetitionIndex. + * @member {string} [scopeName] The scope. + * @member {number} itemIndex The index. + */ + constructor() { + } + + /** + * Defines the metadata of RepetitionIndex + * + * @returns {object} metadata of RepetitionIndex + * + */ + mapper() { + return { + required: false, + serializedName: 'RepetitionIndex', + type: { + name: 'Composite', + className: 'RepetitionIndex', + modelProperties: { + scopeName: { + required: false, + serializedName: 'scopeName', + type: { + name: 'String' + } + }, + itemIndex: { + required: true, + serializedName: 'itemIndex', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = RepetitionIndex; diff --git a/lib/services/logicManagement/lib/models/runActionCorrelation.js b/lib/services/logicManagement/lib/models/runActionCorrelation.js new file mode 100644 index 0000000000..b69c875cf2 --- /dev/null +++ b/lib/services/logicManagement/lib/models/runActionCorrelation.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'; + +const models = require('./index'); + +/** + * The workflow run action correlation properties. + * + * @extends models['RunCorrelation'] + */ +class RunActionCorrelation extends models['RunCorrelation'] { + /** + * Create a RunActionCorrelation. + * @member {string} [actionTrackingId] The action tracking identifier. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of RunActionCorrelation + * + * @returns {object} metadata of RunActionCorrelation + * + */ + mapper() { + return { + required: false, + serializedName: 'RunActionCorrelation', + type: { + name: 'Composite', + className: 'RunActionCorrelation', + modelProperties: { + clientTrackingId: { + required: false, + serializedName: 'clientTrackingId', + type: { + name: 'String' + } + }, + clientKeywords: { + required: false, + serializedName: 'clientKeywords', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + actionTrackingId: { + required: false, + serializedName: 'actionTrackingId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RunActionCorrelation; diff --git a/lib/services/logicManagement/lib/models/runCorrelation.js b/lib/services/logicManagement/lib/models/runCorrelation.js new file mode 100644 index 0000000000..f951a36ffc --- /dev/null +++ b/lib/services/logicManagement/lib/models/runCorrelation.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'; + +/** + * The correlation properties. + * + */ +class RunCorrelation { + /** + * Create a RunCorrelation. + * @member {string} [clientTrackingId] The client tracking identifier. + * @member {array} [clientKeywords] The client keywords. + */ + constructor() { + } + + /** + * Defines the metadata of RunCorrelation + * + * @returns {object} metadata of RunCorrelation + * + */ + mapper() { + return { + required: false, + serializedName: 'RunCorrelation', + type: { + name: 'Composite', + className: 'RunCorrelation', + modelProperties: { + clientTrackingId: { + required: false, + serializedName: 'clientTrackingId', + type: { + name: 'String' + } + }, + clientKeywords: { + required: false, + serializedName: 'clientKeywords', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = RunCorrelation; diff --git a/lib/services/logicManagement/lib/models/setTriggerStateActionDefinition.js b/lib/services/logicManagement/lib/models/setTriggerStateActionDefinition.js new file mode 100644 index 0000000000..48edead9f0 --- /dev/null +++ b/lib/services/logicManagement/lib/models/setTriggerStateActionDefinition.js @@ -0,0 +1,91 @@ +/* + * 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'); + +/** + * Class representing a SetTriggerStateActionDefinition. + */ +class SetTriggerStateActionDefinition { + /** + * Create a SetTriggerStateActionDefinition. + * @member {object} source + * @member {string} [source.provisioningState] Gets the provisioning state. + * Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + * 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', + * 'Unregistering', 'Unregistered', 'Completed' + * @member {date} [source.createdTime] Gets the created time. + * @member {date} [source.changedTime] Gets the changed time. + * @member {string} [source.state] Gets the state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * @member {string} [source.status] Gets the status. Possible values include: + * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + * @member {date} [source.lastExecutionTime] Gets the last execution time. + * @member {date} [source.nextExecutionTime] Gets the next execution time. + * @member {object} [source.recurrence] Gets the workflow trigger recurrence. + * @member {string} [source.recurrence.frequency] The frequency. Possible + * values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', + * 'Month', 'Year' + * @member {number} [source.recurrence.interval] The interval. + * @member {string} [source.recurrence.startTime] The start time. + * @member {string} [source.recurrence.endTime] The end time. + * @member {string} [source.recurrence.timeZone] The time zone. + * @member {object} [source.recurrence.schedule] The recurrence schedule. + * @member {array} [source.recurrence.schedule.minutes] The minutes. + * @member {array} [source.recurrence.schedule.hours] The hours. + * @member {array} [source.recurrence.schedule.weekDays] The days of the + * week. + * @member {array} [source.recurrence.schedule.monthDays] The month days. + * @member {array} [source.recurrence.schedule.monthlyOccurrences] The + * monthly occurrences. + * @member {object} [source.workflow] Gets the reference to workflow. + * @member {string} [source.workflow.id] The resource id. + * @member {string} [source.workflow.name] Gets the resource name. + * @member {string} [source.workflow.type] Gets the resource type. + * @member {string} [source.name] Gets the workflow trigger name. + * @member {string} [source.type] Gets the workflow trigger type. + */ + constructor() { + } + + /** + * Defines the metadata of SetTriggerStateActionDefinition + * + * @returns {object} metadata of SetTriggerStateActionDefinition + * + */ + mapper() { + return { + required: false, + serializedName: 'SetTriggerStateActionDefinition', + type: { + name: 'Composite', + className: 'SetTriggerStateActionDefinition', + modelProperties: { + source: { + required: true, + serializedName: 'source', + type: { + name: 'Composite', + className: 'WorkflowTrigger' + } + } + } + } + }; + } +} + +module.exports = SetTriggerStateActionDefinition; diff --git a/lib/services/logicManagement/lib/models/trackingEvent.js b/lib/services/logicManagement/lib/models/trackingEvent.js new file mode 100644 index 0000000000..e2a9641112 --- /dev/null +++ b/lib/services/logicManagement/lib/models/trackingEvent.js @@ -0,0 +1,90 @@ +/* + * 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'); + +/** + * Class representing a TrackingEvent. + */ +class TrackingEvent { + /** + * Create a TrackingEvent. + * @member {string} eventLevel Possible values include: 'LogAlways', + * 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + * @member {date} eventTime + * @member {string} recordType Possible values include: 'NotSpecified', + * 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + * 'X12TransactionSet', 'X12InterchangeAcknowledgment', + * 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + * 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + * 'EdifactInterchangeAcknowledgment', + * 'EdifactFunctionalGroupAcknowledgment', + * 'EdifactTransactionSetAcknowledgment' + * @member {object} [error] + * @member {string} [error.message] + * @member {string} [error.code] + */ + constructor() { + } + + /** + * Defines the metadata of TrackingEvent + * + * @returns {object} metadata of TrackingEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'TrackingEvent', + type: { + name: 'Composite', + className: 'TrackingEvent', + modelProperties: { + eventLevel: { + required: true, + serializedName: 'eventLevel', + type: { + name: 'Enum', + allowedValues: [ 'LogAlways', 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' ] + } + }, + eventTime: { + required: true, + serializedName: 'eventTime', + type: { + name: 'DateTime' + } + }, + recordType: { + required: true, + serializedName: 'recordType', + type: { + name: 'Enum', + allowedValues: [ 'NotSpecified', 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', 'X12TransactionSet', 'X12InterchangeAcknowledgment', 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', 'EdifactInterchangeAcknowledgment', 'EdifactFunctionalGroupAcknowledgment', 'EdifactTransactionSetAcknowledgment' ] + } + }, + error: { + required: false, + serializedName: 'error', + type: { + name: 'Composite', + className: 'TrackingEventErrorInfo' + } + } + } + } + }; + } +} + +module.exports = TrackingEvent; diff --git a/lib/services/logicManagement/lib/models/trackingEventErrorInfo.js b/lib/services/logicManagement/lib/models/trackingEventErrorInfo.js new file mode 100644 index 0000000000..b98578f781 --- /dev/null +++ b/lib/services/logicManagement/lib/models/trackingEventErrorInfo.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'; + +/** + * Class representing a TrackingEventErrorInfo. + */ +class TrackingEventErrorInfo { + /** + * Create a TrackingEventErrorInfo. + * @member {string} [message] + * @member {string} [code] + */ + constructor() { + } + + /** + * Defines the metadata of TrackingEventErrorInfo + * + * @returns {object} metadata of TrackingEventErrorInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'TrackingEventErrorInfo', + type: { + name: 'Composite', + className: 'TrackingEventErrorInfo', + modelProperties: { + message: { + required: false, + serializedName: 'message', + type: { + name: 'String' + } + }, + code: { + required: false, + serializedName: 'code', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = TrackingEventErrorInfo; diff --git a/lib/services/logicManagement/lib/models/trackingEventsDefinition.js b/lib/services/logicManagement/lib/models/trackingEventsDefinition.js new file mode 100644 index 0000000000..46837098ba --- /dev/null +++ b/lib/services/logicManagement/lib/models/trackingEventsDefinition.js @@ -0,0 +1,79 @@ +/* + * 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'); + +/** + * Class representing a TrackingEventsDefinition. + */ +class TrackingEventsDefinition { + /** + * Create a TrackingEventsDefinition. + * @member {string} sourceType + * @member {string} [trackEventsOptions] Possible values include: 'None', + * 'DisableSourceInfoEnrich' + * @member {array} events + */ + constructor() { + } + + /** + * Defines the metadata of TrackingEventsDefinition + * + * @returns {object} metadata of TrackingEventsDefinition + * + */ + mapper() { + return { + required: false, + serializedName: 'TrackingEventsDefinition', + type: { + name: 'Composite', + className: 'TrackingEventsDefinition', + modelProperties: { + sourceType: { + required: true, + serializedName: 'sourceType', + type: { + name: 'String' + } + }, + trackEventsOptions: { + required: false, + serializedName: 'trackEventsOptions', + type: { + name: 'Enum', + allowedValues: [ 'None', 'DisableSourceInfoEnrich' ] + } + }, + events: { + required: true, + serializedName: 'events', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'TrackingEventElementType', + type: { + name: 'Composite', + className: 'TrackingEvent' + } + } + } + } + } + } + }; + } +} + +module.exports = TrackingEventsDefinition; diff --git a/lib/services/logicManagement/lib/models/workflowRun.js b/lib/services/logicManagement/lib/models/workflowRun.js index e656fb8927..8e5c011e2e 100644 --- a/lib/services/logicManagement/lib/models/workflowRun.js +++ b/lib/services/logicManagement/lib/models/workflowRun.js @@ -20,6 +20,7 @@ const models = require('./index'); class WorkflowRun extends models['SubResource'] { /** * Create a WorkflowRun. + * @member {date} [waitEndTime] Gets the wait end time. * @member {date} [startTime] Gets the start time. * @member {date} [endTime] Gets the end time. * @member {string} [status] Gets the status. Possible values include: @@ -59,6 +60,7 @@ class WorkflowRun extends models['SubResource'] { * @member {string} [trigger.outputsLink.contentHash.value] The value of the * content hash. * @member {object} [trigger.outputsLink.metadata] The metadata. + * @member {date} [trigger.scheduledTime] Gets the scheduled time. * @member {date} [trigger.startTime] Gets the start time. * @member {date} [trigger.endTime] Gets the end time. * @member {string} [trigger.trackingId] Gets the tracking id. @@ -98,6 +100,7 @@ class WorkflowRun extends models['SubResource'] { * @member {string} [response.outputsLink.contentHash.value] The value of the * content hash. * @member {object} [response.outputsLink.metadata] The metadata. + * @member {date} [response.scheduledTime] Gets the scheduled time. * @member {date} [response.startTime] Gets the start time. * @member {date} [response.endTime] Gets the end time. * @member {string} [response.trackingId] Gets the tracking id. @@ -140,6 +143,14 @@ class WorkflowRun extends models['SubResource'] { name: 'String' } }, + waitEndTime: { + required: false, + readOnly: true, + serializedName: 'properties.waitEndTime', + type: { + name: 'DateTime' + } + }, startTime: { required: false, readOnly: true, diff --git a/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinition.js b/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinition.js new file mode 100644 index 0000000000..f485d0fed7 --- /dev/null +++ b/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinition.js @@ -0,0 +1,263 @@ +/* + * 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'); + +/** + * The workflow run action repetition definition. + * + * @extends models['Resource'] + */ +class WorkflowRunActionRepetitionDefinition extends models['Resource'] { + /** + * Create a WorkflowRunActionRepetitionDefinition. + * @member {date} [startTime] The start time of the workflow scope + * repetition. + * @member {date} [endTime] The end time of the workflow scope repetition. + * @member {object} [correlation] The correlation properties. + * @member {string} [correlation.actionTrackingId] The action tracking + * identifier. + * @member {string} [status] The status of the workflow scope repetition. + * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + * 'TimedOut', 'Aborted', 'Ignored' + * @member {string} [code] The workflow scope repetition code. + * @member {object} [error] + * @member {string} [trackingId] Gets the tracking id. + * @member {object} [inputs] Gets the inputs. + * @member {object} [inputsLink] Gets the link to inputs. + * @member {string} [inputsLink.uri] The content link URI. + * @member {string} [inputsLink.contentVersion] The content version. + * @member {number} [inputsLink.contentSize] The content size. + * @member {object} [inputsLink.contentHash] The content hash. + * @member {string} [inputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [inputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [inputsLink.metadata] The metadata. + * @member {object} [outputs] Gets the outputs. + * @member {object} [outputsLink] Gets the link to outputs. + * @member {string} [outputsLink.uri] The content link URI. + * @member {string} [outputsLink.contentVersion] The content version. + * @member {number} [outputsLink.contentSize] The content size. + * @member {object} [outputsLink.contentHash] The content hash. + * @member {string} [outputsLink.contentHash.algorithm] The algorithm of the + * content hash. + * @member {string} [outputsLink.contentHash.value] The value of the content + * hash. + * @member {object} [outputsLink.metadata] The metadata. + * @member {object} [trackedProperties] Gets the tracked properties. + * @member {array} [retryHistory] Gets the retry histories. + * @member {number} [iterationCount] + * @member {array} [repetitionIndexes] The repetition indexes. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of WorkflowRunActionRepetitionDefinition + * + * @returns {object} metadata of WorkflowRunActionRepetitionDefinition + * + */ + mapper() { + return { + required: false, + serializedName: 'WorkflowRunActionRepetitionDefinition', + type: { + name: 'Composite', + className: 'WorkflowRunActionRepetitionDefinition', + 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' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + startTime: { + required: false, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + serializedName: 'properties.endTime', + type: { + name: 'DateTime' + } + }, + correlation: { + required: false, + serializedName: 'properties.correlation', + type: { + name: 'Composite', + className: 'RunActionCorrelation' + } + }, + status: { + required: false, + serializedName: 'properties.status', + type: { + name: 'Enum', + allowedValues: [ 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' ] + } + }, + code: { + required: false, + serializedName: 'properties.code', + type: { + name: 'String' + } + }, + error: { + required: false, + serializedName: 'properties.error', + type: { + name: 'Object' + } + }, + trackingId: { + required: false, + readOnly: true, + serializedName: 'properties.trackingId', + type: { + name: 'String' + } + }, + inputs: { + required: false, + readOnly: true, + serializedName: 'properties.inputs', + type: { + name: 'Object' + } + }, + inputsLink: { + required: false, + readOnly: true, + serializedName: 'properties.inputsLink', + type: { + name: 'Composite', + className: 'ContentLink' + } + }, + outputs: { + required: false, + readOnly: true, + serializedName: 'properties.outputs', + type: { + name: 'Object' + } + }, + outputsLink: { + required: false, + readOnly: true, + serializedName: 'properties.outputsLink', + type: { + name: 'Composite', + className: 'ContentLink' + } + }, + trackedProperties: { + required: false, + readOnly: true, + serializedName: 'properties.trackedProperties', + type: { + name: 'Object' + } + }, + retryHistory: { + required: false, + serializedName: 'properties.retryHistory', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RetryHistoryElementType', + type: { + name: 'Composite', + className: 'RetryHistory' + } + } + } + }, + iterationCount: { + required: false, + serializedName: 'properties.iterationCount', + type: { + name: 'Number' + } + }, + repetitionIndexes: { + required: false, + serializedName: 'properties.repetitionIndexes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RepetitionIndexElementType', + type: { + name: 'Composite', + className: 'RepetitionIndex' + } + } + } + } + } + } + }; + } +} + +module.exports = WorkflowRunActionRepetitionDefinition; diff --git a/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinitionCollection.js b/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinitionCollection.js new file mode 100644 index 0000000000..b3e155f191 --- /dev/null +++ b/lib/services/logicManagement/lib/models/workflowRunActionRepetitionDefinitionCollection.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'; + +/** + * A collection of workflow run action repetitions. + */ +class WorkflowRunActionRepetitionDefinitionCollection extends Array { + /** + * Create a WorkflowRunActionRepetitionDefinitionCollection. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of WorkflowRunActionRepetitionDefinitionCollection + * + * @returns {object} metadata of WorkflowRunActionRepetitionDefinitionCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'WorkflowRunActionRepetitionDefinitionCollection', + type: { + name: 'Composite', + className: 'WorkflowRunActionRepetitionDefinitionCollection', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'WorkflowRunActionRepetitionDefinitionElementType', + type: { + name: 'Composite', + className: 'WorkflowRunActionRepetitionDefinition' + } + } + } + } + } + } + }; + } +} + +module.exports = WorkflowRunActionRepetitionDefinitionCollection; diff --git a/lib/services/logicManagement/lib/models/workflowRunProperties.js b/lib/services/logicManagement/lib/models/workflowRunProperties.js new file mode 100644 index 0000000000..2461a9ac63 --- /dev/null +++ b/lib/services/logicManagement/lib/models/workflowRunProperties.js @@ -0,0 +1,237 @@ +/* + * 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'); + +/** + * The workflow run properties. + * + */ +class WorkflowRunProperties { + /** + * Create a WorkflowRunProperties. + * @member {date} [startTime] Gets the start time. + * @member {date} [endTime] Gets the end time. + * @member {string} [status] Gets the status. Possible values include: + * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored' + * @member {string} [code] Gets the code. + * @member {object} [error] Gets the error. + * @member {string} [correlationId] Gets the correlation id. + * @member {object} [correlation] The run correlation. + * @member {string} [correlation.clientTrackingId] The client tracking id. + * @member {object} [workflow] Gets the reference to workflow version. + * @member {string} [workflow.id] The resource id. + * @member {string} [workflow.name] Gets the resource name. + * @member {string} [workflow.type] Gets the resource type. + * @member {object} [trigger] Gets the fired trigger. + * @member {string} [trigger.name] Gets the name. + * @member {object} [trigger.inputs] Gets the inputs. + * @member {object} [trigger.inputsLink] Gets the link to inputs. + * @member {string} [trigger.inputsLink.uri] The content link URI. + * @member {string} [trigger.inputsLink.contentVersion] The content version. + * @member {number} [trigger.inputsLink.contentSize] The content size. + * @member {object} [trigger.inputsLink.contentHash] The content hash. + * @member {string} [trigger.inputsLink.contentHash.algorithm] The algorithm + * of the content hash. + * @member {string} [trigger.inputsLink.contentHash.value] The value of the + * content hash. + * @member {object} [trigger.inputsLink.metadata] The metadata. + * @member {object} [trigger.outputs] Gets the outputs. + * @member {object} [trigger.outputsLink] Gets the link to outputs. + * @member {string} [trigger.outputsLink.uri] The content link URI. + * @member {string} [trigger.outputsLink.contentVersion] The content version. + * @member {number} [trigger.outputsLink.contentSize] The content size. + * @member {object} [trigger.outputsLink.contentHash] The content hash. + * @member {string} [trigger.outputsLink.contentHash.algorithm] The algorithm + * of the content hash. + * @member {string} [trigger.outputsLink.contentHash.value] The value of the + * content hash. + * @member {object} [trigger.outputsLink.metadata] The metadata. + * @member {date} [trigger.startTime] Gets the start time. + * @member {date} [trigger.endTime] Gets the end time. + * @member {string} [trigger.trackingId] Gets the tracking id. + * @member {object} [trigger.correlation] The run correlation. + * @member {string} [trigger.correlation.clientTrackingId] The client + * tracking id. + * @member {string} [trigger.code] Gets the code. + * @member {string} [trigger.status] Gets the status. Possible values + * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', + * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + * 'Aborted', 'Ignored' + * @member {object} [trigger.error] Gets the error. + * @member {object} [trigger.trackedProperties] Gets the tracked properties. + * @member {object} [outputs] Gets the outputs. + * @member {object} [response] Gets the response of the flow run. + * @member {string} [response.name] Gets the name. + * @member {object} [response.inputs] Gets the inputs. + * @member {object} [response.inputsLink] Gets the link to inputs. + * @member {string} [response.inputsLink.uri] The content link URI. + * @member {string} [response.inputsLink.contentVersion] The content version. + * @member {number} [response.inputsLink.contentSize] The content size. + * @member {object} [response.inputsLink.contentHash] The content hash. + * @member {string} [response.inputsLink.contentHash.algorithm] The algorithm + * of the content hash. + * @member {string} [response.inputsLink.contentHash.value] The value of the + * content hash. + * @member {object} [response.inputsLink.metadata] The metadata. + * @member {object} [response.outputs] Gets the outputs. + * @member {object} [response.outputsLink] Gets the link to outputs. + * @member {string} [response.outputsLink.uri] The content link URI. + * @member {string} [response.outputsLink.contentVersion] The content + * version. + * @member {number} [response.outputsLink.contentSize] The content size. + * @member {object} [response.outputsLink.contentHash] The content hash. + * @member {string} [response.outputsLink.contentHash.algorithm] The + * algorithm of the content hash. + * @member {string} [response.outputsLink.contentHash.value] The value of the + * content hash. + * @member {object} [response.outputsLink.metadata] The metadata. + * @member {date} [response.startTime] Gets the start time. + * @member {date} [response.endTime] Gets the end time. + * @member {string} [response.trackingId] Gets the tracking id. + * @member {object} [response.correlation] The run correlation. + * @member {string} [response.correlation.clientTrackingId] The client + * tracking id. + * @member {string} [response.code] Gets the code. + * @member {string} [response.status] Gets the status. Possible values + * include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', + * 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + * 'Aborted', 'Ignored' + * @member {object} [response.error] Gets the error. + * @member {object} [response.trackedProperties] Gets the tracked properties. + */ + constructor() { + } + + /** + * Defines the metadata of WorkflowRunProperties + * + * @returns {object} metadata of WorkflowRunProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'WorkflowRunProperties', + type: { + name: 'Composite', + className: 'WorkflowRunProperties', + modelProperties: { + startTime: { + required: false, + readOnly: true, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + readOnly: true, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + }, + status: { + required: false, + readOnly: true, + serializedName: 'status', + type: { + name: 'Enum', + allowedValues: [ 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' ] + } + }, + code: { + required: false, + readOnly: true, + serializedName: 'code', + type: { + name: 'String' + } + }, + error: { + required: false, + readOnly: true, + serializedName: 'error', + type: { + name: 'Object' + } + }, + correlationId: { + required: false, + readOnly: true, + serializedName: 'correlationId', + type: { + name: 'String' + } + }, + correlation: { + required: false, + serializedName: 'correlation', + type: { + name: 'Composite', + className: 'Correlation' + } + }, + workflow: { + required: false, + readOnly: true, + serializedName: 'workflow', + type: { + name: 'Composite', + className: 'ResourceReference' + } + }, + trigger: { + required: false, + readOnly: true, + serializedName: 'trigger', + type: { + name: 'Composite', + className: 'WorkflowRunTrigger' + } + }, + outputs: { + required: false, + readOnly: true, + serializedName: 'outputs', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'WorkflowOutputParameterElementType', + type: { + name: 'Composite', + className: 'WorkflowOutputParameter' + } + } + } + }, + response: { + required: false, + readOnly: true, + serializedName: 'response', + type: { + name: 'Composite', + className: 'WorkflowRunTrigger' + } + } + } + } + }; + } +} + +module.exports = WorkflowRunProperties; diff --git a/lib/services/logicManagement/lib/models/workflowRunTrigger.js b/lib/services/logicManagement/lib/models/workflowRunTrigger.js index 06c7be5f92..7d5b57d57e 100644 --- a/lib/services/logicManagement/lib/models/workflowRunTrigger.js +++ b/lib/services/logicManagement/lib/models/workflowRunTrigger.js @@ -42,6 +42,7 @@ class WorkflowRunTrigger { * @member {string} [outputsLink.contentHash.value] The value of the content * hash. * @member {object} [outputsLink.metadata] The metadata. + * @member {date} [scheduledTime] Gets the scheduled time. * @member {date} [startTime] Gets the start time. * @member {date} [endTime] Gets the end time. * @member {string} [trackingId] Gets the tracking id. @@ -114,6 +115,14 @@ class WorkflowRunTrigger { className: 'ContentLink' } }, + scheduledTime: { + required: false, + readOnly: true, + serializedName: 'scheduledTime', + type: { + name: 'DateTime' + } + }, startTime: { required: false, readOnly: true, diff --git a/lib/services/logicManagement/lib/models/workflowTrigger.js b/lib/services/logicManagement/lib/models/workflowTrigger.js index 0a5e63624a..5cc938d242 100644 --- a/lib/services/logicManagement/lib/models/workflowTrigger.js +++ b/lib/services/logicManagement/lib/models/workflowTrigger.js @@ -40,8 +40,8 @@ class WorkflowTrigger extends models['SubResource'] { * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', * 'Month', 'Year' * @member {number} [recurrence.interval] The interval. - * @member {date} [recurrence.startTime] The start time. - * @member {date} [recurrence.endTime] The end time. + * @member {string} [recurrence.startTime] The start time. + * @member {string} [recurrence.endTime] The end time. * @member {string} [recurrence.timeZone] The time zone. * @member {object} [recurrence.schedule] The recurrence schedule. * @member {array} [recurrence.schedule.minutes] The minutes. diff --git a/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js b/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js index 452079b677..07f9efed11 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerCallbackUrl.js @@ -34,6 +34,7 @@ class WorkflowTriggerCallbackUrl { * @member {string} [queries.sp] The SAS permissions. * @member {string} [queries.sv] The SAS version. * @member {string} [queries.sig] The SAS signature. + * @member {string} [queries.se] The SAS timestamp. */ constructor() { } diff --git a/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js b/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js index c56104dfb8..2be51f4d69 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerListCallbackUrlQueries.js @@ -21,6 +21,7 @@ class WorkflowTriggerListCallbackUrlQueries { * @member {string} [sp] The SAS permissions. * @member {string} [sv] The SAS version. * @member {string} [sig] The SAS signature. + * @member {string} [se] The SAS timestamp. */ constructor() { } @@ -66,6 +67,13 @@ class WorkflowTriggerListCallbackUrlQueries { type: { name: 'String' } + }, + se: { + required: false, + serializedName: 'se', + type: { + name: 'String' + } } } } diff --git a/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js b/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js index 27283ad70e..bfdb4a057f 100644 --- a/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js +++ b/lib/services/logicManagement/lib/models/workflowTriggerRecurrence.js @@ -22,8 +22,8 @@ class WorkflowTriggerRecurrence { * @member {string} [frequency] The frequency. Possible values include: * 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' * @member {number} [interval] The interval. - * @member {date} [startTime] The start time. - * @member {date} [endTime] The end time. + * @member {string} [startTime] The start time. + * @member {string} [endTime] The end time. * @member {string} [timeZone] The time zone. * @member {object} [schedule] The recurrence schedule. * @member {array} [schedule.minutes] The minutes. @@ -68,14 +68,14 @@ class WorkflowTriggerRecurrence { required: false, serializedName: 'startTime', type: { - name: 'DateTime' + name: 'String' } }, endTime: { required: false, serializedName: 'endTime', type: { - name: 'DateTime' + name: 'String' } }, timeZone: { diff --git a/lib/services/logicManagement/lib/models/x12OneWayAgreement.js b/lib/services/logicManagement/lib/models/x12OneWayAgreement.js index 16d260545a..a78cf68b3a 100644 --- a/lib/services/logicManagement/lib/models/x12OneWayAgreement.js +++ b/lib/services/logicManagement/lib/models/x12OneWayAgreement.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * The X12 oneway agreement. + * The X12 one-way agreement. * */ class X12OneWayAgreement { diff --git a/lib/services/logicManagement/lib/operations/agreements.js b/lib/services/logicManagement/lib/operations/agreements.js index 356e75e2b0..63ba923055 100644 --- a/lib/services/logicManagement/lib/operations/agreements.js +++ b/lib/services/logicManagement/lib/operations/agreements.js @@ -27,6 +27,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: AgreementType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1648,6 +1649,182 @@ function _deleteMethod(resourceGroupName, integrationAccountName, agreementName, }); } +/** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} agreementName The integration account agreement name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 WorkflowTriggerCallbackUrl} 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 _listContentCallbackUrl(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrlParameter, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (agreementName === null || agreementName === undefined || typeof agreementName.valueOf() !== 'string') { + throw new Error('agreementName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (listContentCallbackUrlParameter === null || listContentCallbackUrlParameter === undefined) { + throw new Error('listContentCallbackUrlParameter 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.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{agreementName}', encodeURIComponent(agreementName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (listContentCallbackUrlParameter !== null && listContentCallbackUrlParameter !== undefined) { + let requestModelMapper = new client.models['GetCallbackUrlParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, listContentCallbackUrlParameter, 'listContentCallbackUrlParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(listContentCallbackUrlParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowTriggerCallbackUrl']().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); + }); +} + /** * Gets a list of integration account agreements. * @@ -1788,6 +1965,7 @@ class Agreements { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._listContentCallbackUrl = _listContentCallbackUrl; this._listByIntegrationAccountsNext = _listByIntegrationAccountsNext; } @@ -1804,6 +1982,7 @@ class Agreements { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: AgreementType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1841,6 +2020,7 @@ class Agreements { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: AgreementType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4155,6 +4335,111 @@ class Agreements { } } + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} agreementName The integration account agreement name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrlParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listContentCallbackUrl(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} agreementName The integration account agreement name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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 WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrlParameter, 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._listContentCallbackUrl(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listContentCallbackUrl(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrlParameter, options, optionalCallback); + } + } + /** * Gets a list of integration account agreements. * diff --git a/lib/services/logicManagement/lib/operations/index.d.ts b/lib/services/logicManagement/lib/operations/index.d.ts index 63eb6e9715..8bb968e032 100644 --- a/lib/services/logicManagement/lib/operations/index.d.ts +++ b/lib/services/logicManagement/lib/operations/index.d.ts @@ -30,6 +30,7 @@ export interface Workflows { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -51,6 +52,7 @@ export interface Workflows { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -93,6 +95,7 @@ export interface Workflows { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -116,6 +119,7 @@ export interface Workflows { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -652,6 +656,80 @@ export interface Workflows { generateUpgradedDefinition(resourceGroupName: string, workflowName: string, parameters: models.GenerateUpgradedDefinitionParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Get the workflow callback Url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} listCallbackUrlParameter Which callback url to list. + * + * @param {date} [listCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listCallbackUrlParameter.keyType] The key type. Possible + * values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listCallbackUrlWithHttpOperationResponse(resourceGroupName: string, workflowName: string, listCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get the workflow callback Url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} listCallbackUrlParameter Which callback url to list. + * + * @param {date} [listCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listCallbackUrlParameter.keyType] The key type. Possible + * values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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. + * + * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. + */ + listCallbackUrl(resourceGroupName: string, workflowName: string, listCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listCallbackUrl(resourceGroupName: string, workflowName: string, listCallbackUrlParameter: models.GetCallbackUrlParameters, callback: ServiceCallback): void; + listCallbackUrl(resourceGroupName: string, workflowName: string, listCallbackUrlParameter: models.GetCallbackUrlParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets an OpenAPI definition for the workflow. * @@ -710,6 +788,108 @@ export interface Workflows { listSwagger(resourceGroupName: string, workflowName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Moves an existing workflow. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} moveParameter The workflow to move. + * + * @param {string} [moveParameter.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [moveParameter.sku] The sku. + * + * @param {string} moveParameter.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [moveParameter.sku.plan] The reference to plan. + * + * @param {object} [moveParameter.integrationAccount] The integration account. + * + * @param {object} [moveParameter.definition] The definition. + * + * @param {object} [moveParameter.parameters] The parameters. + * + * @param {string} [moveParameter.location] The resource location. + * + * @param {object} [moveParameter.tags] The resource tags. + * + * @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. + */ + moveWithHttpOperationResponse(resourceGroupName: string, workflowName: string, moveParameter: models.Workflow, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Moves an existing workflow. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} moveParameter The workflow to move. + * + * @param {string} [moveParameter.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [moveParameter.sku] The sku. + * + * @param {string} moveParameter.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [moveParameter.sku.plan] The reference to plan. + * + * @param {object} [moveParameter.integrationAccount] The integration account. + * + * @param {object} [moveParameter.definition] The definition. + * + * @param {object} [moveParameter.parameters] The parameters. + * + * @param {string} [moveParameter.location] The resource location. + * + * @param {object} [moveParameter.tags] The resource tags. + * + * @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. + */ + move(resourceGroupName: string, workflowName: string, moveParameter: models.Workflow, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + move(resourceGroupName: string, workflowName: string, moveParameter: models.Workflow, callback: ServiceCallback): void; + move(resourceGroupName: string, workflowName: string, moveParameter: models.Workflow, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Regenerates the callback URL access key for request triggers. * @@ -778,6 +958,108 @@ export interface Workflows { regenerateAccessKey(resourceGroupName: string, workflowName: string, keyType: models.RegenerateActionParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Validates the workflow. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} validate The workflow. + * + * @param {string} [validate.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [validate.sku] The sku. + * + * @param {string} validate.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [validate.sku.plan] The reference to plan. + * + * @param {object} [validate.integrationAccount] The integration account. + * + * @param {object} [validate.definition] The definition. + * + * @param {object} [validate.parameters] The parameters. + * + * @param {string} [validate.location] The resource location. + * + * @param {object} [validate.tags] The resource tags. + * + * @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. + */ + validateWorkflowWithHttpOperationResponse(resourceGroupName: string, workflowName: string, validate: models.Workflow, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Validates the workflow. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} validate The workflow. + * + * @param {string} [validate.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [validate.sku] The sku. + * + * @param {string} validate.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [validate.sku.plan] The reference to plan. + * + * @param {object} [validate.integrationAccount] The integration account. + * + * @param {object} [validate.definition] The definition. + * + * @param {object} [validate.parameters] The parameters. + * + * @param {string} [validate.location] The resource location. + * + * @param {object} [validate.tags] The resource tags. + * + * @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. + */ + validateWorkflow(resourceGroupName: string, workflowName: string, validate: models.Workflow, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + validateWorkflow(resourceGroupName: string, workflowName: string, validate: models.Workflow, callback: ServiceCallback): void; + validateWorkflow(resourceGroupName: string, workflowName: string, validate: models.Workflow, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Validates the workflow definition. * @@ -1137,7 +1419,7 @@ export interface WorkflowVersions { /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param {string} resourceGroupName The resource group name. * @@ -1168,7 +1450,7 @@ export interface WorkflowVersions { listCallbackUrlWithHttpOperationResponse(resourceGroupName: string, workflowName: string, versionId: string, triggerName: string, options?: { parameters? : models.GetCallbackUrlParameters, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param {string} resourceGroupName The resource group name. * @@ -1419,7 +1701,7 @@ export interface WorkflowTriggers { /** - * Runs a workflow trigger. + * Resets a workflow trigger. * * @param {string} resourceGroupName The resource group name. * @@ -1434,14 +1716,14 @@ export interface WorkflowTriggers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - runWithHttpOperationResponse(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + resetWithHttpOperationResponse(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Runs a workflow trigger. + * Resets a workflow trigger. * * @param {string} resourceGroupName The resource group name. * @@ -1461,7 +1743,7 @@ export interface WorkflowTriggers { * * {Promise} A promise is returned. * - * @resolve {Object} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1469,19 +1751,19 @@ export interface WorkflowTriggers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Object} [result] - The deserialized result object if an error did not occur. + * {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. */ - run(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - run(resourceGroupName: string, workflowName: string, triggerName: string, callback: ServiceCallback): void; - run(resourceGroupName: string, workflowName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reset(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + reset(resourceGroupName: string, workflowName: string, triggerName: string, callback: ServiceCallback): void; + reset(resourceGroupName: string, workflowName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the callback URL for a workflow trigger. + * Runs a workflow trigger. * * @param {string} resourceGroupName The resource group name. * @@ -1496,14 +1778,14 @@ export interface WorkflowTriggers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listCallbackUrlWithHttpOperationResponse(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + runWithHttpOperationResponse(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the callback URL for a workflow trigger. + * Runs a workflow trigger. * * @param {string} resourceGroupName The resource group name. * @@ -1523,7 +1805,7 @@ export interface WorkflowTriggers { * * {Promise} A promise is returned. * - * @resolve {WorkflowTriggerCallbackUrl} - The deserialized result object. + * @resolve {Object} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1531,24 +1813,25 @@ export interface WorkflowTriggers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. - * See {@link WorkflowTriggerCallbackUrl} for more - * information. + * {Object} [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. */ - listCallbackUrl(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listCallbackUrl(resourceGroupName: string, workflowName: string, triggerName: string, callback: ServiceCallback): void; - listCallbackUrl(resourceGroupName: string, workflowName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + run(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + run(resourceGroupName: string, workflowName: string, triggerName: string, callback: ServiceCallback): void; + run(resourceGroupName: string, workflowName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of workflow triggers. + * Get the trigger schema as JSON. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger name. * * @param {object} [options] Optional Parameters. * @@ -1557,17 +1840,211 @@ export interface WorkflowTriggers { * * @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>; + getSchemaJsonWithHttpOperationResponse(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of workflow triggers. + * Get the trigger schema as JSON. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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 {JsonSchema} - 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. + * + * {JsonSchema} [result] - The deserialized result object if an error did not occur. + * See {@link JsonSchema} 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. + */ + getSchemaJson(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getSchemaJson(resourceGroupName: string, workflowName: string, triggerName: string, callback: ServiceCallback): void; + getSchemaJson(resourceGroupName: string, workflowName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Sets the state of a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger name. + * + * @param {object} setStateParameter The workflow trigger state. + * + * @param {object} setStateParameter.source + * + * @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. + */ + setStateWithHttpOperationResponse(resourceGroupName: string, workflowName: string, triggerName: string, setStateParameter: models.SetTriggerStateActionDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Sets the state of a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger name. + * + * @param {object} setStateParameter The workflow trigger state. + * + * @param {object} setStateParameter.source + * + * @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. + */ + setState(resourceGroupName: string, workflowName: string, triggerName: string, setStateParameter: models.SetTriggerStateActionDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + setState(resourceGroupName: string, workflowName: string, triggerName: string, setStateParameter: models.SetTriggerStateActionDefinition, callback: ServiceCallback): void; + setState(resourceGroupName: string, workflowName: string, triggerName: string, setStateParameter: models.SetTriggerStateActionDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get the callback URL for a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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. + */ + listCallbackUrlWithHttpOperationResponse(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get the callback URL for a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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 {WorkflowTriggerCallbackUrl} - 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. + * + * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. + */ + listCallbackUrl(resourceGroupName: string, workflowName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listCallbackUrl(resourceGroupName: string, workflowName: string, triggerName: string, callback: ServiceCallback): void; + listCallbackUrl(resourceGroupName: string, workflowName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of workflow triggers. + * + * @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>; + + /** + * Gets a list of workflow triggers. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1626,6 +2103,7 @@ export interface WorkflowTriggerHistories { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1653,6 +2131,7 @@ export interface WorkflowTriggerHistories { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1903,6 +2382,7 @@ export interface WorkflowRuns { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1928,6 +2408,7 @@ export interface WorkflowRuns { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2165,6 +2646,7 @@ export interface WorkflowRunActions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2192,6 +2674,7 @@ export interface WorkflowRunActions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2292,10 +2775,15 @@ export interface WorkflowRunActions { /** - * Gets a list of workflow run actions. + * Lists a workflow run expression trace. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. * * @param {object} [options] Optional Parameters. * @@ -2304,17 +2792,22 @@ export interface WorkflowRunActions { * * @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>; + listExpressionTracesWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of workflow run actions. + * Lists a workflow run expression trace. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. * * @param {object} [options] Optional Parameters. * @@ -2328,7 +2821,7 @@ export interface WorkflowRunActions { * * {Promise} A promise is returned. * - * @resolve {WorkflowRunActionListResult} - The deserialized result object. + * @resolve {ExpressionTraces} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2336,54 +2829,44 @@ export interface WorkflowRunActions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {WorkflowRunActionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link WorkflowRunActionListResult} for more - * information. + * {ExpressionTraces} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressionTraces} 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 - * IntegrationAccounts - * __NOTE__: An instance of this class is automatically created for an - * instance of the LogicManagementClient. - */ -export interface IntegrationAccounts { + listExpressionTraces(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listExpressionTraces(resourceGroupName: string, workflowName: string, runName: string, actionName: string, callback: ServiceCallback): void; + listExpressionTraces(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of integration accounts by subscription. + * Gets a list of workflow run actions. * - * @param {object} [options] Optional Parameters. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {number} [options.top] The number of items to be included in the - * result. + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionWithHttpOperationResponse(options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of integration accounts by subscription. + * Gets a list of workflow run actions. * - * @param {object} [options] Optional Parameters. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {number} [options.top] The number of items to be included in the - * result. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2395,7 +2878,7 @@ export interface IntegrationAccounts { * * {Promise} A promise is returned. * - * @resolve {IntegrationAccountListResult} - The deserialized result object. + * @resolve {WorkflowRunActionListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2403,49 +2886,64 @@ export interface IntegrationAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {IntegrationAccountListResult} [result] - The deserialized result object if an error did not occur. - * See {@link IntegrationAccountListResult} for more + * {WorkflowRunActionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowRunActionListResult} 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?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { top? : number, 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 + * WorkflowRunActionRepetitions + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface WorkflowRunActionRepetitions { /** - * Gets a list of integration accounts by resource group. + * Get all of a workflow run action repetitions. * * @param {string} resourceGroupName The resource group name. * - * @param {object} [options] Optional Parameters. + * @param {string} workflowName The workflow name. * - * @param {number} [options.top] The number of items to be included in the - * result. + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of integration accounts by resource group. + * Get all of a workflow run action repetitions. * * @param {string} resourceGroupName The resource group name. * - * @param {object} [options] Optional Parameters. + * @param {string} workflowName The workflow name. * - * @param {number} [options.top] The number of items to be included in the - * result. + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2457,7 +2955,7 @@ export interface IntegrationAccounts { * * {Promise} A promise is returned. * - * @resolve {IntegrationAccountListResult} - The deserialized result object. + * @resolve {WorkflowRunActionRepetitionDefinitionCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2465,25 +2963,32 @@ export interface IntegrationAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {IntegrationAccountListResult} [result] - The deserialized result object if an error did not occur. - * See {@link IntegrationAccountListResult} for more - * information. + * {WorkflowRunActionRepetitionDefinitionCollection} [result] - The deserialized result object if an error did not occur. + * See {@link + * WorkflowRunActionRepetitionDefinitionCollection} 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?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets an integration account. + * Get a workflow run action repetition. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. * * @param {object} [options] Optional Parameters. * @@ -2492,18 +2997,24 @@ export interface IntegrationAccounts { * * @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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets an integration account. + * Get a workflow run action repetition. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. * * @param {object} [options] Optional Parameters. * @@ -2517,7 +3028,7 @@ export interface IntegrationAccounts { * * {Promise} A promise is returned. * - * @resolve {IntegrationAccount} - The deserialized result object. + * @resolve {WorkflowRunActionRepetitionDefinition} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2525,38 +3036,31 @@ export interface IntegrationAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {IntegrationAccount} [result] - The deserialized result object if an error did not occur. - * See {@link IntegrationAccount} for more information. + * {WorkflowRunActionRepetitionDefinition} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowRunActionRepetitionDefinition} 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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, integrationAccountName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, integrationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates an integration account. + * Lists a workflow run expression trace. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. - * - * @param {object} integrationAccount The integration account. - * - * @param {object} [integrationAccount.properties] The integration account - * properties. - * - * @param {object} [integrationAccount.sku] The sku. + * @param {string} workflowName The workflow name. * - * @param {string} integrationAccount.sku.name The sku name. Possible values - * include: 'NotSpecified', 'Free', 'Standard' + * @param {string} runName The workflow run name. * - * @param {string} [integrationAccount.location] The resource location. + * @param {string} actionName The workflow action name. * - * @param {object} [integrationAccount.tags] The resource tags. + * @param {string} repetitionName The workflow repetition. * * @param {object} [options] Optional Parameters. * @@ -2565,32 +3069,24 @@ export interface IntegrationAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listExpressionTracesWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an integration account. + * Lists a workflow run expression trace. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. - * - * @param {object} integrationAccount The integration account. - * - * @param {object} [integrationAccount.properties] The integration account - * properties. - * - * @param {object} [integrationAccount.sku] The sku. + * @param {string} workflowName The workflow name. * - * @param {string} integrationAccount.sku.name The sku name. Possible values - * include: 'NotSpecified', 'Free', 'Standard' + * @param {string} runName The workflow run name. * - * @param {string} [integrationAccount.location] The resource location. + * @param {string} actionName The workflow action name. * - * @param {object} [integrationAccount.tags] The resource tags. + * @param {string} repetitionName The workflow repetition. * * @param {object} [options] Optional Parameters. * @@ -2604,7 +3100,7 @@ export interface IntegrationAccounts { * * {Promise} A promise is returned. * - * @resolve {IntegrationAccount} - The deserialized result object. + * @resolve {ExpressionTraces} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2612,38 +3108,37 @@ export interface IntegrationAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {IntegrationAccount} [result] - The deserialized result object if an error did not occur. - * See {@link IntegrationAccount} for more information. + * {ExpressionTraces} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressionTraces} 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. */ - createOrUpdate(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listExpressionTraces(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listExpressionTraces(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, callback: ServiceCallback): void; + listExpressionTraces(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * WorkflowRunActionScopedRepetitions + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface WorkflowRunActionScopedRepetitions { /** - * Updates an integration account. + * List the workflow run action scoped repetitions. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. - * - * @param {object} integrationAccount The integration account. - * - * @param {object} [integrationAccount.properties] The integration account - * properties. - * - * @param {object} [integrationAccount.sku] The sku. - * - * @param {string} integrationAccount.sku.name The sku name. Possible values - * include: 'NotSpecified', 'Free', 'Standard' + * @param {string} workflowName The workflow name. * - * @param {string} [integrationAccount.location] The resource location. + * @param {string} runName The workflow run name. * - * @param {object} [integrationAccount.tags] The resource tags. + * @param {string} actionName The workflow action name. * * @param {object} [options] Optional Parameters. * @@ -2652,32 +3147,22 @@ export interface IntegrationAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an integration account. + * List the workflow run action scoped repetitions. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. - * - * @param {object} integrationAccount The integration account. - * - * @param {object} [integrationAccount.properties] The integration account - * properties. - * - * @param {object} [integrationAccount.sku] The sku. - * - * @param {string} integrationAccount.sku.name The sku name. Possible values - * include: 'NotSpecified', 'Free', 'Standard' + * @param {string} workflowName The workflow name. * - * @param {string} [integrationAccount.location] The resource location. + * @param {string} runName The workflow run name. * - * @param {object} [integrationAccount.tags] The resource tags. + * @param {string} actionName The workflow action name. * * @param {object} [options] Optional Parameters. * @@ -2691,7 +3176,7 @@ export interface IntegrationAccounts { * * {Promise} A promise is returned. * - * @resolve {IntegrationAccount} - The deserialized result object. + * @resolve {WorkflowRunActionRepetitionDefinitionCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2699,24 +3184,32 @@ export interface IntegrationAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {IntegrationAccount} [result] - The deserialized result object if an error did not occur. - * See {@link IntegrationAccount} for more information. + * {WorkflowRunActionRepetitionDefinitionCollection} [result] - The deserialized result object if an error did not occur. + * See {@link + * WorkflowRunActionRepetitionDefinitionCollection} 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. */ - update(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, callback: ServiceCallback): void; - update(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, workflowName: string, runName: string, actionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes an integration account. + * Get a workflow run action scoped repetition. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. * * @param {object} [options] Optional Parameters. * @@ -2725,18 +3218,24 @@ export interface IntegrationAccounts { * * @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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes an integration account. + * Get a workflow run action scoped repetition. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. * * @param {object} [options] Optional Parameters. * @@ -2750,7 +3249,7 @@ export interface IntegrationAccounts { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {WorkflowRunActionRepetitionDefinition} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2758,30 +3257,38 @@ export interface IntegrationAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {WorkflowRunActionRepetitionDefinition} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowRunActionRepetitionDefinition} 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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, integrationAccountName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, integrationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, actionName: string, repetitionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * WorkflowRunOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface WorkflowRunOperations { /** - * Gets the integration account callback URL. + * Gets an operation for a run. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. - * - * @param {object} parameters The callback URL parameters. + * @param {string} workflowName The workflow name. * - * @param {date} [parameters.notAfter] The expiry time. + * @param {string} runName The workflow run name. * - * @param {string} [parameters.keyType] The key type. Possible values include: - * 'NotSpecified', 'Primary', 'Secondary' + * @param {string} operationId The workflow operation id. * * @param {object} [options] Optional Parameters. * @@ -2790,25 +3297,22 @@ export interface IntegrationAccounts { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getCallbackUrlWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, workflowName: string, runName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the integration account callback URL. + * Gets an operation for a run. * * @param {string} resourceGroupName The resource group name. * - * @param {string} integrationAccountName The integration account name. - * - * @param {object} parameters The callback URL parameters. + * @param {string} workflowName The workflow name. * - * @param {date} [parameters.notAfter] The expiry time. + * @param {string} runName The workflow run name. * - * @param {string} [parameters.keyType] The key type. Possible values include: - * 'NotSpecified', 'Primary', 'Secondary' + * @param {string} operationId The workflow operation id. * * @param {object} [options] Optional Parameters. * @@ -2822,7 +3326,7 @@ export interface IntegrationAccounts { * * {Promise} A promise is returned. * - * @resolve {CallbackUrl} - The deserialized result object. + * @resolve {WorkflowRun} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2830,26 +3334,35 @@ export interface IntegrationAccounts { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {CallbackUrl} [result] - The deserialized result object if an error did not occur. - * See {@link CallbackUrl} for more information. + * {WorkflowRun} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowRun} 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. */ - getCallbackUrl(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getCallbackUrl(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, callback: ServiceCallback): void; - getCallbackUrl(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, workflowName: string, runName: string, operationId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, workflowName: string, runName: string, operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * IntegrationAccounts + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface IntegrationAccounts { /** * Gets a list of integration accounts by subscription. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] The number of items to be included in the + * result. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2859,16 +3372,16 @@ export interface IntegrationAccounts { * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionWithHttpOperationResponse(options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a list of integration accounts by subscription. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] The number of items to be included in the + * result. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2895,19 +3408,21 @@ export interface IntegrationAccounts { * * {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; + listBySubscription(options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets a list of integration accounts by resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] The number of items to be included in the + * result. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2917,16 +3432,18 @@ export interface IntegrationAccounts { * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a list of integration accounts by resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.top] The number of items to be included in the + * result. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2953,9 +3470,1530 @@ export interface IntegrationAccounts { * * {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; + listByResourceGroup(resourceGroupName: string, options?: { top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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. + */ + getWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 {IntegrationAccount} - 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. + * + * {IntegrationAccount} [result] - The deserialized result object if an error did not occur. + * See {@link IntegrationAccount} 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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, integrationAccountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, integrationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} integrationAccount The integration account. + * + * @param {object} [integrationAccount.properties] The integration account + * properties. + * + * @param {object} [integrationAccount.sku] The sku. + * + * @param {string} integrationAccount.sku.name The sku name. Possible values + * include: 'NotSpecified', 'Free', 'Standard' + * + * @param {string} [integrationAccount.location] The resource location. + * + * @param {object} [integrationAccount.tags] The resource tags. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} integrationAccount The integration account. + * + * @param {object} [integrationAccount.properties] The integration account + * properties. + * + * @param {object} [integrationAccount.sku] The sku. + * + * @param {string} integrationAccount.sku.name The sku name. Possible values + * include: 'NotSpecified', 'Free', 'Standard' + * + * @param {string} [integrationAccount.location] The resource location. + * + * @param {object} [integrationAccount.tags] The resource tags. + * + * @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 {IntegrationAccount} - 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. + * + * {IntegrationAccount} [result] - The deserialized result object if an error did not occur. + * See {@link IntegrationAccount} 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. + */ + createOrUpdate(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} integrationAccount The integration account. + * + * @param {object} [integrationAccount.properties] The integration account + * properties. + * + * @param {object} [integrationAccount.sku] The sku. + * + * @param {string} integrationAccount.sku.name The sku name. Possible values + * include: 'NotSpecified', 'Free', 'Standard' + * + * @param {string} [integrationAccount.location] The resource location. + * + * @param {object} [integrationAccount.tags] The resource tags. + * + * @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. + */ + updateWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} integrationAccount The integration account. + * + * @param {object} [integrationAccount.properties] The integration account + * properties. + * + * @param {object} [integrationAccount.sku] The sku. + * + * @param {string} integrationAccount.sku.name The sku name. Possible values + * include: 'NotSpecified', 'Free', 'Standard' + * + * @param {string} [integrationAccount.location] The resource location. + * + * @param {object} [integrationAccount.tags] The resource tags. + * + * @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 {IntegrationAccount} - 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. + * + * {IntegrationAccount} [result] - The deserialized result object if an error did not occur. + * See {@link IntegrationAccount} 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. + */ + update(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, callback: ServiceCallback): void; + update(resourceGroupName: string, integrationAccountName: string, integrationAccount: models.IntegrationAccount, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 {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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, integrationAccountName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, integrationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the integration account callback URL. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} parameters The callback URL parameters. + * + * @param {date} [parameters.notAfter] The expiry time. + * + * @param {string} [parameters.keyType] The key type. Possible values include: + * 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + getCallbackUrlWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the integration account callback URL. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} parameters The callback URL parameters. + * + * @param {date} [parameters.notAfter] The expiry time. + * + * @param {string} [parameters.keyType] The key type. Possible values include: + * 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {CallbackUrl} - 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. + * + * {CallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link CallbackUrl} 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. + */ + getCallbackUrl(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getCallbackUrl(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, callback: ServiceCallback): void; + getCallbackUrl(resourceGroupName: string, integrationAccountName: string, parameters: models.GetCallbackUrlParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the integration account's Key Vault keys. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} listKeyVaultKeysParameter The key vault parameters. + * + * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. + * + * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. + * + * @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. + */ + listKeyVaultKeysWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, listKeyVaultKeysParameter: models.ListKeyVaultKeysDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the integration account's Key Vault keys. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} listKeyVaultKeysParameter The key vault parameters. + * + * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. + * + * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. + * + * @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 {KeyVaultKeyCollection} - 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. + * + * {KeyVaultKeyCollection} [result] - The deserialized result object if an error did not occur. + * See {@link KeyVaultKeyCollection} 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. + */ + listKeyVaultKeys(resourceGroupName: string, integrationAccountName: string, listKeyVaultKeysParameter: models.ListKeyVaultKeysDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listKeyVaultKeys(resourceGroupName: string, integrationAccountName: string, listKeyVaultKeysParameter: models.ListKeyVaultKeysDefinition, callback: ServiceCallback): void; + listKeyVaultKeys(resourceGroupName: string, integrationAccountName: string, listKeyVaultKeysParameter: models.ListKeyVaultKeysDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Logs the integration account's tracking events. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} logTrackingEventsParameter The callback URL parameters. + * + * @param {string} logTrackingEventsParameter.sourceType + * + * @param {string} [logTrackingEventsParameter.trackEventsOptions] Possible + * values include: 'None', 'DisableSourceInfoEnrich' + * + * @param {array} logTrackingEventsParameter.events + * + * @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. + */ + logTrackingEventsWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, logTrackingEventsParameter: models.TrackingEventsDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Logs the integration account's tracking events. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} logTrackingEventsParameter The callback URL parameters. + * + * @param {string} logTrackingEventsParameter.sourceType + * + * @param {string} [logTrackingEventsParameter.trackEventsOptions] Possible + * values include: 'None', 'DisableSourceInfoEnrich' + * + * @param {array} logTrackingEventsParameter.events + * + * @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. + */ + logTrackingEvents(resourceGroupName: string, integrationAccountName: string, logTrackingEventsParameter: models.TrackingEventsDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + logTrackingEvents(resourceGroupName: string, integrationAccountName: string, logTrackingEventsParameter: models.TrackingEventsDefinition, callback: ServiceCallback): void; + logTrackingEvents(resourceGroupName: string, integrationAccountName: string, logTrackingEventsParameter: models.TrackingEventsDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Regenerates the integration account access key. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} regenerateAccessKeyParameter The access key type. + * + * @param {string} [regenerateAccessKeyParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + regenerateAccessKeyWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, regenerateAccessKeyParameter: models.RegenerateActionParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Regenerates the integration account access key. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} regenerateAccessKeyParameter The access key type. + * + * @param {string} [regenerateAccessKeyParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {IntegrationAccount} - 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. + * + * {IntegrationAccount} [result] - The deserialized result object if an error did not occur. + * See {@link IntegrationAccount} 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. + */ + regenerateAccessKey(resourceGroupName: string, integrationAccountName: string, regenerateAccessKeyParameter: models.RegenerateActionParameter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + regenerateAccessKey(resourceGroupName: string, integrationAccountName: string, regenerateAccessKeyParameter: models.RegenerateActionParameter, callback: ServiceCallback): void; + regenerateAccessKey(resourceGroupName: string, integrationAccountName: string, regenerateAccessKeyParameter: models.RegenerateActionParameter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of integration accounts by subscription. + * + * @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>; + + /** + * Gets a list of integration accounts by subscription. + * + * @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 {IntegrationAccountListResult} - 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. + * + * {IntegrationAccountListResult} [result] - The deserialized result object if an error did not occur. + * See {@link IntegrationAccountListResult} 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; + + + /** + * Gets a list of integration accounts by resource group. + * + * @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>; + + /** + * Gets a list of integration accounts by resource group. + * + * @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 {IntegrationAccountListResult} - 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. + * + * {IntegrationAccountListResult} [result] - The deserialized result object if an error did not occur. + * See {@link IntegrationAccountListResult} 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; +} + +/** + * @class + * IntegrationAccountAssemblies + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface IntegrationAccountAssemblies { + + + /** + * List the assemblies for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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. + */ + listWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List the assemblies for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 {AssemblyCollection} - 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. + * + * {AssemblyCollection} [result] - The deserialized result object if an error did not occur. + * See {@link AssemblyCollection} 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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, integrationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, integrationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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. + */ + getWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 {AssemblyDefinition} - 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. + * + * {AssemblyDefinition} [result] - The deserialized result object if an error did not occur. + * See {@link AssemblyDefinition} 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, integrationAccountName: string, assemblyArtifactName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or update an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact name. + * + * @param {object} assemblyArtifact The assembly artifact. + * + * @param {object} assemblyArtifact.properties The assembly properties. + * + * @param {string} assemblyArtifact.properties.assemblyName The assembly name. + * + * @param {string} [assemblyArtifact.properties.assemblyVersion] The assembly + * version. + * + * @param {string} [assemblyArtifact.properties.assemblyCulture] The assembly + * culture. + * + * @param {string} [assemblyArtifact.properties.assemblyPublicKeyToken] The + * assembly public key token. + * + * @param {object} [assemblyArtifact.properties.content] + * + * @param {string} [assemblyArtifact.properties.contentType] The content type. + * + * @param {object} [assemblyArtifact.properties.contentLink] The content link. + * + * @param {string} [assemblyArtifact.properties.contentLink.uri] The content + * link URI. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentVersion] The + * content version. + * + * @param {number} [assemblyArtifact.properties.contentLink.contentSize] The + * content size. + * + * @param {object} [assemblyArtifact.properties.contentLink.contentHash] The + * content hash. + * + * @param {string} + * [assemblyArtifact.properties.contentLink.contentHash.algorithm] The + * algorithm of the content hash. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentHash.value] + * The value of the content hash. + * + * @param {object} [assemblyArtifact.properties.contentLink.metadata] The + * metadata. + * + * @param {string} [assemblyArtifact.location] The resource location. + * + * @param {object} [assemblyArtifact.tags] The resource tags. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, assemblyArtifact: models.AssemblyDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact name. + * + * @param {object} assemblyArtifact The assembly artifact. + * + * @param {object} assemblyArtifact.properties The assembly properties. + * + * @param {string} assemblyArtifact.properties.assemblyName The assembly name. + * + * @param {string} [assemblyArtifact.properties.assemblyVersion] The assembly + * version. + * + * @param {string} [assemblyArtifact.properties.assemblyCulture] The assembly + * culture. + * + * @param {string} [assemblyArtifact.properties.assemblyPublicKeyToken] The + * assembly public key token. + * + * @param {object} [assemblyArtifact.properties.content] + * + * @param {string} [assemblyArtifact.properties.contentType] The content type. + * + * @param {object} [assemblyArtifact.properties.contentLink] The content link. + * + * @param {string} [assemblyArtifact.properties.contentLink.uri] The content + * link URI. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentVersion] The + * content version. + * + * @param {number} [assemblyArtifact.properties.contentLink.contentSize] The + * content size. + * + * @param {object} [assemblyArtifact.properties.contentLink.contentHash] The + * content hash. + * + * @param {string} + * [assemblyArtifact.properties.contentLink.contentHash.algorithm] The + * algorithm of the content hash. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentHash.value] + * The value of the content hash. + * + * @param {object} [assemblyArtifact.properties.contentLink.metadata] The + * metadata. + * + * @param {string} [assemblyArtifact.location] The resource location. + * + * @param {object} [assemblyArtifact.tags] The resource tags. + * + * @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 {AssemblyDefinition} - 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. + * + * {AssemblyDefinition} [result] - The deserialized result object if an error did not occur. + * See {@link AssemblyDefinition} 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. + */ + createOrUpdate(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, assemblyArtifact: models.AssemblyDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, assemblyArtifact: models.AssemblyDefinition, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, assemblyArtifact: models.AssemblyDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 {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, integrationAccountName: string, assemblyArtifactName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get the content callback url for an integration account assembly. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get the content callback url for an integration account assembly. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 {WorkflowTriggerCallbackUrl} - 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. + * + * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, callback: ServiceCallback): void; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, assemblyArtifactName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * IntegrationAccountBatchConfigurations + * __NOTE__: An instance of this class is automatically created for an + * instance of the LogicManagementClient. + */ +export interface IntegrationAccountBatchConfigurations { + + + /** + * List the batch configurations for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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. + */ + listWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List the batch configurations for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 {BatchConfigurationCollection} - 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. + * + * {BatchConfigurationCollection} [result] - The deserialized result object if an error did not occur. + * See {@link BatchConfigurationCollection} 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, integrationAccountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, integrationAccountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, integrationAccountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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. + */ + getWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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 {BatchConfiguration} - 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. + * + * {BatchConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link BatchConfiguration} 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, integrationAccountName: string, batchConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Create or update a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration name. + * + * @param {object} batchConfiguration The batch configuration. + * + * @param {object} batchConfiguration.properties The batch configuration + * properties. + * + * @param {string} batchConfiguration.properties.batchGroupName The name of the + * batch group. + * + * @param {object} batchConfiguration.properties.releaseCriteria The batch + * release criteria. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.messageCount] + * The message count. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.batchSize] + * The batch size in bytes. + * + * @param {object} [batchConfiguration.properties.releaseCriteria.recurrence] + * The recurrence. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.frequency] The + * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', + * 'Hour', 'Day', 'Week', 'Month', 'Year' + * + * @param {number} + * [batchConfiguration.properties.releaseCriteria.recurrence.interval] The + * interval. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.startTime] The + * start time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.endTime] The end + * time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.timeZone] The time + * zone. + * + * @param {object} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule] The + * recurrence schedule. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.minutes] + * The minutes. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.hours] + * The hours. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.weekDays] + * The days of the week. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthDays] + * The month days. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] + * The monthly occurrences. + * + * @param {date} [batchConfiguration.properties.createdTime] The artifact + * creation time. + * + * @param {date} [batchConfiguration.properties.changedTime] The artifact + * changed time. + * + * @param {object} [batchConfiguration.properties.metadata] + * + * @param {string} [batchConfiguration.location] The resource location. + * + * @param {object} [batchConfiguration.tags] The resource tags. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, batchConfiguration: models.BatchConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration name. + * + * @param {object} batchConfiguration The batch configuration. + * + * @param {object} batchConfiguration.properties The batch configuration + * properties. + * + * @param {string} batchConfiguration.properties.batchGroupName The name of the + * batch group. + * + * @param {object} batchConfiguration.properties.releaseCriteria The batch + * release criteria. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.messageCount] + * The message count. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.batchSize] + * The batch size in bytes. + * + * @param {object} [batchConfiguration.properties.releaseCriteria.recurrence] + * The recurrence. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.frequency] The + * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', + * 'Hour', 'Day', 'Week', 'Month', 'Year' + * + * @param {number} + * [batchConfiguration.properties.releaseCriteria.recurrence.interval] The + * interval. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.startTime] The + * start time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.endTime] The end + * time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.timeZone] The time + * zone. + * + * @param {object} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule] The + * recurrence schedule. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.minutes] + * The minutes. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.hours] + * The hours. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.weekDays] + * The days of the week. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthDays] + * The month days. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] + * The monthly occurrences. + * + * @param {date} [batchConfiguration.properties.createdTime] The artifact + * creation time. + * + * @param {date} [batchConfiguration.properties.changedTime] The artifact + * changed time. + * + * @param {object} [batchConfiguration.properties.metadata] + * + * @param {string} [batchConfiguration.location] The resource location. + * + * @param {object} [batchConfiguration.tags] The resource tags. + * + * @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 {BatchConfiguration} - 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. + * + * {BatchConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link BatchConfiguration} 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. + */ + createOrUpdate(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, batchConfiguration: models.BatchConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, batchConfiguration: models.BatchConfiguration, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, batchConfiguration: models.BatchConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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 {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, integrationAccountName: string, batchConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, integrationAccountName: string, batchConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -2980,6 +5018,7 @@ export interface Schemas { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: SchemaType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3005,6 +5044,7 @@ export interface Schemas { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: SchemaType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3269,6 +5309,84 @@ export interface Schemas { deleteMethod(resourceGroupName: string, integrationAccountName: string, schemaName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} schemaName The integration account schema name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, schemaName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} schemaName The integration account schema name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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. + * + * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, schemaName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, schemaName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, callback: ServiceCallback): void; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, schemaName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets a list of integration account schemas. * @@ -3349,6 +5467,7 @@ export interface Maps { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: MapType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3374,6 +5493,7 @@ export interface Maps { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: MapType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3634,6 +5754,84 @@ export interface Maps { deleteMethod(resourceGroupName: string, integrationAccountName: string, mapName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} mapName The integration account map name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, mapName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} mapName The integration account map name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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. + * + * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, mapName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, mapName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, callback: ServiceCallback): void; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, mapName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets a list of integration account maps. * @@ -3714,6 +5912,7 @@ export interface Partners { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: PartnerType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3739,6 +5938,7 @@ export interface Partners { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: PartnerType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3997,6 +6197,84 @@ export interface Partners { deleteMethod(resourceGroupName: string, integrationAccountName: string, partnerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} partnerName The integration account partner name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, partnerName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} partnerName The integration account partner name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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. + * + * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, partnerName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, partnerName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, callback: ServiceCallback): void; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, partnerName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets a list of integration account partners. * @@ -4077,6 +6355,7 @@ export interface Agreements { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: AgreementType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4102,6 +6381,7 @@ export interface Agreements { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: AgreementType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6320,6 +8600,84 @@ export interface Agreements { deleteMethod(resourceGroupName: string, integrationAccountName: string, agreementName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} agreementName The integration account agreement name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName: string, integrationAccountName: string, agreementName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} agreementName The integration account agreement name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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. + * + * {WorkflowTriggerCallbackUrl} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, agreementName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, agreementName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, callback: ServiceCallback): void; + listContentCallbackUrl(resourceGroupName: string, integrationAccountName: string, agreementName: string, listContentCallbackUrlParameter: models.GetCallbackUrlParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets a list of integration account agreements. * @@ -6765,6 +9123,7 @@ export interface Sessions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: ChangedTime. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6790,6 +9149,7 @@ export interface Sessions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: ChangedTime. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/logicManagement/lib/operations/index.js b/lib/services/logicManagement/lib/operations/index.js index a241438280..36fee3a5e8 100644 --- a/lib/services/logicManagement/lib/operations/index.js +++ b/lib/services/logicManagement/lib/operations/index.js @@ -20,7 +20,12 @@ exports.WorkflowTriggers = require('./workflowTriggers'); exports.WorkflowTriggerHistories = require('./workflowTriggerHistories'); exports.WorkflowRuns = require('./workflowRuns'); exports.WorkflowRunActions = require('./workflowRunActions'); +exports.WorkflowRunActionRepetitions = require('./workflowRunActionRepetitions'); +exports.WorkflowRunActionScopedRepetitions = require('./workflowRunActionScopedRepetitions'); +exports.WorkflowRunOperations = require('./workflowRunOperations'); exports.IntegrationAccounts = require('./integrationAccounts'); +exports.IntegrationAccountAssemblies = require('./integrationAccountAssemblies'); +exports.IntegrationAccountBatchConfigurations = require('./integrationAccountBatchConfigurations'); exports.Schemas = require('./schemas'); exports.Maps = require('./maps'); exports.Partners = require('./partners'); diff --git a/lib/services/logicManagement/lib/operations/integrationAccountAssemblies.js b/lib/services/logicManagement/lib/operations/integrationAccountAssemblies.js new file mode 100644 index 0000000000..89c9d4de3a --- /dev/null +++ b/lib/services/logicManagement/lib/operations/integrationAccountAssemblies.js @@ -0,0 +1,1387 @@ +/* + * 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; + +/** + * List the assemblies for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 AssemblyCollection} 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, integrationAccountName, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/assemblies'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['AssemblyCollection']().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); + }); +} + +/** + * Get an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 AssemblyDefinition} 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, integrationAccountName, assemblyArtifactName, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (assemblyArtifactName === null || assemblyArtifactName === undefined || typeof assemblyArtifactName.valueOf() !== 'string') { + throw new Error('assemblyArtifactName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{assemblyArtifactName}', encodeURIComponent(assemblyArtifactName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['AssemblyDefinition']().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); + }); +} + +/** + * Create or update an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact name. + * + * @param {object} assemblyArtifact The assembly artifact. + * + * @param {object} assemblyArtifact.properties The assembly properties. + * + * @param {string} assemblyArtifact.properties.assemblyName The assembly name. + * + * @param {string} [assemblyArtifact.properties.assemblyVersion] The assembly + * version. + * + * @param {string} [assemblyArtifact.properties.assemblyCulture] The assembly + * culture. + * + * @param {string} [assemblyArtifact.properties.assemblyPublicKeyToken] The + * assembly public key token. + * + * @param {object} [assemblyArtifact.properties.content] + * + * @param {string} [assemblyArtifact.properties.contentType] The content type. + * + * @param {object} [assemblyArtifact.properties.contentLink] The content link. + * + * @param {string} [assemblyArtifact.properties.contentLink.uri] The content + * link URI. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentVersion] The + * content version. + * + * @param {number} [assemblyArtifact.properties.contentLink.contentSize] The + * content size. + * + * @param {object} [assemblyArtifact.properties.contentLink.contentHash] The + * content hash. + * + * @param {string} + * [assemblyArtifact.properties.contentLink.contentHash.algorithm] The + * algorithm of the content hash. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentHash.value] + * The value of the content hash. + * + * @param {object} [assemblyArtifact.properties.contentLink.metadata] The + * metadata. + * + * @param {string} [assemblyArtifact.location] The resource location. + * + * @param {object} [assemblyArtifact.tags] The resource tags. + * + * @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 AssemblyDefinition} 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 _createOrUpdate(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (assemblyArtifactName === null || assemblyArtifactName === undefined || typeof assemblyArtifactName.valueOf() !== 'string') { + throw new Error('assemblyArtifactName cannot be null or undefined and it must be of type string.'); + } + if (assemblyArtifact === null || assemblyArtifact === undefined) { + throw new Error('assemblyArtifact cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{assemblyArtifactName}', encodeURIComponent(assemblyArtifactName)); + 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 (assemblyArtifact !== null && assemblyArtifact !== undefined) { + let requestModelMapper = new client.models['AssemblyDefinition']().mapper(); + requestModel = client.serialize(requestModelMapper, assemblyArtifact, 'assemblyArtifact'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(assemblyArtifact, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['AssemblyDefinition']().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['AssemblyDefinition']().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); + }); +} + +/** + * Delete an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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. + * + * {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, integrationAccountName, assemblyArtifactName, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (assemblyArtifactName === null || assemblyArtifactName === undefined || typeof assemblyArtifactName.valueOf() !== 'string') { + throw new Error('assemblyArtifactName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{assemblyArtifactName}', encodeURIComponent(assemblyArtifactName)); + 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 !== 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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); + }); +} + +/** + * Get the content callback url for an integration account assembly. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 WorkflowTriggerCallbackUrl} 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 _listContentCallbackUrl(resourceGroupName, integrationAccountName, assemblyArtifactName, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (assemblyArtifactName === null || assemblyArtifactName === undefined || typeof assemblyArtifactName.valueOf() !== 'string') { + throw new Error('assemblyArtifactName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{assemblyArtifactName}', encodeURIComponent(assemblyArtifactName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowTriggerCallbackUrl']().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 IntegrationAccountAssemblies. */ +class IntegrationAccountAssemblies { + /** + * Create a IntegrationAccountAssemblies. + * @param {LogicManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._listContentCallbackUrl = _listContentCallbackUrl; + } + + /** + * List the assemblies for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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. + */ + listWithHttpOperationResponse(resourceGroupName, integrationAccountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, integrationAccountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List the assemblies for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 {AssemblyCollection} - 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 AssemblyCollection} 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, integrationAccountName, 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, integrationAccountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, integrationAccountName, options, optionalCallback); + } + } + + /** + * Get an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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, integrationAccountName, assemblyArtifactName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, integrationAccountName, assemblyArtifactName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 {AssemblyDefinition} - 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 AssemblyDefinition} 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, integrationAccountName, assemblyArtifactName, 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, integrationAccountName, assemblyArtifactName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, integrationAccountName, assemblyArtifactName, options, optionalCallback); + } + } + + /** + * Create or update an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact name. + * + * @param {object} assemblyArtifact The assembly artifact. + * + * @param {object} assemblyArtifact.properties The assembly properties. + * + * @param {string} assemblyArtifact.properties.assemblyName The assembly name. + * + * @param {string} [assemblyArtifact.properties.assemblyVersion] The assembly + * version. + * + * @param {string} [assemblyArtifact.properties.assemblyCulture] The assembly + * culture. + * + * @param {string} [assemblyArtifact.properties.assemblyPublicKeyToken] The + * assembly public key token. + * + * @param {object} [assemblyArtifact.properties.content] + * + * @param {string} [assemblyArtifact.properties.contentType] The content type. + * + * @param {object} [assemblyArtifact.properties.contentLink] The content link. + * + * @param {string} [assemblyArtifact.properties.contentLink.uri] The content + * link URI. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentVersion] The + * content version. + * + * @param {number} [assemblyArtifact.properties.contentLink.contentSize] The + * content size. + * + * @param {object} [assemblyArtifact.properties.contentLink.contentHash] The + * content hash. + * + * @param {string} + * [assemblyArtifact.properties.contentLink.contentHash.algorithm] The + * algorithm of the content hash. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentHash.value] + * The value of the content hash. + * + * @param {object} [assemblyArtifact.properties.contentLink.metadata] The + * metadata. + * + * @param {string} [assemblyArtifact.location] The resource location. + * + * @param {object} [assemblyArtifact.tags] The resource tags. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact name. + * + * @param {object} assemblyArtifact The assembly artifact. + * + * @param {object} assemblyArtifact.properties The assembly properties. + * + * @param {string} assemblyArtifact.properties.assemblyName The assembly name. + * + * @param {string} [assemblyArtifact.properties.assemblyVersion] The assembly + * version. + * + * @param {string} [assemblyArtifact.properties.assemblyCulture] The assembly + * culture. + * + * @param {string} [assemblyArtifact.properties.assemblyPublicKeyToken] The + * assembly public key token. + * + * @param {object} [assemblyArtifact.properties.content] + * + * @param {string} [assemblyArtifact.properties.contentType] The content type. + * + * @param {object} [assemblyArtifact.properties.contentLink] The content link. + * + * @param {string} [assemblyArtifact.properties.contentLink.uri] The content + * link URI. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentVersion] The + * content version. + * + * @param {number} [assemblyArtifact.properties.contentLink.contentSize] The + * content size. + * + * @param {object} [assemblyArtifact.properties.contentLink.contentHash] The + * content hash. + * + * @param {string} + * [assemblyArtifact.properties.contentLink.contentHash.algorithm] The + * algorithm of the content hash. + * + * @param {string} [assemblyArtifact.properties.contentLink.contentHash.value] + * The value of the content hash. + * + * @param {object} [assemblyArtifact.properties.contentLink.metadata] The + * metadata. + * + * @param {string} [assemblyArtifact.location] The resource location. + * + * @param {object} [assemblyArtifact.tags] The resource tags. + * + * @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 {AssemblyDefinition} - 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 AssemblyDefinition} 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. + */ + createOrUpdate(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, 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._createOrUpdate(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, options, optionalCallback); + } + } + + /** + * Delete an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, integrationAccountName, assemblyArtifactName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, integrationAccountName, assemblyArtifactName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete an assembly for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 {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, integrationAccountName, assemblyArtifactName, 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, integrationAccountName, assemblyArtifactName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, integrationAccountName, assemblyArtifactName, options, optionalCallback); + } + } + + /** + * Get the content callback url for an integration account assembly. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName, integrationAccountName, assemblyArtifactName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listContentCallbackUrl(resourceGroupName, integrationAccountName, assemblyArtifactName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get the content callback url for an integration account assembly. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} assemblyArtifactName The assembly artifact 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 {WorkflowTriggerCallbackUrl} - 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 WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName, integrationAccountName, assemblyArtifactName, 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._listContentCallbackUrl(resourceGroupName, integrationAccountName, assemblyArtifactName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listContentCallbackUrl(resourceGroupName, integrationAccountName, assemblyArtifactName, options, optionalCallback); + } + } + +} + +module.exports = IntegrationAccountAssemblies; diff --git a/lib/services/logicManagement/lib/operations/integrationAccountBatchConfigurations.js b/lib/services/logicManagement/lib/operations/integrationAccountBatchConfigurations.js new file mode 100644 index 0000000000..94bb5b984a --- /dev/null +++ b/lib/services/logicManagement/lib/operations/integrationAccountBatchConfigurations.js @@ -0,0 +1,1235 @@ +/* + * 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; + +/** + * List the batch configurations for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 BatchConfigurationCollection} 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, integrationAccountName, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['BatchConfigurationCollection']().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); + }); +} + +/** + * Get a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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 BatchConfiguration} 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, integrationAccountName, batchConfigurationName, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (batchConfigurationName === null || batchConfigurationName === undefined || typeof batchConfigurationName.valueOf() !== 'string') { + throw new Error('batchConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{batchConfigurationName}', encodeURIComponent(batchConfigurationName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['BatchConfiguration']().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); + }); +} + +/** + * Create or update a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration name. + * + * @param {object} batchConfiguration The batch configuration. + * + * @param {object} batchConfiguration.properties The batch configuration + * properties. + * + * @param {string} batchConfiguration.properties.batchGroupName The name of the + * batch group. + * + * @param {object} batchConfiguration.properties.releaseCriteria The batch + * release criteria. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.messageCount] + * The message count. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.batchSize] + * The batch size in bytes. + * + * @param {object} [batchConfiguration.properties.releaseCriteria.recurrence] + * The recurrence. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.frequency] The + * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', + * 'Hour', 'Day', 'Week', 'Month', 'Year' + * + * @param {number} + * [batchConfiguration.properties.releaseCriteria.recurrence.interval] The + * interval. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.startTime] The + * start time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.endTime] The end + * time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.timeZone] The time + * zone. + * + * @param {object} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule] The + * recurrence schedule. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.minutes] + * The minutes. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.hours] + * The hours. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.weekDays] + * The days of the week. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthDays] + * The month days. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] + * The monthly occurrences. + * + * @param {date} [batchConfiguration.properties.createdTime] The artifact + * creation time. + * + * @param {date} [batchConfiguration.properties.changedTime] The artifact + * changed time. + * + * @param {object} [batchConfiguration.properties.metadata] + * + * @param {string} [batchConfiguration.location] The resource location. + * + * @param {object} [batchConfiguration.tags] The resource tags. + * + * @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 BatchConfiguration} 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 _createOrUpdate(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (batchConfigurationName === null || batchConfigurationName === undefined || typeof batchConfigurationName.valueOf() !== 'string') { + throw new Error('batchConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (batchConfiguration === null || batchConfiguration === undefined) { + throw new Error('batchConfiguration cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{batchConfigurationName}', encodeURIComponent(batchConfigurationName)); + 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 (batchConfiguration !== null && batchConfiguration !== undefined) { + let requestModelMapper = new client.models['BatchConfiguration']().mapper(); + requestModel = client.serialize(requestModelMapper, batchConfiguration, 'batchConfiguration'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batchConfiguration, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['BatchConfiguration']().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['BatchConfiguration']().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); + }); +} + +/** + * Delete a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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. + * + * {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, integrationAccountName, batchConfigurationName, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (batchConfigurationName === null || batchConfigurationName === undefined || typeof batchConfigurationName.valueOf() !== 'string') { + throw new Error('batchConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{batchConfigurationName}', encodeURIComponent(batchConfigurationName)); + 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 !== 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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); + }); +} + +/** Class representing a IntegrationAccountBatchConfigurations. */ +class IntegrationAccountBatchConfigurations { + /** + * Create a IntegrationAccountBatchConfigurations. + * @param {LogicManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + } + + /** + * List the batch configurations for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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. + */ + listWithHttpOperationResponse(resourceGroupName, integrationAccountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, integrationAccountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List the batch configurations for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account 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 {BatchConfigurationCollection} - 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 BatchConfigurationCollection} 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, integrationAccountName, 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, integrationAccountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, integrationAccountName, options, optionalCallback); + } + } + + /** + * Get a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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, integrationAccountName, batchConfigurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, integrationAccountName, batchConfigurationName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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 {BatchConfiguration} - 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 BatchConfiguration} 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, integrationAccountName, batchConfigurationName, 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, integrationAccountName, batchConfigurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, integrationAccountName, batchConfigurationName, options, optionalCallback); + } + } + + /** + * Create or update a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration name. + * + * @param {object} batchConfiguration The batch configuration. + * + * @param {object} batchConfiguration.properties The batch configuration + * properties. + * + * @param {string} batchConfiguration.properties.batchGroupName The name of the + * batch group. + * + * @param {object} batchConfiguration.properties.releaseCriteria The batch + * release criteria. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.messageCount] + * The message count. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.batchSize] + * The batch size in bytes. + * + * @param {object} [batchConfiguration.properties.releaseCriteria.recurrence] + * The recurrence. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.frequency] The + * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', + * 'Hour', 'Day', 'Week', 'Month', 'Year' + * + * @param {number} + * [batchConfiguration.properties.releaseCriteria.recurrence.interval] The + * interval. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.startTime] The + * start time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.endTime] The end + * time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.timeZone] The time + * zone. + * + * @param {object} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule] The + * recurrence schedule. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.minutes] + * The minutes. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.hours] + * The hours. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.weekDays] + * The days of the week. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthDays] + * The month days. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] + * The monthly occurrences. + * + * @param {date} [batchConfiguration.properties.createdTime] The artifact + * creation time. + * + * @param {date} [batchConfiguration.properties.changedTime] The artifact + * changed time. + * + * @param {object} [batchConfiguration.properties.metadata] + * + * @param {string} [batchConfiguration.location] The resource location. + * + * @param {object} [batchConfiguration.tags] The resource tags. + * + * @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. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration name. + * + * @param {object} batchConfiguration The batch configuration. + * + * @param {object} batchConfiguration.properties The batch configuration + * properties. + * + * @param {string} batchConfiguration.properties.batchGroupName The name of the + * batch group. + * + * @param {object} batchConfiguration.properties.releaseCriteria The batch + * release criteria. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.messageCount] + * The message count. + * + * @param {number} [batchConfiguration.properties.releaseCriteria.batchSize] + * The batch size in bytes. + * + * @param {object} [batchConfiguration.properties.releaseCriteria.recurrence] + * The recurrence. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.frequency] The + * frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', + * 'Hour', 'Day', 'Week', 'Month', 'Year' + * + * @param {number} + * [batchConfiguration.properties.releaseCriteria.recurrence.interval] The + * interval. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.startTime] The + * start time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.endTime] The end + * time. + * + * @param {string} + * [batchConfiguration.properties.releaseCriteria.recurrence.timeZone] The time + * zone. + * + * @param {object} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule] The + * recurrence schedule. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.minutes] + * The minutes. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.hours] + * The hours. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.weekDays] + * The days of the week. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthDays] + * The month days. + * + * @param {array} + * [batchConfiguration.properties.releaseCriteria.recurrence.schedule.monthlyOccurrences] + * The monthly occurrences. + * + * @param {date} [batchConfiguration.properties.createdTime] The artifact + * creation time. + * + * @param {date} [batchConfiguration.properties.changedTime] The artifact + * changed time. + * + * @param {object} [batchConfiguration.properties.metadata] + * + * @param {string} [batchConfiguration.location] The resource location. + * + * @param {object} [batchConfiguration.tags] The resource tags. + * + * @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 {BatchConfiguration} - 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 BatchConfiguration} 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. + */ + createOrUpdate(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, 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._createOrUpdate(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, options, optionalCallback); + } + } + + /** + * Delete a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, integrationAccountName, batchConfigurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, integrationAccountName, batchConfigurationName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a batch configuration for an integration account. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} batchConfigurationName The batch configuration 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 {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, integrationAccountName, batchConfigurationName, 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, integrationAccountName, batchConfigurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, integrationAccountName, batchConfigurationName, options, optionalCallback); + } + } + +} + +module.exports = IntegrationAccountBatchConfigurations; diff --git a/lib/services/logicManagement/lib/operations/integrationAccounts.js b/lib/services/logicManagement/lib/operations/integrationAccounts.js index f5cf75c8e3..152cad7988 100644 --- a/lib/services/logicManagement/lib/operations/integrationAccounts.js +++ b/lib/services/logicManagement/lib/operations/integrationAccounts.js @@ -1118,6 +1118,494 @@ function _getCallbackUrl(resourceGroupName, integrationAccountName, parameters, }); } +/** + * Gets the integration account's Key Vault keys. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} listKeyVaultKeysParameter The key vault parameters. + * + * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. + * + * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. + * + * @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 KeyVaultKeyCollection} 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 _listKeyVaultKeys(resourceGroupName, integrationAccountName, listKeyVaultKeysParameter, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (listKeyVaultKeysParameter === null || listKeyVaultKeysParameter === undefined) { + throw new Error('listKeyVaultKeysParameter 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.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (listKeyVaultKeysParameter !== null && listKeyVaultKeysParameter !== undefined) { + let requestModelMapper = new client.models['ListKeyVaultKeysDefinition']().mapper(); + requestModel = client.serialize(requestModelMapper, listKeyVaultKeysParameter, 'listKeyVaultKeysParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(listKeyVaultKeysParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['KeyVaultKeyCollection']().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); + }); +} + +/** + * Logs the integration account's tracking events. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} logTrackingEventsParameter The callback URL parameters. + * + * @param {string} logTrackingEventsParameter.sourceType + * + * @param {string} [logTrackingEventsParameter.trackEventsOptions] Possible + * values include: 'None', 'DisableSourceInfoEnrich' + * + * @param {array} logTrackingEventsParameter.events + * + * @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 _logTrackingEvents(resourceGroupName, integrationAccountName, logTrackingEventsParameter, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (logTrackingEventsParameter === null || logTrackingEventsParameter === undefined) { + throw new Error('logTrackingEventsParameter 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.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (logTrackingEventsParameter !== null && logTrackingEventsParameter !== undefined) { + let requestModelMapper = new client.models['TrackingEventsDefinition']().mapper(); + requestModel = client.serialize(requestModelMapper, logTrackingEventsParameter, 'logTrackingEventsParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(logTrackingEventsParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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); + }); +} + +/** + * Regenerates the integration account access key. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} regenerateAccessKeyParameter The access key type. + * + * @param {string} [regenerateAccessKeyParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 IntegrationAccount} 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 _regenerateAccessKey(resourceGroupName, integrationAccountName, regenerateAccessKeyParameter, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (regenerateAccessKeyParameter === null || regenerateAccessKeyParameter === undefined) { + throw new Error('regenerateAccessKeyParameter 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.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (regenerateAccessKeyParameter !== null && regenerateAccessKeyParameter !== undefined) { + let requestModelMapper = new client.models['RegenerateActionParameter']().mapper(); + requestModel = client.serialize(requestModelMapper, regenerateAccessKeyParameter, 'regenerateAccessKeyParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(regenerateAccessKeyParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['IntegrationAccount']().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); + }); +} + /** * Gets a list of integration accounts by subscription. * @@ -1389,6 +1877,9 @@ class IntegrationAccounts { this._update = _update; this._deleteMethod = _deleteMethod; this._getCallbackUrl = _getCallbackUrl; + this._listKeyVaultKeys = _listKeyVaultKeys; + this._logTrackingEvents = _logTrackingEvents; + this._regenerateAccessKey = _regenerateAccessKey; this._listBySubscriptionNext = _listBySubscriptionNext; this._listByResourceGroupNext = _listByResourceGroupNext; } @@ -2066,6 +2557,303 @@ class IntegrationAccounts { } } + /** + * Gets the integration account's Key Vault keys. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} listKeyVaultKeysParameter The key vault parameters. + * + * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. + * + * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. + * + * @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. + */ + listKeyVaultKeysWithHttpOperationResponse(resourceGroupName, integrationAccountName, listKeyVaultKeysParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listKeyVaultKeys(resourceGroupName, integrationAccountName, listKeyVaultKeysParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} listKeyVaultKeysParameter The key vault parameters. + * + * @param {object} listKeyVaultKeysParameter.keyVault The key vault reference. + * + * @param {string} [listKeyVaultKeysParameter.skipToken] The skip token. + * + * @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 {KeyVaultKeyCollection} - 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 KeyVaultKeyCollection} 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. + */ + listKeyVaultKeys(resourceGroupName, integrationAccountName, listKeyVaultKeysParameter, 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._listKeyVaultKeys(resourceGroupName, integrationAccountName, listKeyVaultKeysParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listKeyVaultKeys(resourceGroupName, integrationAccountName, listKeyVaultKeysParameter, options, optionalCallback); + } + } + + /** + * Logs the integration account's tracking events. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} logTrackingEventsParameter The callback URL parameters. + * + * @param {string} logTrackingEventsParameter.sourceType + * + * @param {string} [logTrackingEventsParameter.trackEventsOptions] Possible + * values include: 'None', 'DisableSourceInfoEnrich' + * + * @param {array} logTrackingEventsParameter.events + * + * @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. + */ + logTrackingEventsWithHttpOperationResponse(resourceGroupName, integrationAccountName, logTrackingEventsParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._logTrackingEvents(resourceGroupName, integrationAccountName, logTrackingEventsParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Logs the integration account's tracking events. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} logTrackingEventsParameter The callback URL parameters. + * + * @param {string} logTrackingEventsParameter.sourceType + * + * @param {string} [logTrackingEventsParameter.trackEventsOptions] Possible + * values include: 'None', 'DisableSourceInfoEnrich' + * + * @param {array} logTrackingEventsParameter.events + * + * @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. + */ + logTrackingEvents(resourceGroupName, integrationAccountName, logTrackingEventsParameter, 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._logTrackingEvents(resourceGroupName, integrationAccountName, logTrackingEventsParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._logTrackingEvents(resourceGroupName, integrationAccountName, logTrackingEventsParameter, options, optionalCallback); + } + } + + /** + * Regenerates the integration account access key. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} regenerateAccessKeyParameter The access key type. + * + * @param {string} [regenerateAccessKeyParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + regenerateAccessKeyWithHttpOperationResponse(resourceGroupName, integrationAccountName, regenerateAccessKeyParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._regenerateAccessKey(resourceGroupName, integrationAccountName, regenerateAccessKeyParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Regenerates the integration account access key. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {object} regenerateAccessKeyParameter The access key type. + * + * @param {string} [regenerateAccessKeyParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {IntegrationAccount} - 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 IntegrationAccount} 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. + */ + regenerateAccessKey(resourceGroupName, integrationAccountName, regenerateAccessKeyParameter, 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._regenerateAccessKey(resourceGroupName, integrationAccountName, regenerateAccessKeyParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._regenerateAccessKey(resourceGroupName, integrationAccountName, regenerateAccessKeyParameter, options, optionalCallback); + } + } + /** * Gets a list of integration accounts by subscription. * diff --git a/lib/services/logicManagement/lib/operations/maps.js b/lib/services/logicManagement/lib/operations/maps.js index a8cdb5aab2..b6cf6742f1 100644 --- a/lib/services/logicManagement/lib/operations/maps.js +++ b/lib/services/logicManagement/lib/operations/maps.js @@ -27,6 +27,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: MapType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -668,6 +669,182 @@ function _deleteMethod(resourceGroupName, integrationAccountName, mapName, optio }); } +/** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} mapName The integration account map name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 WorkflowTriggerCallbackUrl} 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 _listContentCallbackUrl(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrlParameter, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (mapName === null || mapName === undefined || typeof mapName.valueOf() !== 'string') { + throw new Error('mapName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (listContentCallbackUrlParameter === null || listContentCallbackUrlParameter === undefined) { + throw new Error('listContentCallbackUrlParameter 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.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{mapName}', encodeURIComponent(mapName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (listContentCallbackUrlParameter !== null && listContentCallbackUrlParameter !== undefined) { + let requestModelMapper = new client.models['GetCallbackUrlParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, listContentCallbackUrlParameter, 'listContentCallbackUrlParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(listContentCallbackUrlParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowTriggerCallbackUrl']().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); + }); +} + /** * Gets a list of integration account maps. * @@ -808,6 +985,7 @@ class Maps { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._listContentCallbackUrl = _listContentCallbackUrl; this._listByIntegrationAccountsNext = _listByIntegrationAccountsNext; } @@ -824,6 +1002,7 @@ class Maps { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: MapType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -861,6 +1040,7 @@ class Maps { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: MapType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1217,6 +1397,111 @@ class Maps { } } + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} mapName The integration account map name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrlParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listContentCallbackUrl(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} mapName The integration account map name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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 WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrlParameter, 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._listContentCallbackUrl(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listContentCallbackUrl(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrlParameter, options, optionalCallback); + } + } + /** * Gets a list of integration account maps. * diff --git a/lib/services/logicManagement/lib/operations/partners.js b/lib/services/logicManagement/lib/operations/partners.js index 422efd49b0..2d129d4d95 100644 --- a/lib/services/logicManagement/lib/operations/partners.js +++ b/lib/services/logicManagement/lib/operations/partners.js @@ -27,6 +27,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: PartnerType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -668,6 +669,182 @@ function _deleteMethod(resourceGroupName, integrationAccountName, partnerName, o }); } +/** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} partnerName The integration account partner name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 WorkflowTriggerCallbackUrl} 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 _listContentCallbackUrl(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrlParameter, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (partnerName === null || partnerName === undefined || typeof partnerName.valueOf() !== 'string') { + throw new Error('partnerName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (listContentCallbackUrlParameter === null || listContentCallbackUrlParameter === undefined) { + throw new Error('listContentCallbackUrlParameter 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.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{partnerName}', encodeURIComponent(partnerName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (listContentCallbackUrlParameter !== null && listContentCallbackUrlParameter !== undefined) { + let requestModelMapper = new client.models['GetCallbackUrlParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, listContentCallbackUrlParameter, 'listContentCallbackUrlParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(listContentCallbackUrlParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowTriggerCallbackUrl']().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); + }); +} + /** * Gets a list of integration account partners. * @@ -808,6 +985,7 @@ class Partners { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._listContentCallbackUrl = _listContentCallbackUrl; this._listByIntegrationAccountsNext = _listByIntegrationAccountsNext; } @@ -824,6 +1002,7 @@ class Partners { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: PartnerType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -861,6 +1040,7 @@ class Partners { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: PartnerType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1215,6 +1395,111 @@ class Partners { } } + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} partnerName The integration account partner name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrlParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listContentCallbackUrl(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} partnerName The integration account partner name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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 WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrlParameter, 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._listContentCallbackUrl(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listContentCallbackUrl(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrlParameter, options, optionalCallback); + } + } + /** * Gets a list of integration account partners. * diff --git a/lib/services/logicManagement/lib/operations/schemas.js b/lib/services/logicManagement/lib/operations/schemas.js index 2fa1a7109a..d1953b2bb1 100644 --- a/lib/services/logicManagement/lib/operations/schemas.js +++ b/lib/services/logicManagement/lib/operations/schemas.js @@ -27,6 +27,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: SchemaType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -671,6 +672,182 @@ function _deleteMethod(resourceGroupName, integrationAccountName, schemaName, op }); } +/** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} schemaName The integration account schema name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 WorkflowTriggerCallbackUrl} 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 _listContentCallbackUrl(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrlParameter, 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 (integrationAccountName === null || integrationAccountName === undefined || typeof integrationAccountName.valueOf() !== 'string') { + throw new Error('integrationAccountName cannot be null or undefined and it must be of type string.'); + } + if (schemaName === null || schemaName === undefined || typeof schemaName.valueOf() !== 'string') { + throw new Error('schemaName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (listContentCallbackUrlParameter === null || listContentCallbackUrlParameter === undefined) { + throw new Error('listContentCallbackUrlParameter 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.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{integrationAccountName}', encodeURIComponent(integrationAccountName)); + requestUrl = requestUrl.replace('{schemaName}', encodeURIComponent(schemaName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (listContentCallbackUrlParameter !== null && listContentCallbackUrlParameter !== undefined) { + let requestModelMapper = new client.models['GetCallbackUrlParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, listContentCallbackUrlParameter, 'listContentCallbackUrlParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(listContentCallbackUrlParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowTriggerCallbackUrl']().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); + }); +} + /** * Gets a list of integration account schemas. * @@ -811,6 +988,7 @@ class Schemas { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; + this._listContentCallbackUrl = _listContentCallbackUrl; this._listByIntegrationAccountsNext = _listByIntegrationAccountsNext; } @@ -827,6 +1005,7 @@ class Schemas { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: SchemaType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -864,6 +1043,7 @@ class Schemas { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: SchemaType. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1224,6 +1404,111 @@ class Schemas { } } + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} schemaName The integration account schema name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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. + */ + listContentCallbackUrlWithHttpOperationResponse(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrlParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listContentCallbackUrl(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get the content callback url. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} integrationAccountName The integration account name. + * + * @param {string} schemaName The integration account schema name. + * + * @param {object} listContentCallbackUrlParameter + * + * @param {date} [listContentCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listContentCallbackUrlParameter.keyType] The key type. + * Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * + * @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 {WorkflowTriggerCallbackUrl} - 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 WorkflowTriggerCallbackUrl} 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. + */ + listContentCallbackUrl(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrlParameter, 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._listContentCallbackUrl(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrlParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listContentCallbackUrl(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrlParameter, options, optionalCallback); + } + } + /** * Gets a list of integration account schemas. * diff --git a/lib/services/logicManagement/lib/operations/sessions.js b/lib/services/logicManagement/lib/operations/sessions.js index ccb3cb3098..d9d4e153a4 100644 --- a/lib/services/logicManagement/lib/operations/sessions.js +++ b/lib/services/logicManagement/lib/operations/sessions.js @@ -27,6 +27,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: ChangedTime. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -819,6 +820,7 @@ class Sessions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: ChangedTime. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -856,6 +858,7 @@ class Sessions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: ChangedTime. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/logicManagement/lib/operations/workflowRunActionRepetitions.js b/lib/services/logicManagement/lib/operations/workflowRunActionRepetitions.js new file mode 100644 index 0000000000..db2f9e6b08 --- /dev/null +++ b/lib/services/logicManagement/lib/operations/workflowRunActionRepetitions.js @@ -0,0 +1,811 @@ +/* + * 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; + +/** + * Get all of a workflow run action repetitions. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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 + * WorkflowRunActionRepetitionDefinitionCollection} 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, workflowName, runName, actionName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowRunActionRepetitionDefinitionCollection']().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); + }); +} + +/** + * Get a workflow run action repetition. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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 WorkflowRunActionRepetitionDefinition} 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, workflowName, runName, actionName, repetitionName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (repetitionName === null || repetitionName === undefined || typeof repetitionName.valueOf() !== 'string') { + throw new Error('repetitionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + requestUrl = requestUrl.replace('{repetitionName}', encodeURIComponent(repetitionName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowRunActionRepetitionDefinition']().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); + }); +} + +/** + * Lists a workflow run expression trace. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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 ExpressionTraces} 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 _listExpressionTraces(resourceGroupName, workflowName, runName, actionName, repetitionName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (repetitionName === null || repetitionName === undefined || typeof repetitionName.valueOf() !== 'string') { + throw new Error('repetitionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + requestUrl = requestUrl.replace('{repetitionName}', encodeURIComponent(repetitionName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['ExpressionTraces']().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 WorkflowRunActionRepetitions. */ +class WorkflowRunActionRepetitions { + /** + * Create a WorkflowRunActionRepetitions. + * @param {LogicManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._listExpressionTraces = _listExpressionTraces; + } + + /** + * Get all of a workflow run action repetitions. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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. + */ + listWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, workflowName, runName, actionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get all of a workflow run action repetitions. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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 {WorkflowRunActionRepetitionDefinitionCollection} - 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 + * WorkflowRunActionRepetitionDefinitionCollection} 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, workflowName, runName, actionName, 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, workflowName, runName, actionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, workflowName, runName, actionName, options, optionalCallback); + } + } + + /** + * Get a workflow run action repetition. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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, workflowName, runName, actionName, repetitionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get a workflow run action repetition. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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 {WorkflowRunActionRepetitionDefinition} - 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 WorkflowRunActionRepetitionDefinition} 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, workflowName, runName, actionName, repetitionName, 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, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, workflowName, runName, actionName, repetitionName, options, optionalCallback); + } + } + + /** + * Lists a workflow run expression trace. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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. + */ + listExpressionTracesWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, repetitionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listExpressionTraces(resourceGroupName, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists a workflow run expression trace. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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 {ExpressionTraces} - 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 ExpressionTraces} 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. + */ + listExpressionTraces(resourceGroupName, workflowName, runName, actionName, repetitionName, 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._listExpressionTraces(resourceGroupName, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listExpressionTraces(resourceGroupName, workflowName, runName, actionName, repetitionName, options, optionalCallback); + } + } + +} + +module.exports = WorkflowRunActionRepetitions; diff --git a/lib/services/logicManagement/lib/operations/workflowRunActionScopedRepetitions.js b/lib/services/logicManagement/lib/operations/workflowRunActionScopedRepetitions.js new file mode 100644 index 0000000000..534c8d8633 --- /dev/null +++ b/lib/services/logicManagement/lib/operations/workflowRunActionScopedRepetitions.js @@ -0,0 +1,549 @@ +/* + * 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; + +/** + * List the workflow run action scoped repetitions. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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 + * WorkflowRunActionRepetitionDefinitionCollection} 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, workflowName, runName, actionName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowRunActionRepetitionDefinitionCollection']().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); + }); +} + +/** + * Get a workflow run action scoped repetition. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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 WorkflowRunActionRepetitionDefinition} 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, workflowName, runName, actionName, repetitionName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (repetitionName === null || repetitionName === undefined || typeof repetitionName.valueOf() !== 'string') { + throw new Error('repetitionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + requestUrl = requestUrl.replace('{repetitionName}', encodeURIComponent(repetitionName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowRunActionRepetitionDefinition']().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 WorkflowRunActionScopedRepetitions. */ +class WorkflowRunActionScopedRepetitions { + /** + * Create a WorkflowRunActionScopedRepetitions. + * @param {LogicManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + } + + /** + * List the workflow run action scoped repetitions. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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. + */ + listWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, workflowName, runName, actionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List the workflow run action scoped repetitions. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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 {WorkflowRunActionRepetitionDefinitionCollection} - 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 + * WorkflowRunActionRepetitionDefinitionCollection} 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, workflowName, runName, actionName, 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, workflowName, runName, actionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, workflowName, runName, actionName, options, optionalCallback); + } + } + + /** + * Get a workflow run action scoped repetition. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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, workflowName, runName, actionName, repetitionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get a workflow run action scoped repetition. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action name. + * + * @param {string} repetitionName The workflow repetition. + * + * @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 {WorkflowRunActionRepetitionDefinition} - 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 WorkflowRunActionRepetitionDefinition} 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, workflowName, runName, actionName, repetitionName, 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, workflowName, runName, actionName, repetitionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, workflowName, runName, actionName, repetitionName, options, optionalCallback); + } + } + +} + +module.exports = WorkflowRunActionScopedRepetitions; diff --git a/lib/services/logicManagement/lib/operations/workflowRunActions.js b/lib/services/logicManagement/lib/operations/workflowRunActions.js index 6d8c330224..7d1a55c0ff 100644 --- a/lib/services/logicManagement/lib/operations/workflowRunActions.js +++ b/lib/services/logicManagement/lib/operations/workflowRunActions.js @@ -29,6 +29,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -342,6 +343,163 @@ function _get(resourceGroupName, workflowName, runName, actionName, options, cal }); } +/** + * Lists a workflow run expression trace. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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 ExpressionTraces} 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 _listExpressionTraces(resourceGroupName, workflowName, runName, actionName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (actionName === null || actionName === undefined || typeof actionName.valueOf() !== 'string') { + throw new Error('actionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{actionName}', encodeURIComponent(actionName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['ExpressionTraces']().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); + }); +} + /** * Gets a list of workflow run actions. * @@ -480,6 +638,7 @@ class WorkflowRunActions { this.client = client; this._list = _list; this._get = _get; + this._listExpressionTraces = _listExpressionTraces; this._listNext = _listNext; } @@ -498,6 +657,7 @@ class WorkflowRunActions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -537,6 +697,7 @@ class WorkflowRunActions { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -678,6 +839,100 @@ class WorkflowRunActions { } } + /** + * Lists a workflow run expression trace. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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. + */ + listExpressionTracesWithHttpOperationResponse(resourceGroupName, workflowName, runName, actionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listExpressionTraces(resourceGroupName, workflowName, runName, actionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists a workflow run expression trace. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} actionName The workflow action 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 {ExpressionTraces} - 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 ExpressionTraces} 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. + */ + listExpressionTraces(resourceGroupName, workflowName, runName, actionName, 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._listExpressionTraces(resourceGroupName, workflowName, runName, actionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listExpressionTraces(resourceGroupName, workflowName, runName, actionName, options, optionalCallback); + } + } + /** * Gets a list of workflow run actions. * diff --git a/lib/services/logicManagement/lib/operations/workflowRunOperations.js b/lib/services/logicManagement/lib/operations/workflowRunOperations.js new file mode 100644 index 0000000000..ec07bce499 --- /dev/null +++ b/lib/services/logicManagement/lib/operations/workflowRunOperations.js @@ -0,0 +1,281 @@ +/* + * 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; + +/** + * Gets an operation for a run. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} operationId The workflow operation id. + * + * @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 WorkflowRun} 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, workflowName, runName, operationId, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (runName === null || runName === undefined || typeof runName.valueOf() !== 'string') { + throw new Error('runName cannot be null or undefined and it must be of type string.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string') { + throw new Error('operationId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{runName}', encodeURIComponent(runName)); + requestUrl = requestUrl.replace('{operationId}', encodeURIComponent(operationId)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowRun']().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 WorkflowRunOperations. */ +class WorkflowRunOperations { + /** + * Create a WorkflowRunOperations. + * @param {LogicManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + } + + /** + * Gets an operation for a run. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} operationId The workflow operation id. + * + * @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, workflowName, runName, operationId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, runName, operationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets an operation for a run. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} runName The workflow run name. + * + * @param {string} operationId The workflow operation id. + * + * @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 {WorkflowRun} - 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 WorkflowRun} 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, workflowName, runName, operationId, 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, workflowName, runName, operationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, workflowName, runName, operationId, options, optionalCallback); + } + } + +} + +module.exports = WorkflowRunOperations; diff --git a/lib/services/logicManagement/lib/operations/workflowRuns.js b/lib/services/logicManagement/lib/operations/workflowRuns.js index 418a392866..5bfe6f0904 100644 --- a/lib/services/logicManagement/lib/operations/workflowRuns.js +++ b/lib/services/logicManagement/lib/operations/workflowRuns.js @@ -27,6 +27,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -616,6 +617,7 @@ class WorkflowRuns { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -653,6 +655,7 @@ class WorkflowRuns { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/logicManagement/lib/operations/workflowTriggerHistories.js b/lib/services/logicManagement/lib/operations/workflowTriggerHistories.js index 3e0d77f125..1e38753500 100644 --- a/lib/services/logicManagement/lib/operations/workflowTriggerHistories.js +++ b/lib/services/logicManagement/lib/operations/workflowTriggerHistories.js @@ -29,6 +29,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -641,6 +642,7 @@ class WorkflowTriggerHistories { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -680,6 +682,7 @@ class WorkflowTriggerHistories { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: Status, StartTime, and ClientTrackingId. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/logicManagement/lib/operations/workflowTriggers.js b/lib/services/logicManagement/lib/operations/workflowTriggers.js index 669ca36069..c3c5c8ed91 100644 --- a/lib/services/logicManagement/lib/operations/workflowTriggers.js +++ b/lib/services/logicManagement/lib/operations/workflowTriggers.js @@ -330,6 +330,139 @@ function _get(resourceGroupName, workflowName, triggerName, options, callback) { }); } +/** + * Resets a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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. + * + * {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 _reset(resourceGroupName, workflowName, triggerName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (triggerName === null || triggerName === undefined || typeof triggerName.valueOf() !== 'string') { + throw new Error('triggerName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{triggerName}', encodeURIComponent(triggerName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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); + }); +} + /** * Runs a workflow trigger. * @@ -479,19 +612,324 @@ function _run(resourceGroupName, workflowName, triggerName, options, callback) { }; 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); + } 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); + }); +} + +/** + * Get the trigger schema as JSON. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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 JsonSchema} 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 _getSchemaJson(resourceGroupName, workflowName, triggerName, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (triggerName === null || triggerName === undefined || typeof triggerName.valueOf() !== 'string') { + throw new Error('triggerName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{triggerName}', encodeURIComponent(triggerName)); + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['JsonSchema']().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); + }); +} + +/** + * Sets the state of a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger name. + * + * @param {object} setStateParameter The workflow trigger state. + * + * @param {object} setStateParameter.source + * + * @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 _setState(resourceGroupName, workflowName, triggerName, setStateParameter, 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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (triggerName === null || triggerName === undefined || typeof triggerName.valueOf() !== 'string') { + throw new Error('triggerName cannot be null or undefined and it must be of type string.'); + } + if (setStateParameter === null || setStateParameter === undefined) { + throw new Error('setStateParameter cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + requestUrl = requestUrl.replace('{triggerName}', encodeURIComponent(triggerName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (setStateParameter !== null && setStateParameter !== undefined) { + let requestModelMapper = new client.models['SetTriggerStateActionDefinition']().mapper(); + requestModel = client.serialize(requestModelMapper, setStateParameter, 'setStateParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(setStateParameter, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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); }); } /** - * Gets the callback URL for a workflow trigger. + * Get the callback URL for a workflow trigger. * * @param {string} resourceGroupName The resource group name. * @@ -780,7 +1218,10 @@ class WorkflowTriggers { this.client = client; this._list = _list; this._get = _get; + this._reset = _reset; this._run = _run; + this._getSchemaJson = _getSchemaJson; + this._setState = _setState; this._listCallbackUrl = _listCallbackUrl; this._listNext = _listNext; } @@ -972,6 +1413,95 @@ class WorkflowTriggers { } } + /** + * Resets a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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. + */ + resetWithHttpOperationResponse(resourceGroupName, workflowName, triggerName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._reset(resourceGroupName, workflowName, triggerName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Resets a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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 {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. + */ + reset(resourceGroupName, workflowName, triggerName, 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._reset(resourceGroupName, workflowName, triggerName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._reset(resourceGroupName, workflowName, triggerName, options, optionalCallback); + } + } + /** * Runs a workflow trigger. * @@ -1062,7 +1592,194 @@ class WorkflowTriggers { } /** - * Gets the callback URL for a workflow trigger. + * Get the trigger schema as JSON. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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. + */ + getSchemaJsonWithHttpOperationResponse(resourceGroupName, workflowName, triggerName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getSchemaJson(resourceGroupName, workflowName, triggerName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get the trigger schema as JSON. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger 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 {JsonSchema} - 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 JsonSchema} 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. + */ + getSchemaJson(resourceGroupName, workflowName, triggerName, 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._getSchemaJson(resourceGroupName, workflowName, triggerName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getSchemaJson(resourceGroupName, workflowName, triggerName, options, optionalCallback); + } + } + + /** + * Sets the state of a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger name. + * + * @param {object} setStateParameter The workflow trigger state. + * + * @param {object} setStateParameter.source + * + * @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. + */ + setStateWithHttpOperationResponse(resourceGroupName, workflowName, triggerName, setStateParameter, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._setState(resourceGroupName, workflowName, triggerName, setStateParameter, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Sets the state of a workflow trigger. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {string} triggerName The workflow trigger name. + * + * @param {object} setStateParameter The workflow trigger state. + * + * @param {object} setStateParameter.source + * + * @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. + */ + setState(resourceGroupName, workflowName, triggerName, setStateParameter, 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._setState(resourceGroupName, workflowName, triggerName, setStateParameter, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._setState(resourceGroupName, workflowName, triggerName, setStateParameter, options, optionalCallback); + } + } + + /** + * Get the callback URL for a workflow trigger. * * @param {string} resourceGroupName The resource group name. * @@ -1096,7 +1813,7 @@ class WorkflowTriggers { } /** - * Gets the callback URL for a workflow trigger. + * Get the callback URL for a workflow trigger. * * @param {string} resourceGroupName The resource group name. * diff --git a/lib/services/logicManagement/lib/operations/workflowVersions.js b/lib/services/logicManagement/lib/operations/workflowVersions.js index a12f5786a6..8834bbdf75 100644 --- a/lib/services/logicManagement/lib/operations/workflowVersions.js +++ b/lib/services/logicManagement/lib/operations/workflowVersions.js @@ -322,7 +322,7 @@ function _get(resourceGroupName, workflowName, versionId, options, callback) { } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param {string} resourceGroupName The resource group name. * @@ -827,7 +827,7 @@ class WorkflowVersions { } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param {string} resourceGroupName The resource group name. * @@ -870,7 +870,7 @@ class WorkflowVersions { } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param {string} resourceGroupName The resource group name. * diff --git a/lib/services/logicManagement/lib/operations/workflows.js b/lib/services/logicManagement/lib/operations/workflows.js index 75d7d09fd3..d6a83485d9 100644 --- a/lib/services/logicManagement/lib/operations/workflows.js +++ b/lib/services/logicManagement/lib/operations/workflows.js @@ -23,6 +23,7 @@ const WebResource = msRest.WebResource; * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -177,6 +178,7 @@ function _listBySubscription(options, callback) { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1407,12 +1409,19 @@ function _generateUpgradedDefinition(resourceGroupName, workflowName, parameters } /** - * Gets an OpenAPI definition for the workflow. + * Get the workflow callback Url. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} listCallbackUrlParameter Which callback url to list. + * + * @param {date} [listCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listCallbackUrlParameter.keyType] The key type. Possible + * values include: 'NotSpecified', 'Primary', 'Secondary' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1425,12 +1434,14 @@ function _generateUpgradedDefinition(resourceGroupName, workflowName, parameters * {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 WorkflowTriggerCallbackUrl} 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 _listSwagger(resourceGroupName, workflowName, options, callback) { +function _listCallbackUrl(resourceGroupName, workflowName, listCallbackUrlParameter, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1451,6 +1462,9 @@ function _listSwagger(resourceGroupName, workflowName, options, callback) { if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { throw new Error('workflowName cannot be null or undefined and it must be of type string.'); } + if (listCallbackUrlParameter === null || listCallbackUrlParameter === undefined) { + throw new Error('listCallbackUrlParameter cannot be null or undefined.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -1463,7 +1477,7 @@ function _listSwagger(resourceGroupName, workflowName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); @@ -1493,7 +1507,21 @@ function _listSwagger(resourceGroupName, workflowName, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (listCallbackUrlParameter !== null && listCallbackUrlParameter !== undefined) { + let requestModelMapper = new client.models['GetCallbackUrlParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, listCallbackUrlParameter, 'listCallbackUrlParameter'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(listCallbackUrlParameter, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1535,13 +1563,7 @@ function _listSwagger(resourceGroupName, workflowName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Object' - } - }; + let resultMapper = new client.models['WorkflowTriggerCallbackUrl']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1557,17 +1579,12 @@ function _listSwagger(resourceGroupName, workflowName, options, callback) { } /** - * Regenerates the callback URL access key for request triggers. + * Gets an OpenAPI definition for the workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} keyType The access key type. - * - * @param {string} [keyType.keyType] The key type. Possible values include: - * 'NotSpecified', 'Primary', 'Secondary' - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1579,13 +1596,13 @@ function _listSwagger(resourceGroupName, workflowName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [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 _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, callback) { +function _listSwagger(resourceGroupName, workflowName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1606,9 +1623,6 @@ function _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { throw new Error('workflowName cannot be null or undefined and it must be of type string.'); } - if (keyType === null || keyType === undefined) { - throw new Error('keyType cannot be null or undefined.'); - } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -1621,7 +1635,7 @@ function _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); @@ -1651,21 +1665,7 @@ function _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (keyType !== null && keyType !== undefined) { - let requestModelMapper = new client.models['RegenerateActionParameter']().mapper(); - requestModel = client.serialize(requestModelMapper, keyType, 'keyType'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(keyType, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1700,41 +1700,62 @@ function _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, // 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 = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Object' + } + }; + 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); }); } /** - * Validates the workflow definition. + * Moves an existing workflow. * * @param {string} resourceGroupName The resource group name. * - * @param {string} location The workflow location. - * * @param {string} workflowName The workflow name. * - * @param {object} workflow The workflow definition. + * @param {object} moveParameter The workflow to move. * - * @param {string} [workflow.state] The state. Possible values include: + * @param {string} [moveParameter.state] The state. Possible values include: * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' * - * @param {object} [workflow.sku] The sku. + * @param {object} [moveParameter.sku] The sku. * - * @param {string} workflow.sku.name The name. Possible values include: + * @param {string} moveParameter.sku.name The name. Possible values include: * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' * - * @param {object} [workflow.sku.plan] The reference to plan. + * @param {object} [moveParameter.sku.plan] The reference to plan. * - * @param {object} [workflow.integrationAccount] The integration account. + * @param {object} [moveParameter.integrationAccount] The integration account. * - * @param {object} [workflow.definition] The definition. + * @param {object} [moveParameter.definition] The definition. * - * @param {object} [workflow.parameters] The parameters. + * @param {object} [moveParameter.parameters] The parameters. * - * @param {string} [workflow.location] The resource location. + * @param {string} [moveParameter.location] The resource location. * - * @param {object} [workflow.tags] The resource tags. + * @param {object} [moveParameter.tags] The resource tags. * * @param {object} [options] Optional Parameters. * @@ -1753,7 +1774,7 @@ function _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _validate(resourceGroupName, location, workflowName, workflow, options, callback) { +function _move(resourceGroupName, workflowName, moveParameter, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1771,18 +1792,15 @@ function _validate(resourceGroupName, location, workflowName, workflow, options, if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (location === null || location === undefined || typeof location.valueOf() !== 'string') { - throw new Error('location cannot be null or undefined and it must be of type string.'); - } if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { throw new Error('workflowName cannot be null or undefined and it must be of type string.'); } + if (moveParameter === null || moveParameter === undefined) { + throw new Error('moveParameter cannot be null or undefined.'); + } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } - if (workflow === null || workflow === undefined) { - throw new Error('workflow 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.'); } @@ -1792,10 +1810,9 @@ function _validate(resourceGroupName, location, workflowName, workflow, options, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); @@ -1827,14 +1844,14 @@ function _validate(resourceGroupName, location, workflowName, workflow, options, let requestContent = null; let requestModel = null; try { - if (workflow !== null && workflow !== undefined) { + if (moveParameter !== null && moveParameter !== undefined) { let requestModelMapper = new client.models['Workflow']().mapper(); - requestModel = client.serialize(requestModelMapper, workflow, 'workflow'); + requestModel = client.serialize(requestModelMapper, moveParameter, 'moveParameter'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(workflow, null, 2)}.`); + `payload - ${JSON.stringify(moveParameter, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -1844,7 +1861,7 @@ function _validate(resourceGroupName, location, workflowName, workflow, options, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1878,10 +1895,16 @@ function _validate(resourceGroupName, location, workflowName, workflow, options, } /** - * Gets a list of workflows by subscription. + * Regenerates the callback URL access key for request triggers. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} keyType The access key type. + * + * @param {string} [keyType.keyType] The key type. Possible values include: + * 'NotSpecified', 'Primary', 'Secondary' * * @param {object} [options] Optional Parameters. * @@ -1894,14 +1917,13 @@ function _validate(resourceGroupName, location, workflowName, workflow, options, * * {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 WorkflowListResult} for more information. + * {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 _listBySubscriptionNext(nextPageLink, options, callback) { +function _regenerateAccessKey(resourceGroupName, workflowName, keyType, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1913,8 +1935,20 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { } // 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.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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (keyType === null || keyType === undefined) { + throw new Error('keyType cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.'); @@ -1924,12 +1958,20 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + 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.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1947,7 +1989,21 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (keyType !== null && keyType !== undefined) { + let requestModelMapper = new client.models['RegenerateActionParameter']().mapper(); + requestModel = client.serialize(requestModelMapper, keyType, 'keyType'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(keyType, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1982,33 +2038,39 @@ function _listBySubscriptionNext(nextPageLink, options, callback) { // 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['WorkflowListResult']().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); }); } /** - * Gets a list of workflows by resource group. + * Validates the workflow. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow name. + * + * @param {object} validate The workflow. + * + * @param {string} [validate.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [validate.sku] The sku. + * + * @param {string} validate.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [validate.sku.plan] The reference to plan. + * + * @param {object} [validate.integrationAccount] The integration account. + * + * @param {object} [validate.definition] The definition. + * + * @param {object} [validate.parameters] The parameters. + * + * @param {string} [validate.location] The resource location. + * + * @param {object} [validate.tags] The resource tags. * * @param {object} [options] Optional Parameters. * @@ -2021,14 +2083,13 @@ function _listBySubscriptionNext(nextPageLink, 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 WorkflowListResult} for more information. + * {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 _listByResourceGroupNext(nextPageLink, options, callback) { +function _validateWorkflow(resourceGroupName, workflowName, validate, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2040,8 +2101,20 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { } // 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.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 (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (validate === null || validate === undefined) { + throw new Error('validate cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion 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.'); @@ -2051,12 +2124,20 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + 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.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2074,7 +2155,21 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (validate !== null && validate !== undefined) { + let requestModelMapper = new client.models['Workflow']().mapper(); + requestModel = client.serialize(requestModelMapper, validate, 'validate'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(validate, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -2109,12 +2204,421 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { // 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); + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Validates the workflow definition. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} location The workflow location. + * + * @param {string} workflowName The workflow name. + * + * @param {object} workflow The workflow definition. + * + * @param {string} [workflow.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [workflow.sku] The sku. + * + * @param {string} workflow.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [workflow.sku.plan] The reference to plan. + * + * @param {object} [workflow.integrationAccount] The integration account. + * + * @param {object} [workflow.definition] The definition. + * + * @param {object} [workflow.parameters] The parameters. + * + * @param {string} [workflow.location] The resource location. + * + * @param {object} [workflow.tags] The resource tags. + * + * @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 _validate(resourceGroupName, location, workflowName, workflow, 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 (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (workflowName === null || workflowName === undefined || typeof workflowName.valueOf() !== 'string') { + throw new Error('workflowName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (workflow === null || workflow === undefined) { + throw new Error('workflow 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.Logic/locations/{location}/workflows/{workflowName}/validate'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + requestUrl = requestUrl.replace('{workflowName}', encodeURIComponent(workflowName)); + 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]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (workflow !== null && workflow !== undefined) { + let requestModelMapper = new client.models['Workflow']().mapper(); + requestModel = client.serialize(requestModelMapper, workflow, 'workflow'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(workflow, 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) { + 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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); + }); +} + +/** + * Gets a list of workflows by subscription. + * + * @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 WorkflowListResult} 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowListResult']().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); + }); +} + +/** + * Gets a list of workflows by resource group. + * + * @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 WorkflowListResult} 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) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().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['WorkflowListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); @@ -2148,8 +2652,11 @@ class Workflows { this._disable = _disable; this._enable = _enable; this._generateUpgradedDefinition = _generateUpgradedDefinition; + this._listCallbackUrl = _listCallbackUrl; this._listSwagger = _listSwagger; + this._move = _move; this._regenerateAccessKey = _regenerateAccessKey; + this._validateWorkflow = _validateWorkflow; this._validate = _validate; this._listBySubscriptionNext = _listBySubscriptionNext; this._listByResourceGroupNext = _listByResourceGroupNext; @@ -2164,6 +2671,7 @@ class Workflows { * result. * * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2189,14 +2697,195 @@ class Workflows { } /** - * Gets a list of workflows by subscription. + * Gets a list of workflows by subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.top] The number of items to be included in the + * result. + * + * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. + * + * @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 {WorkflowListResult} - 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 WorkflowListResult} 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); + } + } + + /** + * Gets a list of workflows by resource group. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.top] The number of items to be included in the + * result. + * + * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. + * + * @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; + }); + }); + } + + /** + * Gets a list of workflows by resource group. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.top] The number of items to be included in the + * result. + * + * @param {string} [options.filter] The filter to apply on the operation. + * Options for filters include: State, Trigger, and ReferencedResourceId. + * + * @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 {WorkflowListResult} - 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 WorkflowListResult} 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); + } + } + + /** + * Gets a workflow. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow 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, workflowName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, workflowName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a workflow. * - * @param {object} [options] Optional Parameters. + * @param {string} resourceGroupName The resource group name. * - * @param {number} [options.top] The number of items to be included in the - * result. + * @param {string} workflowName The workflow name. * - * @param {string} [options.filter] The filter to apply on the operation. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2208,7 +2897,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {WorkflowListResult} - The deserialized result object. + * @resolve {Workflow} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2217,13 +2906,13 @@ class Workflows { * {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 WorkflowListResult} for more information. + * See {@link Workflow} 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) { + get(resourceGroupName, workflowName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2232,43 +2921,62 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listBySubscription(options, (err, result, request, response) => { + self._get(resourceGroupName, workflowName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listBySubscription(options, optionalCallback); + return self._get(resourceGroupName, workflowName, options, optionalCallback); } } /** - * Gets a list of workflows by resource group. + * Creates or updates a workflow. * * @param {string} resourceGroupName The resource group name. * - * @param {object} [options] Optional Parameters. + * @param {string} workflowName The workflow name. * - * @param {number} [options.top] The number of items to be included in the - * result. + * @param {object} workflow The workflow. * - * @param {string} [options.filter] The filter to apply on the operation. + * @param {string} [workflow.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [workflow.sku] The sku. + * + * @param {string} workflow.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [workflow.sku.plan] The reference to plan. + * + * @param {object} [workflow.integrationAccount] The integration account. + * + * @param {object} [workflow.definition] The definition. + * + * @param {object} [workflow.parameters] The parameters. + * + * @param {string} [workflow.location] The resource location. + * + * @param {object} [workflow.tags] The resource tags. + * + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, workflowName, workflow, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2279,16 +2987,35 @@ class Workflows { } /** - * Gets a list of workflows by resource group. + * Creates or updates a workflow. * * @param {string} resourceGroupName The resource group name. * - * @param {object} [options] Optional Parameters. + * @param {string} workflowName The workflow name. * - * @param {number} [options.top] The number of items to be included in the - * result. + * @param {object} workflow The workflow. * - * @param {string} [options.filter] The filter to apply on the operation. + * @param {string} [workflow.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [workflow.sku] The sku. + * + * @param {string} workflow.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [workflow.sku.plan] The reference to plan. + * + * @param {object} [workflow.integrationAccount] The integration account. + * + * @param {object} [workflow.definition] The definition. + * + * @param {object} [workflow.parameters] The parameters. + * + * @param {string} [workflow.location] The resource location. + * + * @param {object} [workflow.tags] The resource tags. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2300,7 +3027,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {WorkflowListResult} - The deserialized result object. + * @resolve {Workflow} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2309,13 +3036,13 @@ class Workflows { * {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 WorkflowListResult} for more information. + * See {@link Workflow} 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) { + createOrUpdate(resourceGroupName, workflowName, workflow, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2324,24 +3051,46 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, workflowName, workflow, options, optionalCallback); } } /** - * Gets a workflow. + * Updates a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} workflow The workflow. + * + * @param {string} [workflow.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [workflow.sku] The sku. + * + * @param {string} workflow.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [workflow.sku.plan] The reference to plan. + * + * @param {object} [workflow.integrationAccount] The integration account. + * + * @param {object} [workflow.definition] The definition. + * + * @param {object} [workflow.parameters] The parameters. + * + * @param {string} [workflow.location] The resource location. + * + * @param {object} [workflow.tags] The resource tags. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2353,11 +3102,11 @@ class Workflows { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, workflowName, options) { + updateWithHttpOperationResponse(resourceGroupName, workflowName, workflow, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._update(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2368,12 +3117,34 @@ class Workflows { } /** - * Gets a workflow. + * Updates a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} workflow The workflow. + * + * @param {string} [workflow.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [workflow.sku] The sku. + * + * @param {string} workflow.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [workflow.sku.plan] The reference to plan. + * + * @param {object} [workflow.integrationAccount] The integration account. + * + * @param {object} [workflow.definition] The definition. + * + * @param {object} [workflow.parameters] The parameters. + * + * @param {string} [workflow.location] The resource location. + * + * @param {object} [workflow.tags] The resource tags. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2401,7 +3172,7 @@ class Workflows { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, workflowName, options, optionalCallback) { + update(resourceGroupName, workflowName, workflow, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2410,46 +3181,24 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._update(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, workflowName, options, optionalCallback); + return self._update(resourceGroupName, workflowName, workflow, options, optionalCallback); } } /** - * Creates or updates a workflow. + * Deletes a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} workflow The workflow. - * - * @param {string} [workflow.state] The state. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * - * @param {object} [workflow.sku] The sku. - * - * @param {string} workflow.sku.name The name. Possible values include: - * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * - * @param {object} [workflow.sku.plan] The reference to plan. - * - * @param {object} [workflow.integrationAccount] The integration account. - * - * @param {object} [workflow.definition] The definition. - * - * @param {object} [workflow.parameters] The parameters. - * - * @param {string} [workflow.location] The resource location. - * - * @param {object} [workflow.tags] The resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2457,15 +3206,15 @@ class Workflows { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName, workflowName, workflow, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, workflowName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, workflowName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2476,33 +3225,96 @@ class Workflows { } /** - * Creates or updates a workflow. + * Deletes a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} workflow The workflow. + * @param {object} [options] Optional Parameters. * - * @param {string} [workflow.state] The state. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [workflow.sku] The sku. + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} workflow.sku.name The name. Possible values include: - * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {object} [workflow.sku.plan] The reference to plan. + * {Promise} A promise is returned * - * @param {object} [workflow.integrationAccount] The integration account. + * @resolve {null} - The deserialized result object. * - * @param {object} [workflow.definition] The definition. + * @reject {Error} - The error object. * - * @param {object} [workflow.parameters] The parameters. + * {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, workflowName, 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, workflowName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, workflowName, options, optionalCallback); + } + } + + /** + * Disables a workflow. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} workflowName The workflow 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. + */ + disableWithHttpOperationResponse(resourceGroupName, workflowName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._disable(resourceGroupName, workflowName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Disables a workflow. * - * @param {string} [workflow.location] The resource location. + * @param {string} resourceGroupName The resource group name. * - * @param {object} [workflow.tags] The resource tags. + * @param {string} workflowName The workflow name. * * @param {object} [options] Optional Parameters. * @@ -2516,7 +3328,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {Workflow} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2524,14 +3336,13 @@ class Workflows { * * {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 Workflow} for more information. + * {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. */ - createOrUpdate(resourceGroupName, workflowName, workflow, options, optionalCallback) { + disable(resourceGroupName, workflowName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2540,46 +3351,24 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { + self._disable(resourceGroupName, workflowName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, workflowName, workflow, options, optionalCallback); + return self._disable(resourceGroupName, workflowName, options, optionalCallback); } } /** - * Updates a workflow. + * Enables a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} workflow The workflow. - * - * @param {string} [workflow.state] The state. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * - * @param {object} [workflow.sku] The sku. - * - * @param {string} workflow.sku.name The name. Possible values include: - * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * - * @param {object} [workflow.sku.plan] The reference to plan. - * - * @param {object} [workflow.integrationAccount] The integration account. - * - * @param {object} [workflow.definition] The definition. - * - * @param {object} [workflow.parameters] The parameters. - * - * @param {string} [workflow.location] The resource location. - * - * @param {object} [workflow.tags] The resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2587,15 +3376,15 @@ class Workflows { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, workflowName, workflow, options) { + enableWithHttpOperationResponse(resourceGroupName, workflowName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { + self._enable(resourceGroupName, workflowName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2606,34 +3395,12 @@ class Workflows { } /** - * Updates a workflow. + * Enables a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} workflow The workflow. - * - * @param {string} [workflow.state] The state. Possible values include: - * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - * - * @param {object} [workflow.sku] The sku. - * - * @param {string} workflow.sku.name The name. Possible values include: - * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' - * - * @param {object} [workflow.sku.plan] The reference to plan. - * - * @param {object} [workflow.integrationAccount] The integration account. - * - * @param {object} [workflow.definition] The definition. - * - * @param {object} [workflow.parameters] The parameters. - * - * @param {string} [workflow.location] The resource location. - * - * @param {object} [workflow.tags] The resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2646,7 +3413,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {Workflow} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2654,14 +3421,13 @@ class Workflows { * * {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 Workflow} for more information. + * {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. */ - update(resourceGroupName, workflowName, workflow, options, optionalCallback) { + enable(resourceGroupName, workflowName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2670,24 +3436,28 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, workflowName, workflow, options, (err, result, request, response) => { + self._enable(resourceGroupName, workflowName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, workflowName, workflow, options, optionalCallback); + return self._enable(resourceGroupName, workflowName, options, optionalCallback); } } /** - * Deletes a workflow. + * Generates the upgraded definition for a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} parameters Parameters for generating an upgraded definition. + * + * @param {string} [parameters.targetSchemaVersion] The target schema version. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2695,15 +3465,15 @@ class Workflows { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, workflowName, options) { + generateUpgradedDefinitionWithHttpOperationResponse(resourceGroupName, workflowName, parameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2714,12 +3484,16 @@ class Workflows { } /** - * Deletes a workflow. + * Generates the upgraded definition for a workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} parameters Parameters for generating an upgraded definition. + * + * @param {string} [parameters.targetSchemaVersion] The target schema version. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2732,7 +3506,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2740,13 +3514,13 @@ class Workflows { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [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, workflowName, options, optionalCallback) { + generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2755,24 +3529,31 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, workflowName, options, optionalCallback); + return self._generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, optionalCallback); } } /** - * Disables a workflow. + * Get the workflow callback Url. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} listCallbackUrlParameter Which callback url to list. + * + * @param {date} [listCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listCallbackUrlParameter.keyType] The key type. Possible + * values include: 'NotSpecified', 'Primary', 'Secondary' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2780,15 +3561,15 @@ class Workflows { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - disableWithHttpOperationResponse(resourceGroupName, workflowName, options) { + listCallbackUrlWithHttpOperationResponse(resourceGroupName, workflowName, listCallbackUrlParameter, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._disable(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._listCallbackUrl(resourceGroupName, workflowName, listCallbackUrlParameter, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2799,12 +3580,19 @@ class Workflows { } /** - * Disables a workflow. + * Get the workflow callback Url. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} listCallbackUrlParameter Which callback url to list. + * + * @param {date} [listCallbackUrlParameter.notAfter] The expiry time. + * + * @param {string} [listCallbackUrlParameter.keyType] The key type. Possible + * values include: 'NotSpecified', 'Primary', 'Secondary' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2817,7 +3605,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {WorkflowTriggerCallbackUrl} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2825,13 +3613,15 @@ class Workflows { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link WorkflowTriggerCallbackUrl} 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. */ - disable(resourceGroupName, workflowName, options, optionalCallback) { + listCallbackUrl(resourceGroupName, workflowName, listCallbackUrlParameter, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2840,19 +3630,19 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._disable(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._listCallbackUrl(resourceGroupName, workflowName, listCallbackUrlParameter, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._disable(resourceGroupName, workflowName, options, optionalCallback); + return self._listCallbackUrl(resourceGroupName, workflowName, listCallbackUrlParameter, options, optionalCallback); } } /** - * Enables a workflow. + * Gets an OpenAPI definition for the workflow. * * @param {string} resourceGroupName The resource group name. * @@ -2865,15 +3655,15 @@ class Workflows { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - enableWithHttpOperationResponse(resourceGroupName, workflowName, options) { + listSwaggerWithHttpOperationResponse(resourceGroupName, workflowName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._enable(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._listSwagger(resourceGroupName, workflowName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2884,7 +3674,7 @@ class Workflows { } /** - * Enables a workflow. + * Gets an OpenAPI definition for the workflow. * * @param {string} resourceGroupName The resource group name. * @@ -2902,7 +3692,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Object} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2910,13 +3700,13 @@ class Workflows { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [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. */ - enable(resourceGroupName, workflowName, options, optionalCallback) { + listSwagger(resourceGroupName, workflowName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2925,27 +3715,45 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._enable(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._listSwagger(resourceGroupName, workflowName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._enable(resourceGroupName, workflowName, options, optionalCallback); + return self._listSwagger(resourceGroupName, workflowName, options, optionalCallback); } } /** - * Generates the upgraded definition for a workflow. + * Moves an existing workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} parameters Parameters for generating an upgraded definition. + * @param {object} moveParameter The workflow to move. * - * @param {string} [parameters.targetSchemaVersion] The target schema version. + * @param {string} [moveParameter.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [moveParameter.sku] The sku. + * + * @param {string} moveParameter.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [moveParameter.sku.plan] The reference to plan. + * + * @param {object} [moveParameter.integrationAccount] The integration account. + * + * @param {object} [moveParameter.definition] The definition. + * + * @param {object} [moveParameter.parameters] The parameters. + * + * @param {string} [moveParameter.location] The resource location. + * + * @param {object} [moveParameter.tags] The resource tags. * * @param {object} [options] Optional Parameters. * @@ -2954,15 +3762,15 @@ class Workflows { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - generateUpgradedDefinitionWithHttpOperationResponse(resourceGroupName, workflowName, parameters, options) { + moveWithHttpOperationResponse(resourceGroupName, workflowName, moveParameter, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, (err, result, request, response) => { + self._move(resourceGroupName, workflowName, moveParameter, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2973,15 +3781,33 @@ class Workflows { } /** - * Generates the upgraded definition for a workflow. + * Moves an existing workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} parameters Parameters for generating an upgraded definition. + * @param {object} moveParameter The workflow to move. * - * @param {string} [parameters.targetSchemaVersion] The target schema version. + * @param {string} [moveParameter.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [moveParameter.sku] The sku. + * + * @param {string} moveParameter.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [moveParameter.sku.plan] The reference to plan. + * + * @param {object} [moveParameter.integrationAccount] The integration account. + * + * @param {object} [moveParameter.definition] The definition. + * + * @param {object} [moveParameter.parameters] The parameters. + * + * @param {string} [moveParameter.location] The resource location. + * + * @param {object} [moveParameter.tags] The resource tags. * * @param {object} [options] Optional Parameters. * @@ -2995,7 +3821,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {Object} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3003,13 +3829,13 @@ class Workflows { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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. */ - generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, optionalCallback) { + move(resourceGroupName, workflowName, moveParameter, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3018,24 +3844,29 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, (err, result, request, response) => { + self._move(resourceGroupName, workflowName, moveParameter, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._generateUpgradedDefinition(resourceGroupName, workflowName, parameters, options, optionalCallback); + return self._move(resourceGroupName, workflowName, moveParameter, options, optionalCallback); } } /** - * Gets an OpenAPI definition for the workflow. + * Regenerates the callback URL access key for request triggers. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} keyType The access key type. + * + * @param {string} [keyType.keyType] The key type. Possible values include: + * 'NotSpecified', 'Primary', 'Secondary' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3043,15 +3874,15 @@ class Workflows { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listSwaggerWithHttpOperationResponse(resourceGroupName, workflowName, options) { + regenerateAccessKeyWithHttpOperationResponse(resourceGroupName, workflowName, keyType, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listSwagger(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._regenerateAccessKey(resourceGroupName, workflowName, keyType, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3062,12 +3893,17 @@ class Workflows { } /** - * Gets an OpenAPI definition for the workflow. + * Regenerates the callback URL access key for request triggers. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * + * @param {object} keyType The access key type. + * + * @param {string} [keyType.keyType] The key type. Possible values include: + * 'NotSpecified', 'Primary', 'Secondary' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3080,7 +3916,7 @@ class Workflows { * * {Promise} A promise is returned * - * @resolve {Object} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3088,13 +3924,13 @@ class Workflows { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. + * {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. */ - listSwagger(resourceGroupName, workflowName, options, optionalCallback) { + regenerateAccessKey(resourceGroupName, workflowName, keyType, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3103,28 +3939,45 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listSwagger(resourceGroupName, workflowName, options, (err, result, request, response) => { + self._regenerateAccessKey(resourceGroupName, workflowName, keyType, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listSwagger(resourceGroupName, workflowName, options, optionalCallback); + return self._regenerateAccessKey(resourceGroupName, workflowName, keyType, options, optionalCallback); } } /** - * Regenerates the callback URL access key for request triggers. + * Validates the workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} keyType The access key type. + * @param {object} validate The workflow. * - * @param {string} [keyType.keyType] The key type. Possible values include: - * 'NotSpecified', 'Primary', 'Secondary' + * @param {string} [validate.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [validate.sku] The sku. + * + * @param {string} validate.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [validate.sku.plan] The reference to plan. + * + * @param {object} [validate.integrationAccount] The integration account. + * + * @param {object} [validate.definition] The definition. + * + * @param {object} [validate.parameters] The parameters. + * + * @param {string} [validate.location] The resource location. + * + * @param {object} [validate.tags] The resource tags. * * @param {object} [options] Optional Parameters. * @@ -3137,11 +3990,11 @@ class Workflows { * * @reject {Error} - The error object. */ - regenerateAccessKeyWithHttpOperationResponse(resourceGroupName, workflowName, keyType, options) { + validateWorkflowWithHttpOperationResponse(resourceGroupName, workflowName, validate, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._regenerateAccessKey(resourceGroupName, workflowName, keyType, options, (err, result, request, response) => { + self._validateWorkflow(resourceGroupName, workflowName, validate, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3152,16 +4005,33 @@ class Workflows { } /** - * Regenerates the callback URL access key for request triggers. + * Validates the workflow. * * @param {string} resourceGroupName The resource group name. * * @param {string} workflowName The workflow name. * - * @param {object} keyType The access key type. + * @param {object} validate The workflow. * - * @param {string} [keyType.keyType] The key type. Possible values include: - * 'NotSpecified', 'Primary', 'Secondary' + * @param {string} [validate.state] The state. Possible values include: + * 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + * + * @param {object} [validate.sku] The sku. + * + * @param {string} validate.sku.name The name. Possible values include: + * 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + * + * @param {object} [validate.sku.plan] The reference to plan. + * + * @param {object} [validate.integrationAccount] The integration account. + * + * @param {object} [validate.definition] The definition. + * + * @param {object} [validate.parameters] The parameters. + * + * @param {string} [validate.location] The resource location. + * + * @param {object} [validate.tags] The resource tags. * * @param {object} [options] Optional Parameters. * @@ -3189,7 +4059,7 @@ class Workflows { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - regenerateAccessKey(resourceGroupName, workflowName, keyType, options, optionalCallback) { + validateWorkflow(resourceGroupName, workflowName, validate, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3198,14 +4068,14 @@ class Workflows { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._regenerateAccessKey(resourceGroupName, workflowName, keyType, options, (err, result, request, response) => { + self._validateWorkflow(resourceGroupName, workflowName, validate, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._regenerateAccessKey(resourceGroupName, workflowName, keyType, options, optionalCallback); + return self._validateWorkflow(resourceGroupName, workflowName, validate, options, optionalCallback); } } diff --git a/lib/services/logicManagement/package-lock.json b/lib/services/logicManagement/package-lock.json new file mode 100644 index 0000000000..4e53859d41 --- /dev/null +++ b/lib/services/logicManagement/package-lock.json @@ -0,0 +1,578 @@ +{ + "name": "azure-arm-logic", + "version": "2.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.2.tgz", + "integrity": "sha512-A6Uv1anbsCvrRDtaUXS2xZ5tlzD+Kg7yMRlSLFDy3z0r7KlGXDzL14vELXIAgpk2aJbU3XeZZQRcEkLkowT92g==" + }, + "@types/uuid": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.3.tgz", + "integrity": "sha512-5fRLCYhLtDb3hMWqQyH10qtF+Ud2JnNCXTCZ+9ktNdCcgslcuXkDTkFcJNk++MT29yDntDnlF1+jD+uVGumsbw==", + "requires": { + "@types/node": "*" + } + }, + "adal-node": { + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.1.28.tgz", + "integrity": "sha1-RoxLs+u9lrEnBmn0ucuk4AZepIU=", + "requires": { + "@types/node": "^8.0.47", + "async": ">=0.6.0", + "date-utils": "*", + "jws": "3.x.x", + "request": ">= 2.52.0", + "underscore": ">= 1.3.1", + "uuid": "^3.1.0", + "xmldom": ">= 0.1.x", + "xpath.js": "~1.1.0" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "^4.14.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.x.x" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.x.x" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.x.x" + } + } + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-utils": { + "version": "1.2.21", + "resolved": "https://registry.npmjs.org/date-utils/-/date-utils-1.2.21.tgz", + "integrity": "sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.x.x", + "cryptiles": "3.x.x", + "hoek": "4.x.x", + "sntp": "2.x.x" + } + }, + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "^2.0.0", + "jwa": "^1.1.4", + "safe-buffer": "^5.0.1" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "~1.33.0" + } + }, + "moment": { + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.0.tgz", + "integrity": "sha512-1muXCh8jb1N/gHRbn9VDUBr0GYb8A/aVcHlII9QSB68a50spqEVLIGN6KVmCOnSvJrUhC0edGgKU5ofnGXdYdg==" + }, + "ms-rest": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/ms-rest/-/ms-rest-2.3.6.tgz", + "integrity": "sha512-M+Lx9P7Wy4TeAk7jqPLwGS1QS1gvxF6Xo+OHv5j1g3Kcb44T/GTUuSjxTKarF6aKyeacZH1ZD++Nt7pcql7dDA==", + "requires": { + "duplexer": "^0.1.1", + "is-buffer": "^1.1.6", + "is-stream": "^1.1.0", + "moment": "^2.21.0", + "request": "^2.87.0", + "through": "^2.3.8", + "tunnel": "0.0.5", + "uuid": "^3.2.1" + }, + "dependencies": { + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + } + } + }, + "ms-rest-azure": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/ms-rest-azure/-/ms-rest-azure-2.5.5.tgz", + "integrity": "sha512-LnP5YlgqvNAOi1x2b4Ru+1ubz/PtYQgNeH74aiolP+Sb5lpOw5ewzbncXae1pR5OWu9NGwxjX59adzSWosqnzw==", + "requires": { + "@types/node": "^9.4.6", + "@types/uuid": "^3.4.3", + "adal-node": "^0.1.27", + "async": "2.6.0", + "moment": "^2.20.1", + "ms-rest": "^2.3.2", + "uuid": "^3.2.1" + }, + "dependencies": { + "@types/node": { + "version": "9.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.2.tgz", + "integrity": "sha512-UWkRY9X7RQHp5OhhRIIka58/gVVycL1zHZu0OTsT5LI86ABaMOSbUjAl+b0FeDhQcxclrkyft3kW5QWdMRs8wQ==" + } + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "request": { + "version": "2.85.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", + "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "hawk": "~6.0.2", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "stringstream": "~0.0.5", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.x.x" + } + }, + "sshpk": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", + "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "requires": { + "punycode": "^1.4.1" + } + }, + "tunnel": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.5.tgz", + "integrity": "sha512-gj5sdqherx4VZKMcBA4vewER7zdK25Td+z1npBqpbDys4eJrLx+SlYjJvq1bDXs2irkuJM5pf8ktaEQVipkrbA==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "xmldom": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" + }, + "xpath.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", + "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==" + } + } +} diff --git a/lib/services/logicManagement/package.json b/lib/services/logicManagement/package.json index 867043c1ea..bad32543fb 100644 --- a/lib/services/logicManagement/package.json +++ b/lib/services/logicManagement/package.json @@ -1,35 +1,25 @@ { "name": "azure-arm-logic", "author": "Microsoft Corporation", - "contributors": [ - "Negi, Pankaj " - ], - "version": "1.1.0-preview", - "description": "Microsoft Azure Logic Management Client Library for node", - "tags": [ - "azure", - "sdk" - ], + "description": "LogicManagementClient Library with typescript type definitions for node", + "version": "2.0.0", + "dependencies": { + "ms-rest": "^2.3.3", + "ms-rest-azure": "^2.5.5" + }, "keywords": [ "node", "azure" ], + "license": "MIT", "main": "./lib/logicManagementClient.js", "types": "./lib/logicManagementClient.d.ts", - "license": "MIT", - "dependencies": { - "ms-rest": "^2.2.2", - "ms-rest-azure": "^2.3.3" - }, - "homepage": "http://github.com/Azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/lib/services/logicManagement", "repository": { "type": "git", - "url": "git@github.com:Azure/azure-sdk-for-node.git" + "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" - }, - "scripts": { - "test": "npm -s run-script jshint" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } }