diff --git a/lib/services/datafactoryManagement/LICENSE.txt b/lib/services/datafactoryManagement/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/datafactoryManagement/LICENSE.txt +++ b/lib/services/datafactoryManagement/LICENSE.txt @@ -1,21 +1,21 @@ -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. +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/datafactoryManagement/README.md b/lib/services/datafactoryManagement/README.md index ffb98daecf..efde5c083a 100644 --- a/lib/services/datafactoryManagement/README.md +++ b/lib/services/datafactoryManagement/README.md @@ -1,35 +1,40 @@ -# Microsoft Azure SDK for Node.js - DataFactoryManagementClient -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-datafactory -``` - -## How to use - -### Authentication, client creation and list operations as an example. - -```javascript -const msRestAzure = require("ms-rest-azure"); -const DataFactoryManagementClient = require("azure-arm-datafactory"); -msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new DataFactoryManagementClient(creds, subscriptionId); - return client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).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) +--- +uid: azure-arm-datafactory +summary: *content + +--- +# Microsoft Azure SDK for Node.js - DataFactoryManagementClient +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-datafactory +``` + +## How to use + +### Authentication, client creation and list operations as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const DataFactoryManagementClient = require("azure-arm-datafactory"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new DataFactoryManagementClient(creds, subscriptionId); + return client.operations.list().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/datafactoryManagement/lib/dataFactoryManagementClient.d.ts b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.d.ts index ad4a3fd100..5080d48b13 100644 --- a/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.d.ts +++ b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.d.ts @@ -66,6 +66,7 @@ export default class DataFactoryManagementClient extends AzureServiceClient { pipelineRuns: operations.PipelineRuns; activityRuns: operations.ActivityRuns; triggers: operations.Triggers; + triggerRuns: operations.TriggerRuns; } export { DataFactoryManagementClient, models as DataFactoryManagementModels }; diff --git a/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js index f72faa7c08..176b094053 100644 --- a/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js +++ b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js @@ -50,7 +50,7 @@ class DataFactoryManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2017-09-01-preview'; + this.apiVersion = '2018-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -82,6 +82,7 @@ class DataFactoryManagementClient extends ServiceClient { this.pipelineRuns = new operations.PipelineRuns(this); this.activityRuns = new operations.ActivityRuns(this); this.triggers = new operations.Triggers(this); + this.triggerRuns = new operations.TriggerRuns(this); this.models = models; msRest.addSerializationMixin(this); } diff --git a/lib/services/datafactoryManagement/lib/models/activity.js b/lib/services/datafactoryManagement/lib/models/activity.js index d7b43be811..5a0172a104 100644 --- a/lib/services/datafactoryManagement/lib/models/activity.js +++ b/lib/services/datafactoryManagement/lib/models/activity.js @@ -22,6 +22,7 @@ class Activity { * @member {string} name Activity name. * @member {string} [description] Activity description. * @member {array} [dependsOn] Activity depends on condition. + * @member {object} [userProperties] Activity user properties. * @member {string} type Polymorphic Discriminator */ constructor() { @@ -99,6 +100,20 @@ class Activity { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/activityRunsQueryResponse.js b/lib/services/datafactoryManagement/lib/models/activityRunsQueryResponse.js new file mode 100644 index 0000000000..b26c2970f0 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/activityRunsQueryResponse.js @@ -0,0 +1,83 @@ +/* + * 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'); + +/** + * A list activity runs. + * + */ +class ActivityRunsQueryResponse { + /** + * Create a ActivityRunsQueryResponse. + * @member {array} value List of activity runs. + * @member {string} [continuationToken] The continuation token for getting + * the next page of results, if any remaining results exist, null otherwise. + */ + constructor() { + } + + /** + * Defines the metadata of ActivityRunsQueryResponse + * + * @returns {object} metadata of ActivityRunsQueryResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'ActivityRunsQueryResponse', + type: { + name: 'Composite', + className: 'ActivityRunsQueryResponse', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActivityRunElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'ActivityRun' + } + } + } + }, + continuationToken: { + required: false, + serializedName: 'continuationToken', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ActivityRunsQueryResponse; diff --git a/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js b/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js index b8bed79284..d59fa946cb 100644 --- a/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js @@ -98,6 +98,20 @@ class AzureMLBatchExecutionActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js b/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js index eef9a9d136..2f9998e168 100644 --- a/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js +++ b/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js @@ -99,6 +99,20 @@ class AzureMLUpdateResourceActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/azureMySqlLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureMySqlLinkedService.js index cf0826791b..b9d30dd1bf 100644 --- a/lib/services/datafactoryManagement/lib/models/azureMySqlLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/azureMySqlLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class AzureMySqlLinkedService extends models['LinkedService'] { /** * Create a AzureMySqlLinkedService. - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class AzureMySqlLinkedService extends models['LinkedService'] { required: true, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/azurePostgreSqlLinkedService.js b/lib/services/datafactoryManagement/lib/models/azurePostgreSqlLinkedService.js index 8a535d4ded..492bf3c3b8 100644 --- a/lib/services/datafactoryManagement/lib/models/azurePostgreSqlLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/azurePostgreSqlLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class AzurePostgreSqlLinkedService extends models['LinkedService'] { /** * Create a AzurePostgreSqlLinkedService. - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class AzurePostgreSqlLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/azureSqlDWLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureSqlDWLinkedService.js index 6264ac19be..357c7f0d62 100644 --- a/lib/services/datafactoryManagement/lib/models/azureSqlDWLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/azureSqlDWLinkedService.js @@ -20,8 +20,9 @@ const models = require('./index'); class AzureSqlDWLinkedService extends models['LinkedService'] { /** * Create a AzureSqlDWLinkedService. - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. Type: string, SecureString + * or AzureKeyVaultSecretReference. * @member {object} [servicePrincipalId] The ID of the service principal used * to authenticate against Azure SQL Data Warehouse. Type: string (or * Expression with resultType string). @@ -114,13 +115,7 @@ class AzureSqlDWLinkedService extends models['LinkedService'] { required: true, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, servicePrincipalId: { diff --git a/lib/services/datafactoryManagement/lib/models/azureSqlDatabaseLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureSqlDatabaseLinkedService.js index 0ca9d4baaf..6dd95018a3 100644 --- a/lib/services/datafactoryManagement/lib/models/azureSqlDatabaseLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/azureSqlDatabaseLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class AzureSqlDatabaseLinkedService extends models['LinkedService'] { /** * Create a AzureSqlDatabaseLinkedService. - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [servicePrincipalId] The ID of the service principal used * to authenticate against Azure SQL Database. Type: string (or Expression * with resultType string). @@ -114,13 +114,7 @@ class AzureSqlDatabaseLinkedService extends models['LinkedService'] { required: true, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, servicePrincipalId: { diff --git a/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js index 4fcf76727b..ba40fa2d6e 100644 --- a/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js @@ -21,8 +21,8 @@ class AzureStorageLinkedService extends models['LinkedService'] { /** * Create a AzureStorageLinkedService. * @member {object} [connectionString] The connection string. It is mutually - * exclusive with sasUri property. - * @member {string} [connectionString.type] Polymorphic Discriminator + * exclusive with sasUri property. Type: string, SecureString or + * AzureKeyVaultSecretReference. * @member {object} [sasUri] SAS URI of the Azure Storage resource. It is * mutually exclusive with connectionString property. * @member {string} [sasUri.type] Polymorphic Discriminator @@ -109,13 +109,7 @@ class AzureStorageLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, sasUri: { diff --git a/lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js b/lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js new file mode 100644 index 0000000000..17edbd6e65 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js @@ -0,0 +1,137 @@ +/* + * 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'); + +/** + * Trigger that runs everytime a Blob event occurs. + * + * @extends models['MultiplePipelineTrigger'] + */ +class BlobEventsTrigger extends models['MultiplePipelineTrigger'] { + /** + * Create a BlobEventsTrigger. + * @member {string} [blobPathBeginsWith] The blob path must begin with the + * pattern provided for trigger to fire. For example, + * '/records/blobs/december/' will only fire the trigger for blobs in the + * december folder under the records container. At least one of these must be + * provided: blobPathBeginsWith, blobPathEndsWith. + * @member {string} [blobPathEndsWith] The blob path must end with the + * pattern provided for trigger to fire. For example, 'december/boxes.csv' + * will only fire the trigger for blobs named boxes in a december folder. At + * least one of these must be provided: blobPathBeginsWith, blobPathEndsWith. + * @member {array} events The type of events that cause this trigger to fire. + * @member {string} scope The ARM resource ID of the Storage Account. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of BlobEventsTrigger + * + * @returns {object} metadata of BlobEventsTrigger + * + */ + mapper() { + return { + required: false, + serializedName: 'BlobEventsTrigger', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'Trigger', + className: 'BlobEventsTrigger', + modelProperties: { + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + runtimeState: { + required: false, + readOnly: true, + serializedName: 'runtimeState', + type: { + name: 'String' + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + pipelines: { + required: false, + serializedName: 'pipelines', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'TriggerPipelineReferenceElementType', + type: { + name: 'Composite', + className: 'TriggerPipelineReference' + } + } + } + }, + blobPathBeginsWith: { + required: false, + serializedName: 'typeProperties.blobPathBeginsWith', + type: { + name: 'String' + } + }, + blobPathEndsWith: { + required: false, + serializedName: 'typeProperties.blobPathEndsWith', + type: { + name: 'String' + } + }, + events: { + required: true, + serializedName: 'typeProperties.events', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + scope: { + required: true, + serializedName: 'typeProperties.scope', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BlobEventsTrigger; diff --git a/lib/services/datafactoryManagement/lib/models/controlActivity.js b/lib/services/datafactoryManagement/lib/models/controlActivity.js index d168d2ca5e..89b5f0b5bd 100644 --- a/lib/services/datafactoryManagement/lib/models/controlActivity.js +++ b/lib/services/datafactoryManagement/lib/models/controlActivity.js @@ -85,6 +85,20 @@ class ControlActivity extends models['Activity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/copyActivity.js b/lib/services/datafactoryManagement/lib/models/copyActivity.js index 7bf0329a97..590fdc477a 100644 --- a/lib/services/datafactoryManagement/lib/models/copyActivity.js +++ b/lib/services/datafactoryManagement/lib/models/copyActivity.js @@ -61,9 +61,9 @@ class CopyActivity extends models['ExecutionActivity'] { * @member {object} [parallelCopies] Maximum number of concurrent sessions * opened on the source or sink to avoid overloading the data store. Type: * integer (or Expression with resultType integer), minimum: 0. - * @member {object} [cloudDataMovementUnits] Maximum number of cloud data - * movement units that can be used to perform this data movement. Type: - * integer (or Expression with resultType integer), minimum: 0. + * @member {object} [dataIntegrationUnits] Maximum number of data integration + * units that can be used to perform this data movement. Type: integer (or + * Expression with resultType integer), minimum: 0. * @member {object} [enableSkipIncompatibleRow] Whether to skip incompatible * row. Default value is false. Type: boolean (or Expression with resultType * boolean). @@ -144,6 +144,20 @@ class CopyActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', @@ -289,9 +303,9 @@ class CopyActivity extends models['ExecutionActivity'] { name: 'Object' } }, - cloudDataMovementUnits: { + dataIntegrationUnits: { required: false, - serializedName: 'typeProperties.cloudDataMovementUnits', + serializedName: 'typeProperties.dataIntegrationUnits', type: { name: 'Object' } diff --git a/lib/services/datafactoryManagement/lib/models/cosmosDbLinkedService.js b/lib/services/datafactoryManagement/lib/models/cosmosDbLinkedService.js index 8927393b84..d48f70e209 100644 --- a/lib/services/datafactoryManagement/lib/models/cosmosDbLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/cosmosDbLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class CosmosDbLinkedService extends models['LinkedService'] { /** * Create a CosmosDbLinkedService. - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class CosmosDbLinkedService extends models['LinkedService'] { required: true, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/couchbaseLinkedService.js b/lib/services/datafactoryManagement/lib/models/couchbaseLinkedService.js index 75c18a0ddb..7699e5f64b 100644 --- a/lib/services/datafactoryManagement/lib/models/couchbaseLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/couchbaseLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class CouchbaseLinkedService extends models['LinkedService'] { /** * Create a CouchbaseLinkedService. - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class CouchbaseLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/customActivity.js b/lib/services/datafactoryManagement/lib/models/customActivity.js index e499559410..76476f6995 100644 --- a/lib/services/datafactoryManagement/lib/models/customActivity.js +++ b/lib/services/datafactoryManagement/lib/models/customActivity.js @@ -103,6 +103,20 @@ class CustomActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js b/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js index 573649df4c..99373c19f0 100644 --- a/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js +++ b/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js @@ -105,6 +105,20 @@ class DataLakeAnalyticsUSQLActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js b/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js index 25fa83b5d4..db00000909 100644 --- a/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js +++ b/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js @@ -91,6 +91,20 @@ class DatabricksNotebookActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/db2LinkedService.js b/lib/services/datafactoryManagement/lib/models/db2LinkedService.js index 795a381322..49f54f616b 100644 --- a/lib/services/datafactoryManagement/lib/models/db2LinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/db2LinkedService.js @@ -24,8 +24,6 @@ class Db2LinkedService extends models['LinkedService'] { * Expression with resultType string). * @member {object} database Database name for connection. Type: string (or * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). * @member {string} [authenticationType] AuthenticationType to be used for * connection. Possible values include: 'Basic' * @member {object} [username] Username for authentication. Type: string (or @@ -125,13 +123,6 @@ class Db2LinkedService extends models['LinkedService'] { name: 'Object' } }, - schema: { - required: false, - serializedName: 'typeProperties.schema', - type: { - name: 'Object' - } - }, authenticationType: { required: false, serializedName: 'typeProperties.authenticationType', diff --git a/lib/services/datafactoryManagement/lib/models/drillLinkedService.js b/lib/services/datafactoryManagement/lib/models/drillLinkedService.js index e9e025e2b4..cdad2100e0 100644 --- a/lib/services/datafactoryManagement/lib/models/drillLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/drillLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class DrillLinkedService extends models['LinkedService'] { /** * Create a DrillLinkedService. - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class DrillLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js b/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js index 05cc8f3493..1d9452edc1 100644 --- a/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js @@ -92,6 +92,20 @@ class ExecutePipelineActivity extends models['ControlActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js b/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js index 7ca508a365..253142ffa7 100644 --- a/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js @@ -26,13 +26,23 @@ class ExecuteSSISPackageActivity extends models['ExecutionActivity'] { * Possible values include: 'x64', 'x86' * @member {string} [loggingLevel] The logging level of SSIS package * execution. - * @member {string} [environmentPath] The environment path to execution the + * @member {string} [environmentPath] The environment path to execute the * SSIS package. * @member {object} connectVia The integration runtime reference. * @member {string} [connectVia.referenceName] Reference integration runtime * name. * @member {object} [connectVia.parameters] Arguments for integration * runtime. + * @member {object} [projectParameters] The project level parameters to + * execute the SSIS package. + * @member {object} [packageParameters] The package level parameters to + * execute the SSIS package. + * @member {object} [projectConnectionManagers] The project level connection + * managers to execute the SSIS package. + * @member {object} [packageConnectionManagers] The package level connection + * managers to execute the SSIS package. + * @member {object} [propertyOverrides] The property overrides to execute the + * SSIS package. */ constructor() { super(); @@ -98,6 +108,20 @@ class ExecuteSSISPackageActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', @@ -171,6 +195,95 @@ class ExecuteSSISPackageActivity extends models['ExecutionActivity'] { name: 'Composite', className: 'IntegrationRuntimeReference' } + }, + projectParameters: { + required: false, + serializedName: 'typeProperties.projectParameters', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'SSISExecutionParameterElementType', + type: { + name: 'Composite', + className: 'SSISExecutionParameter' + } + } + } + }, + packageParameters: { + required: false, + serializedName: 'typeProperties.packageParameters', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'SSISExecutionParameterElementType', + type: { + name: 'Composite', + className: 'SSISExecutionParameter' + } + } + } + }, + projectConnectionManagers: { + required: false, + serializedName: 'typeProperties.projectConnectionManagers', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'SSISExecutionParameterElementType', + type: { + name: 'Composite', + className: 'SSISExecutionParameter' + } + } + } + } + } + }, + packageConnectionManagers: { + required: false, + serializedName: 'typeProperties.packageConnectionManagers', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'SSISExecutionParameterElementType', + type: { + name: 'Composite', + className: 'SSISExecutionParameter' + } + } + } + } + } + }, + propertyOverrides: { + required: false, + serializedName: 'typeProperties.propertyOverrides', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'SSISPropertyOverrideElementType', + type: { + name: 'Composite', + className: 'SSISPropertyOverride' + } + } + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/executionActivity.js b/lib/services/datafactoryManagement/lib/models/executionActivity.js index 34a22f3d96..d5e406f65e 100644 --- a/lib/services/datafactoryManagement/lib/models/executionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executionActivity.js @@ -101,6 +101,20 @@ class ExecutionActivity extends models['Activity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/factory.js b/lib/services/datafactoryManagement/lib/models/factory.js index 744284edbd..42151c6f38 100644 --- a/lib/services/datafactoryManagement/lib/models/factory.js +++ b/lib/services/datafactoryManagement/lib/models/factory.js @@ -28,6 +28,14 @@ class Factory extends models['Resource'] { * @member {date} [createTime] Time the factory was created in ISO8601 * format. * @member {string} [version] Version of the factory. + * @member {object} [repoConfiguration] Git repo information of the factory. + * @member {string} [repoConfiguration.accountName] Account name. + * @member {string} [repoConfiguration.repositoryName] Rrepository name. + * @member {string} [repoConfiguration.collaborationBranch] Collaboration + * branch. + * @member {string} [repoConfiguration.rootFolder] Root folder. + * @member {string} [repoConfiguration.lastCommitId] Last commit id. + * @member {string} [repoConfiguration.type] Polymorphic Discriminator */ constructor() { super(); @@ -104,6 +112,14 @@ class Factory extends models['Resource'] { } } }, + eTag: { + required: false, + readOnly: true, + serializedName: 'eTag', + type: { + name: 'String' + } + }, identity: { required: false, serializedName: 'identity', @@ -135,6 +151,19 @@ class Factory extends models['Resource'] { type: { name: 'String' } + }, + repoConfiguration: { + required: false, + serializedName: 'properties.repoConfiguration', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'FactoryRepoConfiguration', + className: 'FactoryRepoConfiguration' + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js b/lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js new file mode 100644 index 0000000000..3329c6631b --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js @@ -0,0 +1,105 @@ +/* + * 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'); + +/** + * Factory's GitHub repo information. + * + * @extends models['FactoryRepoConfiguration'] + */ +class FactoryGitHubConfiguration extends models['FactoryRepoConfiguration'] { + /** + * Create a FactoryGitHubConfiguration. + * @member {string} [hostName] GitHub repo host name. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FactoryGitHubConfiguration + * + * @returns {object} metadata of FactoryGitHubConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'FactoryGithubConfiguration', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'FactoryRepoConfiguration', + className: 'FactoryGitHubConfiguration', + modelProperties: { + accountName: { + required: true, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + repositoryName: { + required: true, + serializedName: 'repositoryName', + type: { + name: 'String' + } + }, + collaborationBranch: { + required: true, + serializedName: 'collaborationBranch', + type: { + name: 'String' + } + }, + rootFolder: { + required: true, + serializedName: 'rootFolder', + type: { + name: 'String' + } + }, + lastCommitId: { + required: false, + serializedName: 'lastCommitId', + type: { + name: 'String' + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + hostName: { + required: false, + readOnly: true, + serializedName: 'hostName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FactoryGitHubConfiguration; diff --git a/lib/services/datafactoryManagement/lib/models/factoryRepoConfiguration.js b/lib/services/datafactoryManagement/lib/models/factoryRepoConfiguration.js new file mode 100644 index 0000000000..fed15a1a80 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/factoryRepoConfiguration.js @@ -0,0 +1,98 @@ +/* + * 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'; + +/** + * Factory's git repo information. + * + */ +class FactoryRepoConfiguration { + /** + * Create a FactoryRepoConfiguration. + * @member {string} accountName Account name. + * @member {string} repositoryName Rrepository name. + * @member {string} collaborationBranch Collaboration branch. + * @member {string} rootFolder Root folder. + * @member {string} [lastCommitId] Last commit id. + * @member {string} type Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of FactoryRepoConfiguration + * + * @returns {object} metadata of FactoryRepoConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'FactoryRepoConfiguration', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'FactoryRepoConfiguration', + className: 'FactoryRepoConfiguration', + modelProperties: { + accountName: { + required: true, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + repositoryName: { + required: true, + serializedName: 'repositoryName', + type: { + name: 'String' + } + }, + collaborationBranch: { + required: true, + serializedName: 'collaborationBranch', + type: { + name: 'String' + } + }, + rootFolder: { + required: true, + serializedName: 'rootFolder', + type: { + name: 'String' + } + }, + lastCommitId: { + required: false, + serializedName: 'lastCommitId', + type: { + name: 'String' + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FactoryRepoConfiguration; diff --git a/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js b/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js new file mode 100644 index 0000000000..07344d1733 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js @@ -0,0 +1,75 @@ +/* + * 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'); + +/** + * Factory's git repo information. + * + */ +class FactoryRepoUpdate { + /** + * Create a FactoryRepoUpdate. + * @member {string} [factoryResourceId] The factory resource id. + * @member {object} [repoConfiguration] Git repo information of the factory. + * @member {string} [repoConfiguration.accountName] Account name. + * @member {string} [repoConfiguration.repositoryName] Rrepository name. + * @member {string} [repoConfiguration.collaborationBranch] Collaboration + * branch. + * @member {string} [repoConfiguration.rootFolder] Root folder. + * @member {string} [repoConfiguration.lastCommitId] Last commit id. + * @member {string} [repoConfiguration.type] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of FactoryRepoUpdate + * + * @returns {object} metadata of FactoryRepoUpdate + * + */ + mapper() { + return { + required: false, + serializedName: 'FactoryRepoUpdate', + type: { + name: 'Composite', + className: 'FactoryRepoUpdate', + modelProperties: { + factoryResourceId: { + required: false, + serializedName: 'factoryResourceId', + type: { + name: 'String' + } + }, + repoConfiguration: { + required: false, + serializedName: 'repoConfiguration', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'FactoryRepoConfiguration', + className: 'FactoryRepoConfiguration' + } + } + } + } + }; + } +} + +module.exports = FactoryRepoUpdate; diff --git a/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js b/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js new file mode 100644 index 0000000000..df68d3d378 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js @@ -0,0 +1,112 @@ +/* + * 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'); + +/** + * Factory's VSTS repo information. + * + * @extends models['FactoryRepoConfiguration'] + */ +class FactoryVSTSConfiguration extends models['FactoryRepoConfiguration'] { + /** + * Create a FactoryVSTSConfiguration. + * @member {string} projectName VSTS project name. + * @member {string} [tenantId] VSTS tenant id. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FactoryVSTSConfiguration + * + * @returns {object} metadata of FactoryVSTSConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'FactoryVSTSConfiguration', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'FactoryRepoConfiguration', + className: 'FactoryVSTSConfiguration', + modelProperties: { + accountName: { + required: true, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + repositoryName: { + required: true, + serializedName: 'repositoryName', + type: { + name: 'String' + } + }, + collaborationBranch: { + required: true, + serializedName: 'collaborationBranch', + type: { + name: 'String' + } + }, + rootFolder: { + required: true, + serializedName: 'rootFolder', + type: { + name: 'String' + } + }, + lastCommitId: { + required: false, + serializedName: 'lastCommitId', + type: { + name: 'String' + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + projectName: { + required: true, + serializedName: 'projectName', + type: { + name: 'String' + } + }, + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FactoryVSTSConfiguration; diff --git a/lib/services/datafactoryManagement/lib/models/filterActivity.js b/lib/services/datafactoryManagement/lib/models/filterActivity.js index fffe385ff0..97fdeb8038 100644 --- a/lib/services/datafactoryManagement/lib/models/filterActivity.js +++ b/lib/services/datafactoryManagement/lib/models/filterActivity.js @@ -89,6 +89,20 @@ class FilterActivity extends models['ControlActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/forEachActivity.js b/lib/services/datafactoryManagement/lib/models/forEachActivity.js index c874a5d612..775d78820e 100644 --- a/lib/services/datafactoryManagement/lib/models/forEachActivity.js +++ b/lib/services/datafactoryManagement/lib/models/forEachActivity.js @@ -93,6 +93,20 @@ class ForEachActivity extends models['ControlActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js b/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js index 26a3a025b0..040a0ce1d5 100644 --- a/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js +++ b/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js @@ -89,6 +89,20 @@ class GetMetadataActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/greenplumLinkedService.js b/lib/services/datafactoryManagement/lib/models/greenplumLinkedService.js index 0823499773..32be644324 100644 --- a/lib/services/datafactoryManagement/lib/models/greenplumLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/greenplumLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class GreenplumLinkedService extends models['LinkedService'] { /** * Create a GreenplumLinkedService. - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class GreenplumLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js index dc2d5e59f3..71f0ef26f3 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js @@ -99,6 +99,20 @@ class HDInsightHiveActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js index caafacc678..3308c8ec83 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js @@ -102,6 +102,20 @@ class HDInsightMapReduceActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js index d799d1dfdc..0ecf95c8bb 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js @@ -99,6 +99,20 @@ class HDInsightPigActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js index 67126d2e69..a608fba330 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js @@ -104,6 +104,20 @@ class HDInsightSparkActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js index 20c9406e29..016023cdfd 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js @@ -111,6 +111,20 @@ class HDInsightStreamingActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js b/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js index 87e1efc469..bd5a8716d7 100644 --- a/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js @@ -97,6 +97,20 @@ class IfConditionActivity extends models['ControlActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 849302301d..4ceca334e4 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -27,6 +27,7 @@ export { CloudError } from 'ms-rest-azure'; * @member {string} [type] The resource type. * @member {string} [location] The resource location. * @member {object} [tags] The resource tags. + * @member {string} [eTag] Etag identifies change in the resource. */ export interface Resource extends BaseResource { readonly id?: string; @@ -34,6 +35,7 @@ export interface Resource extends BaseResource { readonly type?: string; location?: string; tags?: { [propertyName: string]: string }; + readonly eTag?: string; } /** @@ -140,6 +142,28 @@ export interface FactoryIdentity { readonly tenantId?: string; } +/** + * @class + * Initializes a new instance of the FactoryRepoConfiguration class. + * @constructor + * Factory's git repo information. + * + * @member {string} accountName Account name. + * @member {string} repositoryName Rrepository name. + * @member {string} collaborationBranch Collaboration branch. + * @member {string} rootFolder Root folder. + * @member {string} [lastCommitId] Last commit id. + * @member {string} type Polymorphic Discriminator + */ +export interface FactoryRepoConfiguration { + accountName: string; + repositoryName: string; + collaborationBranch: string; + rootFolder: string; + lastCommitId?: string; + type: string; +} + /** * @class * Initializes a new instance of the Factory class. @@ -153,12 +177,21 @@ export interface FactoryIdentity { * Succeeded. * @member {date} [createTime] Time the factory was created in ISO8601 format. * @member {string} [version] Version of the factory. + * @member {object} [repoConfiguration] Git repo information of the factory. + * @member {string} [repoConfiguration.accountName] Account name. + * @member {string} [repoConfiguration.repositoryName] Rrepository name. + * @member {string} [repoConfiguration.collaborationBranch] Collaboration + * branch. + * @member {string} [repoConfiguration.rootFolder] Root folder. + * @member {string} [repoConfiguration.lastCommitId] Last commit id. + * @member {string} [repoConfiguration.type] Polymorphic Discriminator */ export interface Factory extends Resource { identity?: FactoryIdentity; readonly provisioningState?: string; readonly createTime?: Date; readonly version?: string; + repoConfiguration?: FactoryRepoConfiguration; /** * @property Describes unknown properties. The value of an unknown property * can be of "any" type. @@ -461,12 +494,14 @@ export interface ActivityDependency { * @member {string} name Activity name. * @member {string} [description] Activity description. * @member {array} [dependsOn] Activity depends on condition. + * @member {object} [userProperties] Activity user properties. * @member {string} type Polymorphic Discriminator */ export interface Activity { name: string; description?: string; dependsOn?: ActivityDependency[]; + userProperties?: { [propertyName: string]: string }; type: string; /** * @property Describes unknown properties. The value of an unknown property @@ -557,21 +592,49 @@ export interface CreateRunResponse { /** * @class - * Initializes a new instance of the ErrorResponse class. + * Initializes a new instance of the FactoryVSTSConfiguration class. + * @constructor + * Factory's VSTS repo information. + * + * @member {string} projectName VSTS project name. + * @member {string} [tenantId] VSTS tenant id. + */ +export interface FactoryVSTSConfiguration extends FactoryRepoConfiguration { + projectName: string; + tenantId?: string; +} + +/** + * @class + * Initializes a new instance of the FactoryGitHubConfiguration class. * @constructor - * The object that defines the structure of an Azure Data Factory response. + * Factory's GitHub repo information. * - * @member {string} code Error code. - * @member {string} message Error message. - * @member {string} [target] Property name/path in request associated with - * error. - * @member {array} [details] Array with additional error details. + * @member {string} [hostName] GitHub repo host name. */ -export interface ErrorResponse { - code: string; - message: string; - target?: string; - details?: ErrorResponse[]; +export interface FactoryGitHubConfiguration extends FactoryRepoConfiguration { + readonly hostName?: string; +} + +/** + * @class + * Initializes a new instance of the FactoryRepoUpdate class. + * @constructor + * Factory's git repo information. + * + * @member {string} [factoryResourceId] The factory resource id. + * @member {object} [repoConfiguration] Git repo information of the factory. + * @member {string} [repoConfiguration.accountName] Account name. + * @member {string} [repoConfiguration.repositoryName] Rrepository name. + * @member {string} [repoConfiguration.collaborationBranch] Collaboration + * branch. + * @member {string} [repoConfiguration.rootFolder] Root folder. + * @member {string} [repoConfiguration.lastCommitId] Last commit id. + * @member {string} [repoConfiguration.type] Polymorphic Discriminator + */ +export interface FactoryRepoUpdate { + factoryResourceId?: string; + repoConfiguration?: FactoryRepoConfiguration; } /** @@ -636,17 +699,23 @@ export interface DatasetReference { /** * @class - * Initializes a new instance of the PipelineRunQueryFilter class. + * Initializes a new instance of the RunQueryFilter class. * @constructor - * Query filter option for listing pipeline runs. + * Query filter option for listing runs. * - * @member {string} operand Parameter name to be used for filter. Possible - * values include: 'PipelineName', 'Status', 'RunStart', 'RunEnd' + * @member {string} operand Parameter name to be used for filter. The allowed + * operands to query pipeline runs are PipelineName, RunStart, RunEnd and + * Status; to query activity runs are ActivityName, ActivityRunStart, + * ActivityRunEnd, ActivityType and Status, and to query trigger runs are + * TriggerName, TriggerRunTimestamp and Status. Possible values include: + * 'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName', + * 'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName', + * 'TriggerRunTimestamp' * @member {string} operator Operator to be used for filter. Possible values * include: 'Equals', 'NotEquals', 'In', 'NotIn' * @member {array} values List of filter values. */ -export interface PipelineRunQueryFilter { +export interface RunQueryFilter { operand: string; operator: string; values: string[]; @@ -654,41 +723,46 @@ export interface PipelineRunQueryFilter { /** * @class - * Initializes a new instance of the PipelineRunQueryOrderBy class. + * Initializes a new instance of the RunQueryOrderBy class. * @constructor - * An object to provide order by options for listing pipeline runs. + * An object to provide order by options for listing runs. * - * @member {string} orderBy Parameter name to be used for order by. Possible - * values include: 'RunStart', 'RunEnd' + * @member {string} orderBy Parameter name to be used for order by. The allowed + * parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd + * and Status; for activity runs are ActivityName, ActivityRunStart, + * ActivityRunEnd and Status; for trigger runs are TriggerName, + * TriggerRunTimestamp and Status. Possible values include: 'RunStart', + * 'RunEnd', 'PipelineName', 'Status', 'ActivityName', 'ActivityRunStart', + * 'ActivityRunEnd', 'TriggerName', 'TriggerRunTimestamp' * @member {string} order Sorting order of the parameter. Possible values * include: 'ASC', 'DESC' */ -export interface PipelineRunQueryOrderBy { +export interface RunQueryOrderBy { orderBy: string; order: string; } /** * @class - * Initializes a new instance of the PipelineRunFilterParameters class. + * Initializes a new instance of the RunFilterParameters class. * @constructor - * Query parameters for listing pipeline runs. + * Query parameters for listing runs. * * @member {string} [continuationToken] The continuation token for getting the * next page of results. Null for first page. - * @member {date} lastUpdatedAfter The time at or after which the pipeline run - * event was updated in 'ISO 8601' format. - * @member {date} lastUpdatedBefore The time at or before which the pipeline - * run event was updated in 'ISO 8601' format. + * @member {date} lastUpdatedAfter The time at or after which the run event was + * updated in 'ISO 8601' format. + * @member {date} lastUpdatedBefore The time at or before which the run event + * was updated in 'ISO 8601' format. * @member {array} [filters] List of filters. * @member {array} [orderBy] List of OrderBy option. */ -export interface PipelineRunFilterParameters { +export interface RunFilterParameters { continuationToken?: string; lastUpdatedAfter: Date; lastUpdatedBefore: Date; - filters?: PipelineRunQueryFilter[]; - orderBy?: PipelineRunQueryOrderBy[]; + filters?: RunQueryFilter[]; + orderBy?: RunQueryOrderBy[]; } /** @@ -699,10 +773,13 @@ export interface PipelineRunFilterParameters { * * @member {string} [name] Name of the entity that started the pipeline run. * @member {string} [id] The ID of the entity that started the run. + * @member {string} [invokedByType] The type of the entity that started the + * run. */ export interface PipelineRunInvokedBy { readonly name?: string; readonly id?: string; + readonly invokedByType?: string; } /** @@ -719,6 +796,8 @@ export interface PipelineRunInvokedBy { * @member {string} [invokedBy.name] Name of the entity that started the * pipeline run. * @member {string} [invokedBy.id] The ID of the entity that started the run. + * @member {string} [invokedBy.invokedByType] The type of the entity that + * started the run. * @member {date} [lastUpdated] The last updated timestamp for the pipeline run * event in ISO8601 format. * @member {date} [runStart] The start time of a pipeline run in ISO8601 @@ -748,7 +827,7 @@ export interface PipelineRun { /** * @class - * Initializes a new instance of the PipelineRunQueryResponse class. + * Initializes a new instance of the PipelineRunsQueryResponse class. * @constructor * A list pipeline runs. * @@ -756,7 +835,7 @@ export interface PipelineRun { * @member {string} [continuationToken] The continuation token for getting the * next page of results, if any remaining results exist, null otherwise. */ -export interface PipelineRunQueryResponse { +export interface PipelineRunsQueryResponse { value: PipelineRun[]; continuationToken?: string; } @@ -804,6 +883,21 @@ export interface ActivityRun { [property: string]: any; } +/** + * @class + * Initializes a new instance of the ActivityRunsQueryResponse class. + * @constructor + * A list activity runs. + * + * @member {array} value List of activity runs. + * @member {string} [continuationToken] The continuation token for getting the + * next page of results, if any remaining results exist, null otherwise. + */ +export interface ActivityRunsQueryResponse { + value: ActivityRun[]; + continuationToken?: string; +} + /** * @class * Initializes a new instance of the TriggerRun class. @@ -838,6 +932,21 @@ export interface TriggerRun { [property: string]: any; } +/** + * @class + * Initializes a new instance of the TriggerRunsQueryResponse class. + * @constructor + * A list of trigger runs. + * + * @member {array} value List of trigger runs. + * @member {string} [continuationToken] The continuation token for getting the + * next page of results, if any remaining results exist, null otherwise. + */ +export interface TriggerRunsQueryResponse { + value: TriggerRun[]; + continuationToken?: string; +} + /** * @class * Initializes a new instance of the OperationDisplay class. @@ -889,6 +998,23 @@ export interface OperationMetricAvailability { blobDuration?: string; } +/** + * @class + * Initializes a new instance of the OperationMetricDimension class. + * @constructor + * Defines the metric dimension. + * + * @member {string} [name] The name of the dimension for the metric. + * @member {string} [displayName] The display name of the metric dimension. + * @member {boolean} [toBeExportedForShoebox] Whether the dimension should be + * exported to Azure Monitor. + */ +export interface OperationMetricDimension { + name?: string; + displayName?: string; + toBeExportedForShoebox?: boolean; +} + /** * @class * Initializes a new instance of the OperationMetricSpecification class. @@ -906,6 +1032,7 @@ export interface OperationMetricAvailability { * @member {string} [sourceMdmNamespace] The name of the MDM namespace. * @member {array} [availabilities] Defines how often data for metrics becomes * available. + * @member {array} [dimensions] Defines the metric dimension. */ export interface OperationMetricSpecification { name?: string; @@ -917,6 +1044,7 @@ export interface OperationMetricSpecification { sourceMdmAccount?: string; sourceMdmNamespace?: string; availabilities?: OperationMetricAvailability[]; + dimensions?: OperationMetricDimension[]; } /** @@ -963,22 +1091,6 @@ export interface Operation { serviceSpecification?: OperationServiceSpecification; } -/** - * @class - * Initializes a new instance of the OperationListResponse class. - * @constructor - * A list of operations that can be performed by the Data Factory service. - * - * @member {array} [value] List of Data Factory operations supported by the - * Data Factory resource provider. - * @member {string} [nextLink] The link to the next page of results, if any - * remaining results exist. - */ -export interface OperationListResponse { - value?: Operation[]; - nextLink?: string; -} - /** * @class * Initializes a new instance of the ResponsysLinkedService class. @@ -1252,14 +1364,14 @@ export interface SalesforceMarketingCloudLinkedService extends LinkedService { * @constructor * Netezza linked service. * - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface NetezzaLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; encryptedCredential?: any; } @@ -1269,14 +1381,14 @@ export interface NetezzaLinkedService extends LinkedService { * @constructor * Vertica linked service. * - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface VerticaLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; encryptedCredential?: any; } @@ -1479,7 +1591,7 @@ export interface ShopifyLinkedService extends LinkedService { * ServiceNow server linked service. * * @member {object} endpoint The endpoint of the ServiceNow server. (i.e. - * ServiceNowData.com) + * .service-now.com) * @member {string} authenticationType The authentication type to use. Possible * values include: 'Basic', 'OAuth2' * @member {object} [username] The user name used to connect to the ServiceNow @@ -1524,10 +1636,13 @@ export interface ServiceNowLinkedService extends LinkedService { * quickbooks.api.intuit.com) * @member {object} companyId The company ID of the QuickBooks company to * authorize. - * @member {object} [accessToken] The access token for OAuth 1.0 + * @member {object} consumerKey The consumer key for OAuth 1.0 authentication. + * @member {object} consumerSecret The consumer secret for OAuth 1.0 * authentication. + * @member {string} [consumerSecret.type] Polymorphic Discriminator + * @member {object} accessToken The access token for OAuth 1.0 authentication. * @member {string} [accessToken.type] Polymorphic Discriminator - * @member {object} [accessTokenSecret] The access token secret for OAuth 1.0 + * @member {object} accessTokenSecret The access token secret for OAuth 1.0 * authentication. * @member {string} [accessTokenSecret.type] Polymorphic Discriminator * @member {object} [useEncryptedEndpoints] Specifies whether the data source @@ -1539,8 +1654,10 @@ export interface ServiceNowLinkedService extends LinkedService { export interface QuickBooksLinkedService extends LinkedService { endpoint: any; companyId: any; - accessToken?: SecretBase; - accessTokenSecret?: SecretBase; + consumerKey: any; + consumerSecret: SecretBase; + accessToken: SecretBase; + accessTokenSecret: SecretBase; useEncryptedEndpoints?: any; encryptedCredential?: any; } @@ -1728,14 +1845,14 @@ export interface MarketoLinkedService extends LinkedService { * @constructor * MariaDB server linked service. * - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface MariaDBLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; encryptedCredential?: any; } @@ -2015,14 +2132,14 @@ export interface HBaseLinkedService extends LinkedService { * @constructor * Greenplum Database linked service. * - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface GreenplumLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; encryptedCredential?: any; } @@ -2122,14 +2239,14 @@ export interface EloquaLinkedService extends LinkedService { * @constructor * Drill server linked service. * - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface DrillLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; encryptedCredential?: any; } @@ -2139,14 +2256,14 @@ export interface DrillLinkedService extends LinkedService { * @constructor * Couchbase server linked service. * - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface CouchbaseLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; encryptedCredential?: any; } @@ -2190,14 +2307,14 @@ export interface ConcurLinkedService extends LinkedService { * @constructor * Azure PostgreSQL linked service. * - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface AzurePostgreSqlLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; encryptedCredential?: any; } @@ -2857,8 +2974,8 @@ export interface HdfsLinkedService extends LinkedService { * Open Database Connectivity (ODBC) linked service. * * @member {object} connectionString The non-access credential portion of the - * connection string as well as an optional encrypted credential. - * @member {string} [connectionString.type] Polymorphic Discriminator + * connection string as well as an optional encrypted credential. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [authenticationType] Type of authentication used to connect * to the ODBC data store. Possible values are: Anonymous and Basic. Type: * string (or Expression with resultType string). @@ -2874,7 +2991,7 @@ export interface HdfsLinkedService extends LinkedService { * credential manager. Type: string (or Expression with resultType string). */ export interface OdbcLinkedService extends LinkedService { - connectionString: SecretBase; + connectionString: any; authenticationType?: any; credential?: SecretBase; userName?: any; @@ -2927,8 +3044,6 @@ export interface AzureMLLinkedService extends LinkedService { * * @member {object} server Server name for connection. Type: string (or * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). * @member {string} [authenticationType] AuthenticationType to be used for * connection. Possible values include: 'Basic', 'Windows' * @member {object} [username] Username for authentication. Type: string (or @@ -2941,7 +3056,6 @@ export interface AzureMLLinkedService extends LinkedService { */ export interface TeradataLinkedService extends LinkedService { server: any; - schema?: any; authenticationType?: string; username?: any; password?: SecretBase; @@ -2958,8 +3072,6 @@ export interface TeradataLinkedService extends LinkedService { * Expression with resultType string). * @member {object} database Database name for connection. Type: string (or * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). * @member {string} [authenticationType] AuthenticationType to be used for * connection. Possible values include: 'Basic' * @member {object} [username] Username for authentication. Type: string (or @@ -2973,7 +3085,6 @@ export interface TeradataLinkedService extends LinkedService { export interface Db2LinkedService extends LinkedService { server: any; database: any; - schema?: any; authenticationType?: string; username?: any; password?: SecretBase; @@ -3018,26 +3129,14 @@ export interface SybaseLinkedService extends LinkedService { * @constructor * Linked service for PostgreSQL data source. * - * @member {object} server Server name for connection. Type: string (or - * Expression with resultType string). - * @member {object} database Database name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [username] Username for authentication. Type: string (or - * Expression with resultType string). - * @member {object} [password] Password for authentication. - * @member {string} [password.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. + * @member {string} [connectionString.type] Polymorphic Discriminator * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface PostgreSqlLinkedService extends LinkedService { - server: any; - database: any; - schema?: any; - username?: any; - password?: SecretBase; + connectionString: SecretBase; encryptedCredential?: any; } @@ -3047,26 +3146,14 @@ export interface PostgreSqlLinkedService extends LinkedService { * @constructor * Linked service for MySQL data source. * - * @member {object} server Server name for connection. Type: string (or - * Expression with resultType string). - * @member {object} database Database name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [username] Username for authentication. Type: string (or - * Expression with resultType string). - * @member {object} [password] Password for authentication. - * @member {string} [password.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. + * @member {string} [connectionString.type] Polymorphic Discriminator * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface MySqlLinkedService extends LinkedService { - server: any; - database: any; - schema?: any; - username?: any; - password?: SecretBase; + connectionString: SecretBase; encryptedCredential?: any; } @@ -3076,14 +3163,14 @@ export interface MySqlLinkedService extends LinkedService { * @constructor * Azure MySQL database linked service. * - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface AzureMySqlLinkedService extends LinkedService { - connectionString: SecretBase; + connectionString: any; encryptedCredential?: any; } @@ -3093,14 +3180,14 @@ export interface AzureMySqlLinkedService extends LinkedService { * @constructor * Oracle database. * - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface OracleLinkedService extends LinkedService { - connectionString: SecretBase; + connectionString: any; encryptedCredential?: any; } @@ -3214,14 +3301,14 @@ export interface DynamicsLinkedService extends LinkedService { * @constructor * Microsoft Azure Cosmos Database (CosmosDB) linked service. * - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ export interface CosmosDbLinkedService extends LinkedService { - connectionString: SecretBase; + connectionString: any; encryptedCredential?: any; } @@ -3277,8 +3364,8 @@ export interface AzureBatchLinkedService extends LinkedService { * @constructor * Microsoft Azure SQL Database linked service. * - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [servicePrincipalId] The ID of the service principal used * to authenticate against Azure SQL Database. Type: string (or Expression with * resultType string). @@ -3292,7 +3379,7 @@ export interface AzureBatchLinkedService extends LinkedService { * credential manager. Type: string (or Expression with resultType string). */ export interface AzureSqlDatabaseLinkedService extends LinkedService { - connectionString: SecretBase; + connectionString: any; servicePrincipalId?: any; servicePrincipalKey?: SecretBase; tenant?: any; @@ -3305,8 +3392,8 @@ export interface AzureSqlDatabaseLinkedService extends LinkedService { * @constructor * SQL Server linked service. * - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [userName] The on-premises Windows authentication user * name. Type: string (or Expression with resultType string). * @member {object} [password] The on-premises Windows authentication password. @@ -3316,7 +3403,7 @@ export interface AzureSqlDatabaseLinkedService extends LinkedService { * credential manager. Type: string (or Expression with resultType string). */ export interface SqlServerLinkedService extends LinkedService { - connectionString: SecretBase; + connectionString: any; userName?: any; password?: SecretBase; encryptedCredential?: any; @@ -3328,8 +3415,9 @@ export interface SqlServerLinkedService extends LinkedService { * @constructor * Azure SQL Data Warehouse linked service. * - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or + * AzureKeyVaultSecretReference. * @member {object} [servicePrincipalId] The ID of the service principal used * to authenticate against Azure SQL Data Warehouse. Type: string (or * Expression with resultType string). @@ -3343,7 +3431,7 @@ export interface SqlServerLinkedService extends LinkedService { * credential manager. Type: string (or Expression with resultType string). */ export interface AzureSqlDWLinkedService extends LinkedService { - connectionString: SecretBase; + connectionString: any; servicePrincipalId?: any; servicePrincipalKey?: SecretBase; tenant?: any; @@ -3357,8 +3445,8 @@ export interface AzureSqlDWLinkedService extends LinkedService { * The storage account linked service. * * @member {object} [connectionString] The connection string. It is mutually - * exclusive with sasUri property. - * @member {string} [connectionString.type] Polymorphic Discriminator + * exclusive with sasUri property. Type: string, SecureString or + * AzureKeyVaultSecretReference. * @member {object} [sasUri] SAS URI of the Azure Storage resource. It is * mutually exclusive with connectionString property. * @member {string} [sasUri.type] Polymorphic Discriminator @@ -3367,7 +3455,7 @@ export interface AzureSqlDWLinkedService extends LinkedService { * credential manager. Type: string (or Expression with resultType string). */ export interface AzureStorageLinkedService extends LinkedService { - connectionString?: SecretBase; + connectionString?: any; sasUri?: SecretBase; encryptedCredential?: any; } @@ -4348,6 +4436,31 @@ export interface MultiplePipelineTrigger extends Trigger { pipelines?: TriggerPipelineReference[]; } +/** + * @class + * Initializes a new instance of the BlobEventsTrigger class. + * @constructor + * Trigger that runs everytime a Blob event occurs. + * + * @member {string} [blobPathBeginsWith] The blob path must begin with the + * pattern provided for trigger to fire. For example, + * '/records/blobs/december/' will only fire the trigger for blobs in the + * december folder under the records container. At least one of these must be + * provided: blobPathBeginsWith, blobPathEndsWith. + * @member {string} [blobPathEndsWith] The blob path must end with the pattern + * provided for trigger to fire. For example, 'december/boxes.csv' will only + * fire the trigger for blobs named boxes in a december folder. At least one of + * these must be provided: blobPathBeginsWith, blobPathEndsWith. + * @member {array} events The type of events that cause this trigger to fire. + * @member {string} scope The ARM resource ID of the Storage Account. + */ +export interface BlobEventsTrigger extends MultiplePipelineTrigger { + blobPathBeginsWith?: string; + blobPathEndsWith?: string; + events: string[]; + scope: string; +} + /** * @class * Initializes a new instance of the BlobTrigger class. @@ -5644,6 +5757,35 @@ export interface CustomActivity extends ExecutionActivity { extendedProperties?: { [propertyName: string]: any }; } +/** + * @class + * Initializes a new instance of the SSISPropertyOverride class. + * @constructor + * SSIS property override. + * + * @member {object} value SSIS package property override value. Type: string + * (or Expression with resultType string). + * @member {boolean} [isSensitive] Whether SSIS package property override value + * is sensitive data. Value will be encrypted in SSISDB if it is true + */ +export interface SSISPropertyOverride { + value: any; + isSensitive?: boolean; +} + +/** + * @class + * Initializes a new instance of the SSISExecutionParameter class. + * @constructor + * SSIS execution parameter. + * + * @member {object} value SSIS package execution parameter value. Type: string + * (or Expression with resultType string). + */ +export interface SSISExecutionParameter { + value: any; +} + /** * @class * Initializes a new instance of the SSISPackageLocation class. @@ -5667,12 +5809,22 @@ export interface SSISPackageLocation { * @member {string} [runtime] Specifies the runtime to execute SSIS package. * Possible values include: 'x64', 'x86' * @member {string} [loggingLevel] The logging level of SSIS package execution. - * @member {string} [environmentPath] The environment path to execution the - * SSIS package. + * @member {string} [environmentPath] The environment path to execute the SSIS + * package. * @member {object} connectVia The integration runtime reference. * @member {string} [connectVia.referenceName] Reference integration runtime * name. * @member {object} [connectVia.parameters] Arguments for integration runtime. + * @member {object} [projectParameters] The project level parameters to execute + * the SSIS package. + * @member {object} [packageParameters] The package level parameters to execute + * the SSIS package. + * @member {object} [projectConnectionManagers] The project level connection + * managers to execute the SSIS package. + * @member {object} [packageConnectionManagers] The package level connection + * managers to execute the SSIS package. + * @member {object} [propertyOverrides] The property overrides to execute the + * SSIS package. */ export interface ExecuteSSISPackageActivity extends ExecutionActivity { packageLocation: SSISPackageLocation; @@ -5680,6 +5832,11 @@ export interface ExecuteSSISPackageActivity extends ExecutionActivity { loggingLevel?: string; environmentPath?: string; connectVia: IntegrationRuntimeReference; + projectParameters?: { [propertyName: string]: SSISExecutionParameter }; + packageParameters?: { [propertyName: string]: SSISExecutionParameter }; + projectConnectionManagers?: { [propertyName: string]: { [propertyName: string]: SSISExecutionParameter } }; + packageConnectionManagers?: { [propertyName: string]: { [propertyName: string]: SSISExecutionParameter } }; + propertyOverrides?: { [propertyName: string]: SSISPropertyOverride }; } /** @@ -5932,11 +6089,17 @@ export interface CopyTranslator { * @constructor * A copy activity tabular translator. * - * @member {object} [columnMappings] Column mappings. Type: string (or - * Expression with resultType string). + * @member {object} [columnMappings] Column mappings. Example: "UserId: + * MyUserId, Group: MyGroup, Name: MyName" Type: string (or Expression with + * resultType string). + * @member {object} [schemaMapping] The schema mapping to map between tabular + * data and hierarchical data. Example: {"Column1": "$.Column1", "Column2": + * "$.Column2.Property1", "Column3": "$.Column2.Property2"}. Type: object (or + * Expression with resultType object). */ export interface TabularTranslator extends CopyTranslator { columnMappings?: any; + schemaMapping?: any; } /** @@ -6291,9 +6454,9 @@ export interface SapCloudForCustomerSink extends CopySink { * @member {object} [parallelCopies] Maximum number of concurrent sessions * opened on the source or sink to avoid overloading the data store. Type: * integer (or Expression with resultType integer), minimum: 0. - * @member {object} [cloudDataMovementUnits] Maximum number of cloud data - * movement units that can be used to perform this data movement. Type: integer - * (or Expression with resultType integer), minimum: 0. + * @member {object} [dataIntegrationUnits] Maximum number of data integration + * units that can be used to perform this data movement. Type: integer (or + * Expression with resultType integer), minimum: 0. * @member {object} [enableSkipIncompatibleRow] Whether to skip incompatible * row. Default value is false. Type: boolean (or Expression with resultType * boolean). @@ -6317,7 +6480,7 @@ export interface CopyActivity extends ExecutionActivity { enableStaging?: any; stagingSettings?: StagingSettings; parallelCopies?: any; - cloudDataMovementUnits?: any; + dataIntegrationUnits?: any; enableSkipIncompatibleRow?: any; redirectIncompatibleRowSettings?: RedirectIncompatibleRowSettings; inputs?: DatasetReference[]; @@ -6452,30 +6615,6 @@ export interface ExecutePipelineActivity extends ControlActivity { waitOnCompletion?: boolean; } -/** - * @class - * Initializes a new instance of the LinkedIntegrationRuntime class. - * @constructor - * The linked integration runtime information. - * - * @member {string} [name] The name of the linked integration runtime. - * @member {string} [subscriptionId] The subscription ID for which the linked - * integration runtime belong to. - * @member {string} [dataFactoryName] The name of the data factory for which - * the linked integration runtime belong to. - * @member {string} [dataFactoryLocation] The location of the data factory for - * which the linked integration runtime belong to. - * @member {date} [createTime] The creating time of the linked integration - * runtime. - */ -export interface LinkedIntegrationRuntime { - readonly name?: string; - readonly subscriptionId?: string; - readonly dataFactoryName?: string; - readonly dataFactoryLocation?: string; - readonly createTime?: Date; -} - /** * @class * Initializes a new instance of the SelfHostedIntegrationRuntimeNode class. @@ -6568,8 +6707,9 @@ export interface SelfHostedIntegrationRuntimeNode { * @member {string} [autoUpdate] Whether Self-hosted integration runtime auto * update has been turned on. Possible values include: 'On', 'Off' * @member {string} [versionStatus] Status of the integration runtime version. - * @member {array} [links] The list of linked integration runtimes that are - * created to share with this integration runtime. + * @member {string} [pushedVersion] The version that the integration runtime is + * going to update to. + * @member {string} [latestVersion] The latest version on download center. */ export interface SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { readonly createTime?: Date; @@ -6584,7 +6724,8 @@ export interface SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeSt readonly serviceUrls?: string[]; readonly autoUpdate?: string; readonly versionStatus?: string; - links?: LinkedIntegrationRuntime[]; + readonly pushedVersion?: string; + readonly latestVersion?: string; } /** @@ -6690,55 +6831,14 @@ export interface ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatu readonly lastOperation?: ManagedIntegrationRuntimeOperationResult; } -/** - * @class - * Initializes a new instance of the LinkedIntegrationRuntimeProperties class. - * @constructor - * The base definition of a secret type. - * - * @member {string} authorizationType Polymorphic Discriminator - */ -export interface LinkedIntegrationRuntimeProperties { - authorizationType: string; -} - -/** - * @class - * Initializes a new instance of the LinkedIntegrationRuntimeRbac class. - * @constructor - * The base definition of a secret type. - * - * @member {string} resourceId The resource ID of the integration runtime to be - * shared. - */ -export interface LinkedIntegrationRuntimeRbac extends LinkedIntegrationRuntimeProperties { - resourceId: string; -} - -/** - * @class - * Initializes a new instance of the LinkedIntegrationRuntimeKey class. - * @constructor - * The base definition of a secret type. - * - * @member {object} key Type of the secret. - * @member {string} [key.value] Value of secure string. - */ -export interface LinkedIntegrationRuntimeKey extends LinkedIntegrationRuntimeProperties { - key: SecureString; -} - /** * @class * Initializes a new instance of the SelfHostedIntegrationRuntime class. * @constructor * Self-hosted integration runtime. * - * @member {object} [linkedInfo] - * @member {string} [linkedInfo.authorizationType] Polymorphic Discriminator */ export interface SelfHostedIntegrationRuntime extends IntegrationRuntime { - linkedInfo?: LinkedIntegrationRuntimeProperties; } /** @@ -7016,23 +7116,6 @@ export interface IntegrationRuntimeMonitoringData { nodes?: IntegrationRuntimeNodeMonitoringData[]; } -/** - * @class - * Initializes a new instance of the IntegrationRuntimeRemoveNodeRequest class. - * @constructor - * Request to remove a node. - * - * @member {string} [nodeName] The name of the node to be removed. - */ -export interface IntegrationRuntimeRemoveNodeRequest { - nodeName?: string; - /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; -} - /** * @class * Initializes a new instance of the IntegrationRuntimeAuthKeys class. @@ -7097,6 +7180,19 @@ export interface IntegrationRuntimeConnectionInfo { } +/** + * @class + * Initializes a new instance of the OperationListResponse class. + * @constructor + * A list of operations that can be performed by the Data Factory service. + * + * @member {string} [nextLink] The link to the next page of results, if any + * remaining results exist. + */ +export interface OperationListResponse extends Array { + nextLink?: string; +} + /** * @class * Initializes a new instance of the FactoryListResponse class. @@ -7162,19 +7258,6 @@ export interface PipelineListResponse extends Array { nextLink?: string; } -/** - * @class - * Initializes a new instance of the ActivityRunsListResponse class. - * @constructor - * A list activity runs. - * - * @member {string} [nextLink] The link to the next page of results, if any - * remaining results exist. - */ -export interface ActivityRunsListResponse extends Array { - nextLink?: string; -} - /** * @class * Initializes a new instance of the TriggerListResponse class. @@ -7187,16 +7270,3 @@ export interface ActivityRunsListResponse extends Array { export interface TriggerListResponse extends Array { nextLink?: string; } - -/** - * @class - * Initializes a new instance of the TriggerRunListResponse class. - * @constructor - * A list of trigger runs. - * - * @member {string} [nextLink] The link to the next page of results, if any - * remaining results exist. - */ -export interface TriggerRunListResponse extends Array { - nextLink?: string; -} diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 83986bec0d..3b376c98a4 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -26,6 +26,7 @@ exports.SecureString = require('./secureString'); exports.LinkedServiceReference = require('./linkedServiceReference'); exports.AzureKeyVaultSecretReference = require('./azureKeyVaultSecretReference'); exports.FactoryIdentity = require('./factoryIdentity'); +exports.FactoryRepoConfiguration = require('./factoryRepoConfiguration'); exports.Factory = require('./factory'); exports.IntegrationRuntime = require('./integrationRuntime'); exports.IntegrationRuntimeResource = require('./integrationRuntimeResource'); @@ -46,26 +47,30 @@ exports.PipelineResource = require('./pipelineResource'); exports.Trigger = require('./trigger'); exports.TriggerResource = require('./triggerResource'); exports.CreateRunResponse = require('./createRunResponse'); -exports.ErrorResponse = require('./errorResponse'); +exports.FactoryVSTSConfiguration = require('./factoryVSTSConfiguration'); +exports.FactoryGitHubConfiguration = require('./factoryGitHubConfiguration'); +exports.FactoryRepoUpdate = require('./factoryRepoUpdate'); exports.PipelineReference = require('./pipelineReference'); exports.TriggerPipelineReference = require('./triggerPipelineReference'); exports.FactoryUpdateParameters = require('./factoryUpdateParameters'); exports.DatasetReference = require('./datasetReference'); -exports.PipelineRunQueryFilter = require('./pipelineRunQueryFilter'); -exports.PipelineRunQueryOrderBy = require('./pipelineRunQueryOrderBy'); -exports.PipelineRunFilterParameters = require('./pipelineRunFilterParameters'); +exports.RunQueryFilter = require('./runQueryFilter'); +exports.RunQueryOrderBy = require('./runQueryOrderBy'); +exports.RunFilterParameters = require('./runFilterParameters'); exports.PipelineRunInvokedBy = require('./pipelineRunInvokedBy'); exports.PipelineRun = require('./pipelineRun'); -exports.PipelineRunQueryResponse = require('./pipelineRunQueryResponse'); +exports.PipelineRunsQueryResponse = require('./pipelineRunsQueryResponse'); exports.ActivityRun = require('./activityRun'); +exports.ActivityRunsQueryResponse = require('./activityRunsQueryResponse'); exports.TriggerRun = require('./triggerRun'); +exports.TriggerRunsQueryResponse = require('./triggerRunsQueryResponse'); exports.OperationDisplay = require('./operationDisplay'); exports.OperationLogSpecification = require('./operationLogSpecification'); exports.OperationMetricAvailability = require('./operationMetricAvailability'); +exports.OperationMetricDimension = require('./operationMetricDimension'); exports.OperationMetricSpecification = require('./operationMetricSpecification'); exports.OperationServiceSpecification = require('./operationServiceSpecification'); exports.Operation = require('./operation'); -exports.OperationListResponse = require('./operationListResponse'); exports.ResponsysLinkedService = require('./responsysLinkedService'); exports.AzureDatabricksLinkedService = require('./azureDatabricksLinkedService'); exports.AzureDataLakeAnalyticsLinkedService = require('./azureDataLakeAnalyticsLinkedService'); @@ -207,6 +212,7 @@ exports.AmazonS3Dataset = require('./amazonS3Dataset'); exports.RetryPolicy = require('./retryPolicy'); exports.TumblingWindowTrigger = require('./tumblingWindowTrigger'); exports.MultiplePipelineTrigger = require('./multiplePipelineTrigger'); +exports.BlobEventsTrigger = require('./blobEventsTrigger'); exports.BlobTrigger = require('./blobTrigger'); exports.RecurrenceScheduleOccurrence = require('./recurrenceScheduleOccurrence'); exports.RecurrenceSchedule = require('./recurrenceSchedule'); @@ -280,6 +286,8 @@ exports.LookupActivity = require('./lookupActivity'); exports.SqlServerStoredProcedureActivity = require('./sqlServerStoredProcedureActivity'); exports.CustomActivityReferenceObject = require('./customActivityReferenceObject'); exports.CustomActivity = require('./customActivity'); +exports.SSISPropertyOverride = require('./sSISPropertyOverride'); +exports.SSISExecutionParameter = require('./sSISExecutionParameter'); exports.SSISPackageLocation = require('./sSISPackageLocation'); exports.ExecuteSSISPackageActivity = require('./executeSSISPackageActivity'); exports.HDInsightSparkActivity = require('./hDInsightSparkActivity'); @@ -315,16 +323,12 @@ exports.WaitActivity = require('./waitActivity'); exports.ForEachActivity = require('./forEachActivity'); exports.IfConditionActivity = require('./ifConditionActivity'); exports.ExecutePipelineActivity = require('./executePipelineActivity'); -exports.LinkedIntegrationRuntime = require('./linkedIntegrationRuntime'); exports.SelfHostedIntegrationRuntimeNode = require('./selfHostedIntegrationRuntimeNode'); exports.SelfHostedIntegrationRuntimeStatus = require('./selfHostedIntegrationRuntimeStatus'); exports.ManagedIntegrationRuntimeOperationResult = require('./managedIntegrationRuntimeOperationResult'); exports.ManagedIntegrationRuntimeError = require('./managedIntegrationRuntimeError'); exports.ManagedIntegrationRuntimeNode = require('./managedIntegrationRuntimeNode'); exports.ManagedIntegrationRuntimeStatus = require('./managedIntegrationRuntimeStatus'); -exports.LinkedIntegrationRuntimeProperties = require('./linkedIntegrationRuntimeProperties'); -exports.LinkedIntegrationRuntimeRbac = require('./linkedIntegrationRuntimeRbac'); -exports.LinkedIntegrationRuntimeKey = require('./linkedIntegrationRuntimeKey'); exports.SelfHostedIntegrationRuntime = require('./selfHostedIntegrationRuntime'); exports.IntegrationRuntimeCustomSetupScriptProperties = require('./integrationRuntimeCustomSetupScriptProperties'); exports.IntegrationRuntimeSsisCatalogInfo = require('./integrationRuntimeSsisCatalogInfo'); @@ -335,28 +339,29 @@ exports.ManagedIntegrationRuntime = require('./managedIntegrationRuntime'); exports.IntegrationRuntimeNodeIpAddress = require('./integrationRuntimeNodeIpAddress'); exports.IntegrationRuntimeNodeMonitoringData = require('./integrationRuntimeNodeMonitoringData'); exports.IntegrationRuntimeMonitoringData = require('./integrationRuntimeMonitoringData'); -exports.IntegrationRuntimeRemoveNodeRequest = require('./integrationRuntimeRemoveNodeRequest'); exports.IntegrationRuntimeAuthKeys = require('./integrationRuntimeAuthKeys'); exports.IntegrationRuntimeRegenerateKeyParameters = require('./integrationRuntimeRegenerateKeyParameters'); exports.IntegrationRuntimeConnectionInfo = require('./integrationRuntimeConnectionInfo'); +exports.OperationListResponse = require('./operationListResponse'); exports.FactoryListResponse = require('./factoryListResponse'); exports.IntegrationRuntimeListResponse = require('./integrationRuntimeListResponse'); exports.LinkedServiceListResponse = require('./linkedServiceListResponse'); exports.DatasetListResponse = require('./datasetListResponse'); exports.PipelineListResponse = require('./pipelineListResponse'); -exports.ActivityRunsListResponse = require('./activityRunsListResponse'); exports.TriggerListResponse = require('./triggerListResponse'); -exports.TriggerRunListResponse = require('./triggerRunListResponse'); exports.discriminators = { 'SecretBase.SecureString' : exports.SecureString, 'SecretBase.AzureKeyVaultSecret' : exports.AzureKeyVaultSecretReference, 'SecretBase' : exports.SecretBase, + 'FactoryRepoConfiguration' : exports.FactoryRepoConfiguration, 'IntegrationRuntime' : exports.IntegrationRuntime, 'IntegrationRuntimeStatus' : exports.IntegrationRuntimeStatus, 'LinkedService' : exports.LinkedService, 'Dataset' : exports.Dataset, 'Activity' : exports.Activity, 'Trigger' : exports.Trigger, + 'FactoryRepoConfiguration.FactoryVSTSConfiguration' : exports.FactoryVSTSConfiguration, + 'FactoryRepoConfiguration.FactoryGithubConfiguration' : exports.FactoryGitHubConfiguration, 'LinkedService.Responsys' : exports.ResponsysLinkedService, 'LinkedService.AzureDatabricks' : exports.AzureDatabricksLinkedService, 'LinkedService.AzureDataLakeAnalytics' : exports.AzureDataLakeAnalyticsLinkedService, @@ -496,6 +501,7 @@ exports.discriminators = { 'Dataset.AzureBlob' : exports.AzureBlobDataset, 'Dataset.AmazonS3Object' : exports.AmazonS3Dataset, 'Trigger.TumblingWindowTrigger' : exports.TumblingWindowTrigger, + 'Trigger.BlobEventsTrigger' : exports.BlobEventsTrigger, 'Trigger.BlobTrigger' : exports.BlobTrigger, 'Trigger.ScheduleTrigger' : exports.ScheduleTrigger, 'Trigger.MultiplePipelineTrigger' : exports.MultiplePipelineTrigger, @@ -593,9 +599,6 @@ exports.discriminators = { 'Activity.Container' : exports.ControlActivity, 'IntegrationRuntimeStatus.SelfHosted' : exports.SelfHostedIntegrationRuntimeStatus, 'IntegrationRuntimeStatus.Managed' : exports.ManagedIntegrationRuntimeStatus, - 'LinkedIntegrationRuntimeProperties.RBAC' : exports.LinkedIntegrationRuntimeRbac, - 'LinkedIntegrationRuntimeProperties.Key' : exports.LinkedIntegrationRuntimeKey, - 'LinkedIntegrationRuntimeProperties' : exports.LinkedIntegrationRuntimeProperties, 'IntegrationRuntime.SelfHosted' : exports.SelfHostedIntegrationRuntime, 'IntegrationRuntime.Managed' : exports.ManagedIntegrationRuntime }; diff --git a/lib/services/datafactoryManagement/lib/models/integrationRuntimeComputeProperties.js b/lib/services/datafactoryManagement/lib/models/integrationRuntimeComputeProperties.js index cc5d6142e1..123bf8b39b 100644 --- a/lib/services/datafactoryManagement/lib/models/integrationRuntimeComputeProperties.js +++ b/lib/services/datafactoryManagement/lib/models/integrationRuntimeComputeProperties.js @@ -92,7 +92,6 @@ class IntegrationRuntimeComputeProperties { required: false, serializedName: 'maxParallelExecutionsPerNode', constraints: { - InclusiveMaximum: 8, InclusiveMinimum: 1 }, type: { diff --git a/lib/services/datafactoryManagement/lib/models/lookupActivity.js b/lib/services/datafactoryManagement/lib/models/lookupActivity.js index 6120d6f5aa..9b5b1aac04 100644 --- a/lib/services/datafactoryManagement/lib/models/lookupActivity.js +++ b/lib/services/datafactoryManagement/lib/models/lookupActivity.js @@ -99,6 +99,20 @@ class LookupActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/mariaDBLinkedService.js b/lib/services/datafactoryManagement/lib/models/mariaDBLinkedService.js index 6c3a719f53..766d9a01e3 100644 --- a/lib/services/datafactoryManagement/lib/models/mariaDBLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/mariaDBLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class MariaDBLinkedService extends models['LinkedService'] { /** * Create a MariaDBLinkedService. - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class MariaDBLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/mySqlLinkedService.js b/lib/services/datafactoryManagement/lib/models/mySqlLinkedService.js index e903497fca..ce64b3ca47 100644 --- a/lib/services/datafactoryManagement/lib/models/mySqlLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/mySqlLinkedService.js @@ -20,16 +20,8 @@ const models = require('./index'); class MySqlLinkedService extends models['LinkedService'] { /** * Create a MySqlLinkedService. - * @member {object} server Server name for connection. Type: string (or - * Expression with resultType string). - * @member {object} database Database name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [username] Username for authentication. Type: string (or - * Expression with resultType string). - * @member {object} [password] Password for authentication. - * @member {string} [password.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. + * @member {string} [connectionString.type] Polymorphic Discriminator * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -109,37 +101,9 @@ class MySqlLinkedService extends models['LinkedService'] { name: 'String' } }, - server: { + connectionString: { required: true, - serializedName: 'typeProperties.server', - type: { - name: 'Object' - } - }, - database: { - required: true, - serializedName: 'typeProperties.database', - type: { - name: 'Object' - } - }, - schema: { - required: false, - serializedName: 'typeProperties.schema', - type: { - name: 'Object' - } - }, - username: { - required: false, - serializedName: 'typeProperties.username', - type: { - name: 'Object' - } - }, - password: { - required: false, - serializedName: 'typeProperties.password', + serializedName: 'typeProperties.connectionString', type: { name: 'Composite', polymorphicDiscriminator: { diff --git a/lib/services/datafactoryManagement/lib/models/netezzaLinkedService.js b/lib/services/datafactoryManagement/lib/models/netezzaLinkedService.js index eae486da8b..af60142c2a 100644 --- a/lib/services/datafactoryManagement/lib/models/netezzaLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/netezzaLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class NetezzaLinkedService extends models['LinkedService'] { /** * Create a NetezzaLinkedService. - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class NetezzaLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/odbcLinkedService.js b/lib/services/datafactoryManagement/lib/models/odbcLinkedService.js index 3d63073bfa..9dda0660a4 100644 --- a/lib/services/datafactoryManagement/lib/models/odbcLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/odbcLinkedService.js @@ -21,8 +21,8 @@ class OdbcLinkedService extends models['LinkedService'] { /** * Create a OdbcLinkedService. * @member {object} connectionString The non-access credential portion of the - * connection string as well as an optional encrypted credential. - * @member {string} [connectionString.type] Polymorphic Discriminator + * connection string as well as an optional encrypted credential. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [authenticationType] Type of authentication used to * connect to the ODBC data store. Possible values are: Anonymous and Basic. * Type: string (or Expression with resultType string). @@ -116,13 +116,7 @@ class OdbcLinkedService extends models['LinkedService'] { required: true, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, authenticationType: { diff --git a/lib/services/datafactoryManagement/lib/models/operationListResponse.js b/lib/services/datafactoryManagement/lib/models/operationListResponse.js index 9427df0325..ca69da361e 100644 --- a/lib/services/datafactoryManagement/lib/models/operationListResponse.js +++ b/lib/services/datafactoryManagement/lib/models/operationListResponse.js @@ -10,21 +10,17 @@ 'use strict'; -const models = require('./index'); - /** * A list of operations that can be performed by the Data Factory service. - * */ -class OperationListResponse { +class OperationListResponse extends Array { /** * Create a OperationListResponse. - * @member {array} [value] List of Data Factory operations supported by the - * Data Factory resource provider. * @member {string} [nextLink] The link to the next page of results, if any * remaining results exist. */ constructor() { + super(); } /** @@ -43,7 +39,7 @@ class OperationListResponse { modelProperties: { value: { required: false, - serializedName: 'value', + serializedName: '', type: { name: 'Sequence', element: { diff --git a/lib/services/datafactoryManagement/lib/models/operationMetricDimension.js b/lib/services/datafactoryManagement/lib/models/operationMetricDimension.js new file mode 100644 index 0000000000..2026d5dc7f --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/operationMetricDimension.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Defines the metric dimension. + * + */ +class OperationMetricDimension { + /** + * Create a OperationMetricDimension. + * @member {string} [name] The name of the dimension for the metric. + * @member {string} [displayName] The display name of the metric dimension. + * @member {boolean} [toBeExportedForShoebox] Whether the dimension should be + * exported to Azure Monitor. + */ + constructor() { + } + + /** + * Defines the metadata of OperationMetricDimension + * + * @returns {object} metadata of OperationMetricDimension + * + */ + mapper() { + return { + required: false, + serializedName: 'OperationMetricDimension', + type: { + name: 'Composite', + className: 'OperationMetricDimension', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + displayName: { + required: false, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + toBeExportedForShoebox: { + required: false, + serializedName: 'toBeExportedForShoebox', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = OperationMetricDimension; diff --git a/lib/services/datafactoryManagement/lib/models/operationMetricSpecification.js b/lib/services/datafactoryManagement/lib/models/operationMetricSpecification.js index 2ee68459aa..24e35a16bf 100644 --- a/lib/services/datafactoryManagement/lib/models/operationMetricSpecification.js +++ b/lib/services/datafactoryManagement/lib/models/operationMetricSpecification.js @@ -30,6 +30,7 @@ class OperationMetricSpecification { * @member {string} [sourceMdmNamespace] The name of the MDM namespace. * @member {array} [availabilities] Defines how often data for metrics * becomes available. + * @member {array} [dimensions] Defines the metric dimension. */ constructor() { } @@ -118,6 +119,21 @@ class OperationMetricSpecification { } } } + }, + dimensions: { + required: false, + serializedName: 'dimensions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OperationMetricDimensionElementType', + type: { + name: 'Composite', + className: 'OperationMetricDimension' + } + } + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/oracleLinkedService.js b/lib/services/datafactoryManagement/lib/models/oracleLinkedService.js index eebb868729..39b447a60c 100644 --- a/lib/services/datafactoryManagement/lib/models/oracleLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/oracleLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class OracleLinkedService extends models['LinkedService'] { /** * Create a OracleLinkedService. - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class OracleLinkedService extends models['LinkedService'] { required: true, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/pipelineRun.js b/lib/services/datafactoryManagement/lib/models/pipelineRun.js index 58bac721f6..21e91bbe11 100644 --- a/lib/services/datafactoryManagement/lib/models/pipelineRun.js +++ b/lib/services/datafactoryManagement/lib/models/pipelineRun.js @@ -27,6 +27,8 @@ class PipelineRun { * @member {string} [invokedBy.name] Name of the entity that started the * pipeline run. * @member {string} [invokedBy.id] The ID of the entity that started the run. + * @member {string} [invokedBy.invokedByType] The type of the entity that + * started the run. * @member {date} [lastUpdated] The last updated timestamp for the pipeline * run event in ISO8601 format. * @member {date} [runStart] The start time of a pipeline run in ISO8601 diff --git a/lib/services/datafactoryManagement/lib/models/pipelineRunInvokedBy.js b/lib/services/datafactoryManagement/lib/models/pipelineRunInvokedBy.js index 8f48d602d7..7144f11342 100644 --- a/lib/services/datafactoryManagement/lib/models/pipelineRunInvokedBy.js +++ b/lib/services/datafactoryManagement/lib/models/pipelineRunInvokedBy.js @@ -19,6 +19,8 @@ class PipelineRunInvokedBy { * Create a PipelineRunInvokedBy. * @member {string} [name] Name of the entity that started the pipeline run. * @member {string} [id] The ID of the entity that started the run. + * @member {string} [invokedByType] The type of the entity that started the + * run. */ constructor() { } @@ -52,6 +54,14 @@ class PipelineRunInvokedBy { type: { name: 'String' } + }, + invokedByType: { + required: false, + readOnly: true, + serializedName: 'invokedByType', + type: { + name: 'String' + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/pipelineRunsQueryResponse.js b/lib/services/datafactoryManagement/lib/models/pipelineRunsQueryResponse.js new file mode 100644 index 0000000000..dd7d5de0c4 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/pipelineRunsQueryResponse.js @@ -0,0 +1,83 @@ +/* + * 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'); + +/** + * A list pipeline runs. + * + */ +class PipelineRunsQueryResponse { + /** + * Create a PipelineRunsQueryResponse. + * @member {array} value List of pipeline runs. + * @member {string} [continuationToken] The continuation token for getting + * the next page of results, if any remaining results exist, null otherwise. + */ + constructor() { + } + + /** + * Defines the metadata of PipelineRunsQueryResponse + * + * @returns {object} metadata of PipelineRunsQueryResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'PipelineRunsQueryResponse', + type: { + name: 'Composite', + className: 'PipelineRunsQueryResponse', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PipelineRunElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'PipelineRun' + } + } + } + }, + continuationToken: { + required: false, + serializedName: 'continuationToken', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PipelineRunsQueryResponse; diff --git a/lib/services/datafactoryManagement/lib/models/postgreSqlLinkedService.js b/lib/services/datafactoryManagement/lib/models/postgreSqlLinkedService.js index 3861cbb581..0f62b51576 100644 --- a/lib/services/datafactoryManagement/lib/models/postgreSqlLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/postgreSqlLinkedService.js @@ -20,16 +20,8 @@ const models = require('./index'); class PostgreSqlLinkedService extends models['LinkedService'] { /** * Create a PostgreSqlLinkedService. - * @member {object} server Server name for connection. Type: string (or - * Expression with resultType string). - * @member {object} database Database name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). - * @member {object} [username] Username for authentication. Type: string (or - * Expression with resultType string). - * @member {object} [password] Password for authentication. - * @member {string} [password.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. + * @member {string} [connectionString.type] Polymorphic Discriminator * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -109,37 +101,9 @@ class PostgreSqlLinkedService extends models['LinkedService'] { name: 'String' } }, - server: { + connectionString: { required: true, - serializedName: 'typeProperties.server', - type: { - name: 'Object' - } - }, - database: { - required: true, - serializedName: 'typeProperties.database', - type: { - name: 'Object' - } - }, - schema: { - required: false, - serializedName: 'typeProperties.schema', - type: { - name: 'Object' - } - }, - username: { - required: false, - serializedName: 'typeProperties.username', - type: { - name: 'Object' - } - }, - password: { - required: false, - serializedName: 'typeProperties.password', + serializedName: 'typeProperties.connectionString', type: { name: 'Composite', polymorphicDiscriminator: { diff --git a/lib/services/datafactoryManagement/lib/models/quickBooksLinkedService.js b/lib/services/datafactoryManagement/lib/models/quickBooksLinkedService.js index 9d5703d391..848db2d54d 100644 --- a/lib/services/datafactoryManagement/lib/models/quickBooksLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/quickBooksLinkedService.js @@ -24,10 +24,15 @@ class QuickBooksLinkedService extends models['LinkedService'] { * quickbooks.api.intuit.com) * @member {object} companyId The company ID of the QuickBooks company to * authorize. - * @member {object} [accessToken] The access token for OAuth 1.0 + * @member {object} consumerKey The consumer key for OAuth 1.0 + * authentication. + * @member {object} consumerSecret The consumer secret for OAuth 1.0 + * authentication. + * @member {string} [consumerSecret.type] Polymorphic Discriminator + * @member {object} accessToken The access token for OAuth 1.0 * authentication. * @member {string} [accessToken.type] Polymorphic Discriminator - * @member {object} [accessTokenSecret] The access token secret for OAuth 1.0 + * @member {object} accessTokenSecret The access token secret for OAuth 1.0 * authentication. * @member {string} [accessTokenSecret.type] Polymorphic Discriminator * @member {object} [useEncryptedEndpoints] Specifies whether the data source @@ -125,8 +130,28 @@ class QuickBooksLinkedService extends models['LinkedService'] { name: 'Object' } }, + consumerKey: { + required: true, + serializedName: 'typeProperties.consumerKey', + type: { + name: 'Object' + } + }, + consumerSecret: { + required: true, + serializedName: 'typeProperties.consumerSecret', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'SecretBase', + className: 'SecretBase' + } + }, accessToken: { - required: false, + required: true, serializedName: 'typeProperties.accessToken', type: { name: 'Composite', @@ -139,7 +164,7 @@ class QuickBooksLinkedService extends models['LinkedService'] { } }, accessTokenSecret: { - required: false, + required: true, serializedName: 'typeProperties.accessTokenSecret', type: { name: 'Composite', diff --git a/lib/services/datafactoryManagement/lib/models/resource.js b/lib/services/datafactoryManagement/lib/models/resource.js index 1ca93caeee..33e84ad70e 100644 --- a/lib/services/datafactoryManagement/lib/models/resource.js +++ b/lib/services/datafactoryManagement/lib/models/resource.js @@ -25,6 +25,7 @@ class Resource extends models['BaseResource'] { * @member {string} [type] The resource type. * @member {string} [location] The resource location. * @member {object} [tags] The resource tags. + * @member {string} [eTag] Etag identifies change in the resource. */ constructor() { super(); @@ -88,6 +89,14 @@ class Resource extends models['BaseResource'] { } } } + }, + eTag: { + required: false, + readOnly: true, + serializedName: 'eTag', + type: { + name: 'String' + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/runFilterParameters.js b/lib/services/datafactoryManagement/lib/models/runFilterParameters.js new file mode 100644 index 0000000000..f50f95451c --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/runFilterParameters.js @@ -0,0 +1,105 @@ +/* + * 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'); + +/** + * Query parameters for listing runs. + * + */ +class RunFilterParameters { + /** + * Create a RunFilterParameters. + * @member {string} [continuationToken] The continuation token for getting + * the next page of results. Null for first page. + * @member {date} lastUpdatedAfter The time at or after which the run event + * was updated in 'ISO 8601' format. + * @member {date} lastUpdatedBefore The time at or before which the run event + * was updated in 'ISO 8601' format. + * @member {array} [filters] List of filters. + * @member {array} [orderBy] List of OrderBy option. + */ + constructor() { + } + + /** + * Defines the metadata of RunFilterParameters + * + * @returns {object} metadata of RunFilterParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'RunFilterParameters', + type: { + name: 'Composite', + className: 'RunFilterParameters', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'continuationToken', + type: { + name: 'String' + } + }, + lastUpdatedAfter: { + required: true, + serializedName: 'lastUpdatedAfter', + type: { + name: 'DateTime' + } + }, + lastUpdatedBefore: { + required: true, + serializedName: 'lastUpdatedBefore', + type: { + name: 'DateTime' + } + }, + filters: { + required: false, + serializedName: 'filters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RunQueryFilterElementType', + type: { + name: 'Composite', + className: 'RunQueryFilter' + } + } + } + }, + orderBy: { + required: false, + serializedName: 'orderBy', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RunQueryOrderByElementType', + type: { + name: 'Composite', + className: 'RunQueryOrderBy' + } + } + } + } + } + } + }; + } +} + +module.exports = RunFilterParameters; diff --git a/lib/services/datafactoryManagement/lib/models/runQueryFilter.js b/lib/services/datafactoryManagement/lib/models/runQueryFilter.js new file mode 100644 index 0000000000..c13698f3d2 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/runQueryFilter.js @@ -0,0 +1,83 @@ +/* + * 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'; + +/** + * Query filter option for listing runs. + * + */ +class RunQueryFilter { + /** + * Create a RunQueryFilter. + * @member {string} operand Parameter name to be used for filter. The allowed + * operands to query pipeline runs are PipelineName, RunStart, RunEnd and + * Status; to query activity runs are ActivityName, ActivityRunStart, + * ActivityRunEnd, ActivityType and Status, and to query trigger runs are + * TriggerName, TriggerRunTimestamp and Status. Possible values include: + * 'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName', + * 'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName', + * 'TriggerRunTimestamp' + * @member {string} operator Operator to be used for filter. Possible values + * include: 'Equals', 'NotEquals', 'In', 'NotIn' + * @member {array} values List of filter values. + */ + constructor() { + } + + /** + * Defines the metadata of RunQueryFilter + * + * @returns {object} metadata of RunQueryFilter + * + */ + mapper() { + return { + required: false, + serializedName: 'RunQueryFilter', + type: { + name: 'Composite', + className: 'RunQueryFilter', + modelProperties: { + operand: { + required: true, + serializedName: 'operand', + type: { + name: 'String' + } + }, + operator: { + required: true, + serializedName: 'operator', + type: { + name: 'String' + } + }, + values: { + required: true, + serializedName: 'values', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = RunQueryFilter; diff --git a/lib/services/datafactoryManagement/lib/models/runQueryOrderBy.js b/lib/services/datafactoryManagement/lib/models/runQueryOrderBy.js new file mode 100644 index 0000000000..fd3e86097c --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/runQueryOrderBy.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'; + +/** + * An object to provide order by options for listing runs. + * + */ +class RunQueryOrderBy { + /** + * Create a RunQueryOrderBy. + * @member {string} orderBy Parameter name to be used for order by. The + * allowed parameters to order by for pipeline runs are PipelineName, + * RunStart, RunEnd and Status; for activity runs are ActivityName, + * ActivityRunStart, ActivityRunEnd and Status; for trigger runs are + * TriggerName, TriggerRunTimestamp and Status. Possible values include: + * 'RunStart', 'RunEnd', 'PipelineName', 'Status', 'ActivityName', + * 'ActivityRunStart', 'ActivityRunEnd', 'TriggerName', 'TriggerRunTimestamp' + * @member {string} order Sorting order of the parameter. Possible values + * include: 'ASC', 'DESC' + */ + constructor() { + } + + /** + * Defines the metadata of RunQueryOrderBy + * + * @returns {object} metadata of RunQueryOrderBy + * + */ + mapper() { + return { + required: false, + serializedName: 'RunQueryOrderBy', + type: { + name: 'Composite', + className: 'RunQueryOrderBy', + modelProperties: { + orderBy: { + required: true, + serializedName: 'orderBy', + type: { + name: 'String' + } + }, + order: { + required: true, + serializedName: 'order', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RunQueryOrderBy; diff --git a/lib/services/datafactoryManagement/lib/models/sSISExecutionParameter.js b/lib/services/datafactoryManagement/lib/models/sSISExecutionParameter.js new file mode 100644 index 0000000000..d74ade25b1 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/sSISExecutionParameter.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'; + +/** + * SSIS execution parameter. + * + */ +class SSISExecutionParameter { + /** + * Create a SSISExecutionParameter. + * @member {object} value SSIS package execution parameter value. Type: + * string (or Expression with resultType string). + */ + constructor() { + } + + /** + * Defines the metadata of SSISExecutionParameter + * + * @returns {object} metadata of SSISExecutionParameter + * + */ + mapper() { + return { + required: false, + serializedName: 'SSISExecutionParameter', + type: { + name: 'Composite', + className: 'SSISExecutionParameter', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Object' + } + } + } + } + }; + } +} + +module.exports = SSISExecutionParameter; diff --git a/lib/services/datafactoryManagement/lib/models/sSISPropertyOverride.js b/lib/services/datafactoryManagement/lib/models/sSISPropertyOverride.js new file mode 100644 index 0000000000..7b54b21d53 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/sSISPropertyOverride.js @@ -0,0 +1,62 @@ +/* + * 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'; + +/** + * SSIS property override. + * + */ +class SSISPropertyOverride { + /** + * Create a SSISPropertyOverride. + * @member {object} value SSIS package property override value. Type: string + * (or Expression with resultType string). + * @member {boolean} [isSensitive] Whether SSIS package property override + * value is sensitive data. Value will be encrypted in SSISDB if it is true + */ + constructor() { + } + + /** + * Defines the metadata of SSISPropertyOverride + * + * @returns {object} metadata of SSISPropertyOverride + * + */ + mapper() { + return { + required: false, + serializedName: 'SSISPropertyOverride', + type: { + name: 'Composite', + className: 'SSISPropertyOverride', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Object' + } + }, + isSensitive: { + required: false, + serializedName: 'isSensitive', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = SSISPropertyOverride; diff --git a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js index eda9dc4d39..8cf307e4d9 100644 --- a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js +++ b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js @@ -20,8 +20,6 @@ const models = require('./index'); class SelfHostedIntegrationRuntime extends models['IntegrationRuntime'] { /** * Create a SelfHostedIntegrationRuntime. - * @member {object} [linkedInfo] - * @member {string} [linkedInfo.authorizationType] Polymorphic Discriminator */ constructor() { super(); @@ -60,19 +58,6 @@ class SelfHostedIntegrationRuntime extends models['IntegrationRuntime'] { type: { name: 'String' } - }, - linkedInfo: { - required: false, - serializedName: 'typeProperties.linkedInfo', - type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'authorizationType', - clientName: 'authorizationType' - }, - uberParent: 'LinkedIntegrationRuntimeProperties', - className: 'LinkedIntegrationRuntimeProperties' - } } } } diff --git a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js index 558acd3d64..c23c431044 100644 --- a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js +++ b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js @@ -44,8 +44,9 @@ class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatu * update has been turned on. Possible values include: 'On', 'Off' * @member {string} [versionStatus] Status of the integration runtime * version. - * @member {array} [links] The list of linked integration runtimes that are - * created to share with this integration runtime. + * @member {string} [pushedVersion] The version that the integration runtime + * is going to update to. + * @member {string} [latestVersion] The latest version on download center. */ constructor() { super(); @@ -223,19 +224,20 @@ class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatu name: 'String' } }, - links: { + pushedVersion: { required: false, - serializedName: 'typeProperties.links', + readOnly: true, + serializedName: 'typeProperties.pushedVersion', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'LinkedIntegrationRuntimeElementType', - type: { - name: 'Composite', - className: 'LinkedIntegrationRuntime' - } - } + name: 'String' + } + }, + latestVersion: { + required: false, + readOnly: true, + serializedName: 'typeProperties.latestVersion', + type: { + name: 'String' } } } diff --git a/lib/services/datafactoryManagement/lib/models/serviceNowLinkedService.js b/lib/services/datafactoryManagement/lib/models/serviceNowLinkedService.js index 8dea5adcfb..51dce7e1ef 100644 --- a/lib/services/datafactoryManagement/lib/models/serviceNowLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/serviceNowLinkedService.js @@ -21,7 +21,7 @@ class ServiceNowLinkedService extends models['LinkedService'] { /** * Create a ServiceNowLinkedService. * @member {object} endpoint The endpoint of the ServiceNow server. (i.e. - * ServiceNowData.com) + * .service-now.com) * @member {string} authenticationType The authentication type to use. * Possible values include: 'Basic', 'OAuth2' * @member {object} [username] The user name used to connect to the diff --git a/lib/services/datafactoryManagement/lib/models/sqlServerLinkedService.js b/lib/services/datafactoryManagement/lib/models/sqlServerLinkedService.js index 04c09187e8..70102f7501 100644 --- a/lib/services/datafactoryManagement/lib/models/sqlServerLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/sqlServerLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class SqlServerLinkedService extends models['LinkedService'] { /** * Create a SqlServerLinkedService. - * @member {object} connectionString The connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} connectionString The connection string. Type: string, + * SecureString or AzureKeyVaultSecretReference. * @member {object} [userName] The on-premises Windows authentication user * name. Type: string (or Expression with resultType string). * @member {object} [password] The on-premises Windows authentication @@ -110,13 +110,7 @@ class SqlServerLinkedService extends models['LinkedService'] { required: true, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, userName: { diff --git a/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js b/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js index fb1026ca4c..b25fd20924 100644 --- a/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js +++ b/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js @@ -90,6 +90,20 @@ class SqlServerStoredProcedureActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/tabularTranslator.js b/lib/services/datafactoryManagement/lib/models/tabularTranslator.js index f04240d241..468a76db2e 100644 --- a/lib/services/datafactoryManagement/lib/models/tabularTranslator.js +++ b/lib/services/datafactoryManagement/lib/models/tabularTranslator.js @@ -20,8 +20,13 @@ const models = require('./index'); class TabularTranslator extends models['CopyTranslator'] { /** * Create a TabularTranslator. - * @member {object} [columnMappings] Column mappings. Type: string (or - * Expression with resultType string). + * @member {object} [columnMappings] Column mappings. Example: "UserId: + * MyUserId, Group: MyGroup, Name: MyName" Type: string (or Expression with + * resultType string). + * @member {object} [schemaMapping] The schema mapping to map between tabular + * data and hierarchical data. Example: {"Column1": "$.Column1", "Column2": + * "$.Column2.Property1", "Column3": "$.Column2.Property2"}. Type: object (or + * Expression with resultType object). */ constructor() { super(); @@ -60,6 +65,13 @@ class TabularTranslator extends models['CopyTranslator'] { type: { name: 'Object' } + }, + schemaMapping: { + required: false, + serializedName: 'schemaMapping', + type: { + name: 'Object' + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/teradataLinkedService.js b/lib/services/datafactoryManagement/lib/models/teradataLinkedService.js index 253b87cbe9..cbf57161a4 100644 --- a/lib/services/datafactoryManagement/lib/models/teradataLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/teradataLinkedService.js @@ -22,8 +22,6 @@ class TeradataLinkedService extends models['LinkedService'] { * Create a TeradataLinkedService. * @member {object} server Server name for connection. Type: string (or * Expression with resultType string). - * @member {object} [schema] Schema name for connection. Type: string (or - * Expression with resultType string). * @member {string} [authenticationType] AuthenticationType to be used for * connection. Possible values include: 'Basic', 'Windows' * @member {object} [username] Username for authentication. Type: string (or @@ -116,13 +114,6 @@ class TeradataLinkedService extends models['LinkedService'] { name: 'Object' } }, - schema: { - required: false, - serializedName: 'typeProperties.schema', - type: { - name: 'Object' - } - }, authenticationType: { required: false, serializedName: 'typeProperties.authenticationType', diff --git a/lib/services/datafactoryManagement/lib/models/triggerReference.js b/lib/services/datafactoryManagement/lib/models/triggerReference.js new file mode 100644 index 0000000000..fdcd9357ad --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/triggerReference.js @@ -0,0 +1,61 @@ +/* + * 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'; + +/** + * Tumbling window trigger reference type. + * + */ +class TriggerReference { + /** + * Create a TriggerReference. + * @member {string} referenceName Reference trigger name. + */ + constructor() { + } + + /** + * Defines the metadata of TriggerReference + * + * @returns {object} metadata of TriggerReference + * + */ + mapper() { + return { + required: false, + serializedName: 'TriggerReference', + type: { + name: 'Composite', + className: 'TriggerReference', + modelProperties: { + type: { + required: true, + isConstant: true, + serializedName: 'type', + defaultValue: 'TriggerReference', + type: { + name: 'String' + } + }, + referenceName: { + required: true, + serializedName: 'referenceName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = TriggerReference; diff --git a/lib/services/datafactoryManagement/lib/models/triggerRunsQueryResponse.js b/lib/services/datafactoryManagement/lib/models/triggerRunsQueryResponse.js new file mode 100644 index 0000000000..6f15714f1c --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/triggerRunsQueryResponse.js @@ -0,0 +1,83 @@ +/* + * 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'); + +/** + * A list of trigger runs. + * + */ +class TriggerRunsQueryResponse { + /** + * Create a TriggerRunsQueryResponse. + * @member {array} value List of trigger runs. + * @member {string} [continuationToken] The continuation token for getting + * the next page of results, if any remaining results exist, null otherwise. + */ + constructor() { + } + + /** + * Defines the metadata of TriggerRunsQueryResponse + * + * @returns {object} metadata of TriggerRunsQueryResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'TriggerRunsQueryResponse', + type: { + name: 'Composite', + className: 'TriggerRunsQueryResponse', + modelProperties: { + value: { + required: true, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'TriggerRunElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'TriggerRun' + } + } + } + }, + continuationToken: { + required: false, + serializedName: 'continuationToken', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = TriggerRunsQueryResponse; diff --git a/lib/services/datafactoryManagement/lib/models/tumblingWindowDependency.js b/lib/services/datafactoryManagement/lib/models/tumblingWindowDependency.js new file mode 100644 index 0000000000..0d3aac7891 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/tumblingWindowDependency.js @@ -0,0 +1,61 @@ +/* + * 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'; + +/** + * Tumbling Window dependency information. + * + */ +class TumblingWindowDependency { + /** + * Create a TumblingWindowDependency. + * @member {string} type Reference type "TriggerReference" for Tumbling + * Window. + * @member {string} referenceName Trigger reference name. + */ + constructor() { + } + + /** + * Defines the metadata of TumblingWindowDependency + * + * @returns {object} metadata of TumblingWindowDependency + * + */ + mapper() { + return { + required: false, + serializedName: 'TumblingWindowDependency', + type: { + name: 'Composite', + className: 'TumblingWindowDependency', + modelProperties: { + type: { + required: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + referenceName: { + required: true, + serializedName: 'referenceName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = TumblingWindowDependency; diff --git a/lib/services/datafactoryManagement/lib/models/tumblingWindowTriggerReference.js b/lib/services/datafactoryManagement/lib/models/tumblingWindowTriggerReference.js new file mode 100644 index 0000000000..f142d6b097 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/tumblingWindowTriggerReference.js @@ -0,0 +1,61 @@ +/* + * 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'; + +/** + * Tumbling window trigger reference type. + * + */ +class TumblingWindowTriggerReference { + /** + * Create a TumblingWindowTriggerReference. + * @member {string} referenceName Reference TumblingWindowTrigger name. + */ + constructor() { + } + + /** + * Defines the metadata of TumblingWindowTriggerReference + * + * @returns {object} metadata of TumblingWindowTriggerReference + * + */ + mapper() { + return { + required: false, + serializedName: 'TumblingWindowTriggerReference', + type: { + name: 'Composite', + className: 'TumblingWindowTriggerReference', + modelProperties: { + type: { + required: true, + isConstant: true, + serializedName: 'type', + defaultValue: 'TumblingWindowTriggerReference', + type: { + name: 'String' + } + }, + referenceName: { + required: true, + serializedName: 'referenceName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = TumblingWindowTriggerReference; diff --git a/lib/services/datafactoryManagement/lib/models/untilActivity.js b/lib/services/datafactoryManagement/lib/models/untilActivity.js index a67e99583c..6cd0145c57 100644 --- a/lib/services/datafactoryManagement/lib/models/untilActivity.js +++ b/lib/services/datafactoryManagement/lib/models/untilActivity.js @@ -96,6 +96,20 @@ class UntilActivity extends models['ControlActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/verticaLinkedService.js b/lib/services/datafactoryManagement/lib/models/verticaLinkedService.js index e806eb9f98..401678a832 100644 --- a/lib/services/datafactoryManagement/lib/models/verticaLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/verticaLinkedService.js @@ -20,8 +20,8 @@ const models = require('./index'); class VerticaLinkedService extends models['LinkedService'] { /** * Create a VerticaLinkedService. - * @member {object} [connectionString] An ODBC connection string. - * @member {string} [connectionString.type] Polymorphic Discriminator + * @member {object} [connectionString] An ODBC connection string. Type: + * string, SecureString or AzureKeyVaultSecretReference. * @member {object} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). @@ -105,13 +105,7 @@ class VerticaLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.connectionString', type: { - name: 'Composite', - polymorphicDiscriminator: { - serializedName: 'type', - clientName: 'type' - }, - uberParent: 'SecretBase', - className: 'SecretBase' + name: 'Object' } }, encryptedCredential: { diff --git a/lib/services/datafactoryManagement/lib/models/waitActivity.js b/lib/services/datafactoryManagement/lib/models/waitActivity.js index 264f89cc3e..a4fa0e5071 100644 --- a/lib/services/datafactoryManagement/lib/models/waitActivity.js +++ b/lib/services/datafactoryManagement/lib/models/waitActivity.js @@ -86,6 +86,20 @@ class WaitActivity extends models['ControlActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/models/webActivity.js b/lib/services/datafactoryManagement/lib/models/webActivity.js index 7c1728673c..628589acff 100644 --- a/lib/services/datafactoryManagement/lib/models/webActivity.js +++ b/lib/services/datafactoryManagement/lib/models/webActivity.js @@ -113,6 +113,20 @@ class WebActivity extends models['ExecutionActivity'] { } } }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, type: { required: true, serializedName: 'type', diff --git a/lib/services/datafactoryManagement/lib/operations/activityRuns.js b/lib/services/datafactoryManagement/lib/operations/activityRuns.js index dbf55899f2..ec9494ee1d 100644 --- a/lib/services/datafactoryManagement/lib/operations/activityRuns.js +++ b/lib/services/datafactoryManagement/lib/operations/activityRuns.js @@ -15,7 +15,7 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * List activity runs based on input filter conditions. + * Query activity runs based on input filter conditions. * * @param {string} resourceGroupName The resource group name. * @@ -23,17 +23,22 @@ const WebResource = msRest.WebResource; * * @param {string} runId The pipeline run identifier. * - * @param {date} startTime The start time of activity runs in ISO8601 format. + * @param {object} filterParameters Parameters to filter the activity runs. * - * @param {date} endTime The end time of activity runs in ISO8601 format. + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. * - * @param {object} [options] Optional Parameters. + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. * - * @param {string} [options.status] The status of the pipeline run. + * @param {array} [filterParameters.filters] List of filters. * - * @param {string} [options.activityName] The name of the activity. + * @param {array} [filterParameters.orderBy] List of OrderBy option. * - * @param {string} [options.linkedServiceName] The linked service name. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45,14 +50,14 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ActivityRunsListResponse} for more + * See {@link ActivityRunsQueryResponse} 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 _listByPipelineRun(resourceGroupName, factoryName, runId, startTime, endTime, options, callback) { +function _queryByPipelineRun(resourceGroupName, factoryName, runId, filterParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -62,9 +67,6 @@ function _listByPipelineRun(resourceGroupName, factoryName, runId, startTime, en if (!callback) { throw new Error('callback cannot be null.'); } - let status = (options && options.status !== undefined) ? options.status : undefined; - let activityName = (options && options.activityName !== undefined) ? options.activityName : undefined; - let linkedServiceName = (options && options.linkedServiceName !== undefined) ? options.linkedServiceName : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -110,36 +112,8 @@ function _listByPipelineRun(resourceGroupName, factoryName, runId, startTime, en 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(!startTime || !(startTime instanceof Date || - (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { - throw new Error('startTime cannot be null or undefined and it must be of type date.'); - } - if(!endTime || !(endTime instanceof Date || - (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { - throw new Error('endTime cannot be null or undefined and it must be of type date.'); - } - if (status !== null && status !== undefined && typeof status.valueOf() !== 'string') { - throw new Error('status must be of type string.'); - } - if (activityName !== null && activityName !== undefined && typeof activityName.valueOf() !== 'string') { - throw new Error('activityName must be of type string.'); - } - if (linkedServiceName !== null && linkedServiceName !== undefined && typeof linkedServiceName.valueOf() !== 'string') { - throw new Error('linkedServiceName must be of type string.'); - } - if (linkedServiceName !== null && linkedServiceName !== undefined) { - if (linkedServiceName.length > 260) - { - throw new Error('"linkedServiceName" should satisfy the constraint - "MaxLength": 260'); - } - if (linkedServiceName.length < 1) - { - throw new Error('"linkedServiceName" should satisfy the constraint - "MinLength": 1'); - } - if (linkedServiceName.match(/^[A-Za-z0-9_][^<>*#.%&:\\+?\/]*$/) === null) - { - throw new Error('"linkedServiceName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9_][^<>*#.%&:\\+?\/]*$/'); - } + if (filterParameters === null || filterParameters === undefined) { + throw new Error('filterParameters 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.'); @@ -150,31 +124,20 @@ function _listByPipelineRun(resourceGroupName, factoryName, runId, startTime, en // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/activityruns'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); requestUrl = requestUrl.replace('{runId}', encodeURIComponent(runId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); - queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); - queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); - if (status !== null && status !== undefined) { - queryParameters.push('status=' + encodeURIComponent(status)); - } - if (activityName !== null && activityName !== undefined) { - queryParameters.push('activityName=' + encodeURIComponent(activityName)); - } - if (linkedServiceName !== null && linkedServiceName !== undefined) { - queryParameters.push('linkedServiceName=' + encodeURIComponent(linkedServiceName)); - } 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 @@ -192,136 +155,21 @@ function _listByPipelineRun(resourceGroupName, factoryName, runId, startTime, en } } } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().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['ActivityRunsListResponse']().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); - }); -} - -/** - * List activity runs based on input filter conditions. - * - * @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 ActivityRunsListResponse} 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 _listByPipelineRunNext(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 + // Serialize Request + let requestContent = null; + let requestModel = null; 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.'); + if (filterParameters !== null && filterParameters !== undefined) { + let requestModelMapper = new client.models['RunFilterParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, filterParameters, 'filterParameters'); + requestContent = JSON.stringify(requestModel); } } 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]; - } - } + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(filterParameters, null, 2)}.`); + return callback(serializationError); } - httpRequest.body = null; + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -338,13 +186,12 @@ function _listByPipelineRunNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -364,7 +211,7 @@ function _listByPipelineRunNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ActivityRunsListResponse']().mapper(); + let resultMapper = new client.models['ActivityRunsQueryResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -387,12 +234,11 @@ class ActivityRuns { */ constructor(client) { this.client = client; - this._listByPipelineRun = _listByPipelineRun; - this._listByPipelineRunNext = _listByPipelineRunNext; + this._queryByPipelineRun = _queryByPipelineRun; } /** - * List activity runs based on input filter conditions. + * Query activity runs based on input filter conditions. * * @param {string} resourceGroupName The resource group name. * @@ -400,32 +246,37 @@ class ActivityRuns { * * @param {string} runId The pipeline run identifier. * - * @param {date} startTime The start time of activity runs in ISO8601 format. + * @param {object} filterParameters Parameters to filter the activity runs. * - * @param {date} endTime The end time of activity runs in ISO8601 format. + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. * - * @param {object} [options] Optional Parameters. + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. * - * @param {string} [options.status] The status of the pipeline run. + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. * - * @param {string} [options.activityName] The name of the activity. + * @param {array} [filterParameters.filters] List of filters. * - * @param {string} [options.linkedServiceName] The linked service name. + * @param {array} [filterParameters.orderBy] List of OrderBy option. + * + * @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. */ - listByPipelineRunWithHttpOperationResponse(resourceGroupName, factoryName, runId, startTime, endTime, options) { + queryByPipelineRunWithHttpOperationResponse(resourceGroupName, factoryName, runId, filterParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByPipelineRun(resourceGroupName, factoryName, runId, startTime, endTime, options, (err, result, request, response) => { + self._queryByPipelineRun(resourceGroupName, factoryName, runId, filterParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -436,7 +287,7 @@ class ActivityRuns { } /** - * List activity runs based on input filter conditions. + * Query activity runs based on input filter conditions. * * @param {string} resourceGroupName The resource group name. * @@ -444,100 +295,20 @@ class ActivityRuns { * * @param {string} runId The pipeline run identifier. * - * @param {date} startTime The start time of activity runs in ISO8601 format. - * - * @param {date} endTime The end time of activity runs in ISO8601 format. - * - * @param {object} [options] Optional Parameters. + * @param {object} filterParameters Parameters to filter the activity runs. * - * @param {string} [options.status] The status of the pipeline run. + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. * - * @param {string} [options.activityName] The name of the activity. + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. * - * @param {string} [options.linkedServiceName] The linked service name. + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. * - * @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 {ActivityRunsListResponse} - 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 ActivityRunsListResponse} 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. - */ - listByPipelineRun(resourceGroupName, factoryName, runId, startTime, endTime, 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._listByPipelineRun(resourceGroupName, factoryName, runId, startTime, endTime, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._listByPipelineRun(resourceGroupName, factoryName, runId, startTime, endTime, options, optionalCallback); - } - } - - /** - * List activity runs based on input filter conditions. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - listByPipelineRunNextWithHttpOperationResponse(nextPageLink, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listByPipelineRunNext(nextPageLink, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * List activity runs based on input filter conditions. + * @param {array} [filterParameters.filters] List of filters. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {array} [filterParameters.orderBy] List of OrderBy option. * * @param {object} [options] Optional Parameters. * @@ -551,7 +322,7 @@ class ActivityRuns { * * {Promise} A promise is returned * - * @resolve {ActivityRunsListResponse} - The deserialized result object. + * @resolve {ActivityRunsQueryResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -560,14 +331,14 @@ class ActivityRuns { * {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 ActivityRunsListResponse} for more + * See {@link ActivityRunsQueryResponse} 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. */ - listByPipelineRunNext(nextPageLink, options, optionalCallback) { + queryByPipelineRun(resourceGroupName, factoryName, runId, filterParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -576,14 +347,14 @@ class ActivityRuns { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByPipelineRunNext(nextPageLink, options, (err, result, request, response) => { + self._queryByPipelineRun(resourceGroupName, factoryName, runId, filterParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByPipelineRunNext(nextPageLink, options, optionalCallback); + return self._queryByPipelineRun(resourceGroupName, factoryName, runId, filterParameters, options, optionalCallback); } } diff --git a/lib/services/datafactoryManagement/lib/operations/datasets.js b/lib/services/datafactoryManagement/lib/operations/datasets.js index 73631c23a9..135e27938e 100644 --- a/lib/services/datafactoryManagement/lib/operations/datasets.js +++ b/lib/services/datafactoryManagement/lib/operations/datasets.js @@ -147,13 +147,12 @@ function _listByFactory(resourceGroupName, factoryName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -399,13 +398,12 @@ function _createOrUpdate(resourceGroupName, factoryName, datasetName, dataset, o try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -451,6 +449,10 @@ function _createOrUpdate(resourceGroupName, factoryName, datasetName, dataset, o * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the dataset entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -477,6 +479,7 @@ function _get(resourceGroupName, factoryName, datasetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let ifNoneMatch = (options && options.ifNoneMatch !== undefined) ? options.ifNoneMatch : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -536,6 +539,9 @@ function _get(resourceGroupName, factoryName, datasetName, options, callback) { 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 (ifNoneMatch !== null && ifNoneMatch !== undefined && typeof ifNoneMatch.valueOf() !== 'string') { + throw new Error('ifNoneMatch 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.'); } @@ -566,6 +572,9 @@ function _get(resourceGroupName, factoryName, datasetName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (ifNoneMatch !== undefined && ifNoneMatch !== null) { + httpRequest.headers['If-None-Match'] = ifNoneMatch; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -583,7 +592,7 @@ function _get(resourceGroupName, factoryName, datasetName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 304) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -593,13 +602,12 @@ function _get(resourceGroupName, factoryName, datasetName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -786,13 +794,12 @@ function _deleteMethod(resourceGroupName, factoryName, datasetName, options, cal try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -897,13 +904,12 @@ function _listByFactoryNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1200,6 +1206,10 @@ class Datasets { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the dataset entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1234,6 +1244,10 @@ class Datasets { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the dataset entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/datafactoryManagement/lib/operations/factories.js b/lib/services/datafactoryManagement/lib/operations/factories.js index 89e120e913..b259c9851d 100644 --- a/lib/services/datafactoryManagement/lib/operations/factories.js +++ b/lib/services/datafactoryManagement/lib/operations/factories.js @@ -107,13 +107,12 @@ function _list(options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -149,9 +148,34 @@ function _list(options, callback) { } /** - * Lists factories. + * Updates a factory's repo information. * - * @param {string} resourceGroupName The resource group name. + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource + * id. + * + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information + * of the factory. + * + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. + * + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last + * commit id. + * + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -165,13 +189,13 @@ function _list(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 FactoryListResponse} for more information. + * See {@link Factory} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByResourceGroup(resourceGroupName, options, callback) { +function _configureFactoryRepo(locationId, factoryRepoUpdate, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -186,26 +210,15 @@ function _listByResourceGroup(resourceGroupName, options, callback) { 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 (resourceGroupName !== null && resourceGroupName !== undefined) { - if (resourceGroupName.length > 90) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); - } - if (resourceGroupName.length < 1) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); - } - if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); - } + if (locationId === null || locationId === undefined || typeof locationId.valueOf() !== 'string') { + throw new Error('locationId 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 (factoryRepoUpdate === null || factoryRepoUpdate === undefined) { + throw new Error('factoryRepoUpdate 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.'); } @@ -215,9 +228,9 @@ function _listByResourceGroup(resourceGroupName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{locationId}', encodeURIComponent(locationId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -226,7 +239,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -244,7 +257,21 @@ function _listByResourceGroup(resourceGroupName, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (factoryRepoUpdate !== null && factoryRepoUpdate !== undefined) { + let requestModelMapper = new client.models['FactoryRepoUpdate']().mapper(); + requestModel = client.serialize(requestModelMapper, factoryRepoUpdate, 'factoryRepoUpdate'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(factoryRepoUpdate, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -261,13 +288,12 @@ function _listByResourceGroup(resourceGroupName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -287,7 +313,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['FactoryListResponse']().mapper(); + let resultMapper = new client.models['Factory']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -303,20 +329,10 @@ function _listByResourceGroup(resourceGroupName, options, callback) { } /** - * Creates or updates a factory. + * Lists factories. * * @param {string} resourceGroupName The resource group name. * - * @param {string} factoryName The factory name. - * - * @param {object} factory Factory resource definition. - * - * @param {object} [factory.identity] Managed service identity of the factory. - * - * @param {string} [factory.location] The resource location. - * - * @param {object} [factory.tags] The resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -329,13 +345,13 @@ function _listByResourceGroup(resourceGroupName, 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 Factory} for more information. + * See {@link FactoryListResponse} 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, factoryName, factory, options, callback) { +function _listByResourceGroup(resourceGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -345,10 +361,6 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb if (!callback) { throw new Error('callback cannot be null.'); } - if (factory === null || factory === undefined) - { - factory = {}; - } // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -371,29 +383,9 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); } } - if (factoryName === null || factoryName === undefined || typeof factoryName.valueOf() !== 'string') { - throw new Error('factoryName cannot be null or undefined and it must be of type string.'); - } - if (factoryName !== null && factoryName !== undefined) { - if (factoryName.length > 63) - { - throw new Error('"factoryName" should satisfy the constraint - "MaxLength": 63'); - } - if (factoryName.length < 3) - { - throw new Error('"factoryName" should satisfy the constraint - "MinLength": 3'); - } - if (factoryName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) - { - throw new Error('"factoryName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); - } - } 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 (factory === null || factory === undefined) { - throw new Error('factory 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.'); } @@ -403,10 +395,9 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -415,7 +406,7 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -433,21 +424,7 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (factory !== null && factory !== undefined) { - let requestModelMapper = new client.models['Factory']().mapper(); - requestModel = client.serialize(requestModelMapper, factory, 'factory'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(factory, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -464,13 +441,12 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -490,7 +466,7 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Factory']().mapper(); + let resultMapper = new client.models['FactoryListResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -506,22 +482,42 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb } /** - * Updates a factory. + * Creates or updates a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * - * @param {object} factoryUpdateParameters The parameters for updating a + * @param {object} factory Factory resource definition. + * + * @param {object} [factory.identity] Managed service identity of the factory. + * + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {object} [factoryUpdateParameters.tags] The resource tags. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {object} [factoryUpdateParameters.identity] Managed service identity - * of the factory. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. + * + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. + * + * @param {string} factory.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. + * + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator + * + * @param {string} [factory.location] The resource location. + * + * @param {object} [factory.tags] The resource tags. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifMatch] ETag of the factory entity. Should only be + * specified for update, for which it should match existing entity or can be * + * for unconditional update. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -538,7 +534,7 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _update(resourceGroupName, factoryName, factoryUpdateParameters, options, callback) { +function _createOrUpdate(resourceGroupName, factoryName, factory, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -548,9 +544,10 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option if (!callback) { throw new Error('callback cannot be null.'); } - if (factoryUpdateParameters === null || factoryUpdateParameters === undefined) + let ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined; + if (factory === null || factory === undefined) { - factoryUpdateParameters = {}; + factory = {}; } // Validate try { @@ -594,8 +591,11 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option 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 (factoryUpdateParameters === null || factoryUpdateParameters === undefined) { - throw new Error('factoryUpdateParameters cannot be null or undefined.'); + if (factory === null || factory === undefined) { + throw new Error('factory cannot be null or undefined.'); + } + if (ifMatch !== null && ifMatch !== undefined && typeof ifMatch.valueOf() !== 'string') { + throw new Error('ifMatch 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.'); @@ -618,7 +618,7 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -626,6 +626,9 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (ifMatch !== undefined && ifMatch !== null) { + httpRequest.headers['If-Match'] = ifMatch; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -640,14 +643,14 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option let requestContent = null; let requestModel = null; try { - if (factoryUpdateParameters !== null && factoryUpdateParameters !== undefined) { - let requestModelMapper = new client.models['FactoryUpdateParameters']().mapper(); - requestModel = client.serialize(requestModelMapper, factoryUpdateParameters, 'factoryUpdateParameters'); + if (factory !== null && factory !== undefined) { + let requestModelMapper = new client.models['Factory']().mapper(); + requestModel = client.serialize(requestModelMapper, factory, 'factory'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(factoryUpdateParameters, null, 2)}.`); + `payload - ${JSON.stringify(factory, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -667,13 +670,12 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -709,12 +711,20 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option } /** - * Gets a factory. + * Updates a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * + * @param {object} factoryUpdateParameters The parameters for updating a + * factory. + * + * @param {object} [factoryUpdateParameters.tags] The resource tags. + * + * @param {object} [factoryUpdateParameters.identity] Managed service identity + * of the factory. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -733,7 +743,7 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, factoryName, options, callback) { +function _update(resourceGroupName, factoryName, factoryUpdateParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -743,6 +753,10 @@ function _get(resourceGroupName, factoryName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + if (factoryUpdateParameters === null || factoryUpdateParameters === undefined) + { + factoryUpdateParameters = {}; + } // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -785,6 +799,9 @@ function _get(resourceGroupName, factoryName, options, callback) { 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 (factoryUpdateParameters === null || factoryUpdateParameters === undefined) { + throw new Error('factoryUpdateParameters 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.'); } @@ -806,7 +823,7 @@ function _get(resourceGroupName, factoryName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -824,7 +841,21 @@ function _get(resourceGroupName, factoryName, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (factoryUpdateParameters !== null && factoryUpdateParameters !== undefined) { + let requestModelMapper = new client.models['FactoryUpdateParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, factoryUpdateParameters, 'factoryUpdateParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(factoryUpdateParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -841,13 +872,12 @@ function _get(resourceGroupName, factoryName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -883,7 +913,7 @@ function _get(resourceGroupName, factoryName, options, callback) { } /** - * Deletes a factory. + * Gets a factory. * * @param {string} resourceGroupName The resource group name. * @@ -891,6 +921,10 @@ function _get(resourceGroupName, factoryName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the factory entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -900,13 +934,14 @@ function _get(resourceGroupName, factoryName, 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. + * See {@link Factory} 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 _deleteMethod(resourceGroupName, factoryName, options, callback) { +function _get(resourceGroupName, factoryName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -916,6 +951,7 @@ function _deleteMethod(resourceGroupName, factoryName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let ifNoneMatch = (options && options.ifNoneMatch !== undefined) ? options.ifNoneMatch : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -958,6 +994,9 @@ function _deleteMethod(resourceGroupName, factoryName, options, callback) { 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 (ifNoneMatch !== null && ifNoneMatch !== undefined && typeof ifNoneMatch.valueOf() !== 'string') { + throw new Error('ifNoneMatch 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.'); } @@ -979,7 +1018,7 @@ function _deleteMethod(resourceGroupName, factoryName, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -987,6 +1026,9 @@ function _deleteMethod(resourceGroupName, factoryName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (ifNoneMatch !== undefined && ifNoneMatch !== null) { + httpRequest.headers['If-None-Match'] = ifNoneMatch; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -1004,7 +1046,7 @@ function _deleteMethod(resourceGroupName, factoryName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 304) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1014,13 +1056,12 @@ function _deleteMethod(resourceGroupName, factoryName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1033,20 +1074,35 @@ function _deleteMethod(resourceGroupName, factoryName, 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['Factory']().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); }); } /** - * Cancel a pipeline run by its run ID. + * Deletes a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * - * @param {string} runId The pipeline run identifier. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1064,7 +1120,7 @@ function _deleteMethod(resourceGroupName, factoryName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _cancelPipelineRun(resourceGroupName, factoryName, runId, options, callback) { +function _deleteMethod(resourceGroupName, factoryName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1113,9 +1169,6 @@ function _cancelPipelineRun(resourceGroupName, factoryName, runId, options, call throw new Error('"factoryName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); } } - if (runId === null || runId === undefined || typeof runId.valueOf() !== 'string') { - throw new Error('runId 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.'); } @@ -1128,11 +1181,10 @@ function _cancelPipelineRun(resourceGroupName, factoryName, runId, options, call // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/cancelpipelinerun/{runId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); - requestUrl = requestUrl.replace('{runId}', encodeURIComponent(runId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -1141,7 +1193,7 @@ function _cancelPipelineRun(resourceGroupName, factoryName, runId, options, call // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1166,7 +1218,7 @@ function _cancelPipelineRun(resourceGroupName, factoryName, runId, options, call return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1176,13 +1228,12 @@ function _cancelPipelineRun(resourceGroupName, factoryName, runId, options, call try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1287,13 +1338,12 @@ function _listNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1415,13 +1465,12 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1465,12 +1514,12 @@ class Factories { constructor(client) { this.client = client; this._list = _list; + this._configureFactoryRepo = _configureFactoryRepo; this._listByResourceGroup = _listByResourceGroup; this._createOrUpdate = _createOrUpdate; this._update = _update; this._get = _get; this._deleteMethod = _deleteMethod; - this._cancelPipelineRun = _cancelPipelineRun; this._listNext = _listNext; this._listByResourceGroupNext = _listByResourceGroupNext; } @@ -1554,9 +1603,34 @@ class Factories { } /** - * Lists factories. + * Updates a factory's repo information. * - * @param {string} resourceGroupName The resource group name. + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource + * id. + * + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information + * of the factory. + * + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. + * + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last + * commit id. + * + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -1565,15 +1639,15 @@ class Factories { * * @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) { + configureFactoryRepoWithHttpOperationResponse(locationId, factoryRepoUpdate, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._configureFactoryRepo(locationId, factoryRepoUpdate, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1584,9 +1658,34 @@ class Factories { } /** - * Lists factories. + * Updates a factory's repo information. * - * @param {string} resourceGroupName The resource group name. + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource + * id. + * + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information + * of the factory. + * + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. + * + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last + * commit id. + * + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -1600,7 +1699,7 @@ class Factories { * * {Promise} A promise is returned * - * @resolve {FactoryListResponse} - The deserialized result object. + * @resolve {Factory} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1609,13 +1708,13 @@ class Factories { * {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 FactoryListResponse} for more information. + * See {@link Factory} 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) { + configureFactoryRepo(locationId, factoryRepoUpdate, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1624,32 +1723,22 @@ class Factories { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._configureFactoryRepo(locationId, factoryRepoUpdate, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + return self._configureFactoryRepo(locationId, factoryRepoUpdate, options, optionalCallback); } } /** - * Creates or updates a factory. + * Lists factories. * * @param {string} resourceGroupName The resource group name. * - * @param {string} factoryName The factory name. - * - * @param {object} factory Factory resource definition. - * - * @param {object} [factory.identity] Managed service identity of the factory. - * - * @param {string} [factory.location] The resource location. - * - * @param {object} [factory.tags] The resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1657,15 +1746,15 @@ class Factories { * * @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, factoryName, factory, options) { + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, factoryName, factory, options, (err, result, request, response) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1676,20 +1765,10 @@ class Factories { } /** - * Creates or updates a factory. + * Lists factories. * * @param {string} resourceGroupName The resource group name. * - * @param {string} factoryName The factory name. - * - * @param {object} factory Factory resource definition. - * - * @param {object} [factory.identity] Managed service identity of the factory. - * - * @param {string} [factory.location] The resource location. - * - * @param {object} [factory.tags] The resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1702,7 +1781,7 @@ class Factories { * * {Promise} A promise is returned * - * @resolve {Factory} - The deserialized result object. + * @resolve {FactoryListResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1711,13 +1790,13 @@ class Factories { * {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 Factory} for more information. + * See {@link FactoryListResponse} 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, factoryName, factory, options, optionalCallback) { + listByResourceGroup(resourceGroupName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1726,34 +1805,54 @@ class Factories { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(resourceGroupName, factoryName, factory, options, (err, result, request, response) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(resourceGroupName, factoryName, factory, options, optionalCallback); + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); } } /** - * Updates a factory. + * Creates or updates a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * - * @param {object} factoryUpdateParameters The parameters for updating a + * @param {object} factory Factory resource definition. + * + * @param {object} [factory.identity] Managed service identity of the factory. + * + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {object} [factoryUpdateParameters.tags] The resource tags. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {object} [factoryUpdateParameters.identity] Managed service identity - * of the factory. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. + * + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. + * + * @param {string} factory.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. + * + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator + * + * @param {string} [factory.location] The resource location. + * + * @param {object} [factory.tags] The resource tags. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifMatch] ETag of the factory entity. Should only be + * specified for update, for which it should match existing entity or can be * + * for unconditional update. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1763,11 +1862,11 @@ class Factories { * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName, factoryName, factoryUpdateParameters, options) { + createOrUpdateWithHttpOperationResponse(resourceGroupName, factoryName, factory, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(resourceGroupName, factoryName, factoryUpdateParameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, factoryName, factory, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1778,22 +1877,42 @@ class Factories { } /** - * Updates a factory. + * Creates or updates a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * - * @param {object} factoryUpdateParameters The parameters for updating a + * @param {object} factory Factory resource definition. + * + * @param {object} [factory.identity] Managed service identity of the factory. + * + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {object} [factoryUpdateParameters.tags] The resource tags. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {object} [factoryUpdateParameters.identity] Managed service identity - * of the factory. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. + * + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. + * + * @param {string} factory.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. + * + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator + * + * @param {string} [factory.location] The resource location. + * + * @param {object} [factory.tags] The resource tags. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifMatch] ETag of the factory entity. Should only be + * specified for update, for which it should match existing entity or can be * + * for unconditional update. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1819,7 +1938,7 @@ class Factories { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName, factoryName, factoryUpdateParameters, options, optionalCallback) { + createOrUpdate(resourceGroupName, factoryName, factory, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1828,24 +1947,32 @@ class Factories { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(resourceGroupName, factoryName, factoryUpdateParameters, options, (err, result, request, response) => { + self._createOrUpdate(resourceGroupName, factoryName, factory, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(resourceGroupName, factoryName, factoryUpdateParameters, options, optionalCallback); + return self._createOrUpdate(resourceGroupName, factoryName, factory, options, optionalCallback); } } /** - * Gets a factory. + * Updates a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * + * @param {object} factoryUpdateParameters The parameters for updating a + * factory. + * + * @param {object} [factoryUpdateParameters.tags] The resource tags. + * + * @param {object} [factoryUpdateParameters.identity] Managed service identity + * of the factory. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1857,11 +1984,11 @@ class Factories { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, factoryName, options) { + updateWithHttpOperationResponse(resourceGroupName, factoryName, factoryUpdateParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, factoryName, options, (err, result, request, response) => { + self._update(resourceGroupName, factoryName, factoryUpdateParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1872,12 +1999,20 @@ class Factories { } /** - * Gets a factory. + * Updates a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * + * @param {object} factoryUpdateParameters The parameters for updating a + * factory. + * + * @param {object} [factoryUpdateParameters.tags] The resource tags. + * + * @param {object} [factoryUpdateParameters.identity] Managed service identity + * of the factory. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1905,7 +2040,7 @@ class Factories { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, factoryName, options, optionalCallback) { + update(resourceGroupName, factoryName, factoryUpdateParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1914,19 +2049,19 @@ class Factories { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, factoryName, options, (err, result, request, response) => { + self._update(resourceGroupName, factoryName, factoryUpdateParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, factoryName, options, optionalCallback); + return self._update(resourceGroupName, factoryName, factoryUpdateParameters, options, optionalCallback); } } /** - * Deletes a factory. + * Gets a factory. * * @param {string} resourceGroupName The resource group name. * @@ -1934,20 +2069,24 @@ class Factories { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the factory entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @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. */ - deleteMethodWithHttpOperationResponse(resourceGroupName, factoryName, options) { + getWithHttpOperationResponse(resourceGroupName, factoryName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, factoryName, options, (err, result, request, response) => { + self._get(resourceGroupName, factoryName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1958,7 +2097,7 @@ class Factories { } /** - * Deletes a factory. + * Gets a factory. * * @param {string} resourceGroupName The resource group name. * @@ -1966,6 +2105,10 @@ class Factories { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the factory entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1976,7 +2119,7 @@ class Factories { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Factory} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1984,13 +2127,14 @@ class Factories { * * {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 Factory} 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. */ - deleteMethod(resourceGroupName, factoryName, options, optionalCallback) { + get(resourceGroupName, factoryName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1999,26 +2143,24 @@ class Factories { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(resourceGroupName, factoryName, options, (err, result, request, response) => { + self._get(resourceGroupName, factoryName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(resourceGroupName, factoryName, options, optionalCallback); + return self._get(resourceGroupName, factoryName, options, optionalCallback); } } /** - * Cancel a pipeline run by its run ID. + * Deletes a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * - * @param {string} runId The pipeline run identifier. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2030,11 +2172,11 @@ class Factories { * * @reject {Error} - The error object. */ - cancelPipelineRunWithHttpOperationResponse(resourceGroupName, factoryName, runId, options) { + deleteMethodWithHttpOperationResponse(resourceGroupName, factoryName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._cancelPipelineRun(resourceGroupName, factoryName, runId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, factoryName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2045,14 +2187,12 @@ class Factories { } /** - * Cancel a pipeline run by its run ID. + * Deletes a factory. * * @param {string} resourceGroupName The resource group name. * * @param {string} factoryName The factory name. * - * @param {string} runId The pipeline run identifier. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2079,7 +2219,7 @@ class Factories { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - cancelPipelineRun(resourceGroupName, factoryName, runId, options, optionalCallback) { + deleteMethod(resourceGroupName, factoryName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2088,14 +2228,14 @@ class Factories { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._cancelPipelineRun(resourceGroupName, factoryName, runId, options, (err, result, request, response) => { + self._deleteMethod(resourceGroupName, factoryName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._cancelPipelineRun(resourceGroupName, factoryName, runId, options, optionalCallback); + return self._deleteMethod(resourceGroupName, factoryName, options, optionalCallback); } } diff --git a/lib/services/datafactoryManagement/lib/operations/index.d.ts b/lib/services/datafactoryManagement/lib/operations/index.d.ts index 3a65b8a064..c26a638686 100644 --- a/lib/services/datafactoryManagement/lib/operations/index.d.ts +++ b/lib/services/datafactoryManagement/lib/operations/index.d.ts @@ -70,6 +70,63 @@ export interface Operations { list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; list(callback: ServiceCallback): void; list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists the available Azure Data Factory API operations. + * + * @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>; + + /** + * Lists the available Azure Data Factory API operations. + * + * @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 {OperationListResponse} - 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. + * + * {OperationListResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationListResponse} 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; } /** @@ -132,6 +189,111 @@ export interface Factories { list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Updates a factory's repo information. + * + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource + * id. + * + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information + * of the factory. + * + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. + * + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last + * commit id. + * + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator + * + * @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. + */ + configureFactoryRepoWithHttpOperationResponse(locationId: string, factoryRepoUpdate: models.FactoryRepoUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a factory's repo information. + * + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource + * id. + * + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information + * of the factory. + * + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. + * + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. + * + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last + * commit id. + * + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator + * + * @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 {Factory} - 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. + * + * {Factory} [result] - The deserialized result object if an error did not occur. + * See {@link Factory} 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. + */ + configureFactoryRepo(locationId: string, factoryRepoUpdate: models.FactoryRepoUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + configureFactoryRepo(locationId: string, factoryRepoUpdate: models.FactoryRepoUpdate, callback: ServiceCallback): void; + configureFactoryRepo(locationId: string, factoryRepoUpdate: models.FactoryRepoUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Lists factories. * @@ -198,12 +360,32 @@ export interface Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * + * @param {object} [factory.repoConfiguration] Git repo information of the + * factory. + * + * @param {string} factory.repoConfiguration.accountName Account name. + * + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. + * + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. + * + * @param {string} factory.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. + * + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator + * * @param {string} [factory.location] The resource location. * * @param {object} [factory.tags] The resource tags. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifMatch] ETag of the factory entity. Should only be + * specified for update, for which it should match existing entity or can be * + * for unconditional update. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -213,7 +395,7 @@ export interface Factories { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, factoryName: string, factory: models.Factory, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, factoryName: string, factory: models.Factory, options?: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates or updates a factory. @@ -226,12 +408,32 @@ export interface Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * + * @param {object} [factory.repoConfiguration] Git repo information of the + * factory. + * + * @param {string} factory.repoConfiguration.accountName Account name. + * + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. + * + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. + * + * @param {string} factory.repoConfiguration.rootFolder Root folder. + * + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. + * + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator + * * @param {string} [factory.location] The resource location. * * @param {object} [factory.tags] The resource tags. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifMatch] ETag of the factory entity. Should only be + * specified for update, for which it should match existing entity or can be * + * for unconditional update. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -257,9 +459,9 @@ export interface Factories { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, factoryName: string, factory: models.Factory, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, factoryName: string, factory: models.Factory, options?: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; createOrUpdate(resourceGroupName: string, factoryName: string, factory: models.Factory, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, factoryName: string, factory: models.Factory, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, factoryName: string, factory: models.Factory, options: { ifMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -346,6 +548,10 @@ export interface Factories { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the factory entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -355,7 +561,7 @@ export interface Factories { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a factory. @@ -366,6 +572,10 @@ export interface Factories { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the factory entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -391,9 +601,9 @@ export interface Factories { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, factoryName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, factoryName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; get(resourceGroupName: string, factoryName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, factoryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, factoryName: string, options: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -454,68 +664,6 @@ export interface Factories { deleteMethod(resourceGroupName: string, factoryName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * Cancel a pipeline run by its run ID. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} runId The pipeline run identifier. - * - * @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. - */ - cancelPipelineRunWithHttpOperationResponse(resourceGroupName: string, factoryName: string, runId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Cancel a pipeline run by its run ID. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} runId The pipeline run identifier. - * - * @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. - */ - cancelPipelineRun(resourceGroupName: string, factoryName: string, runId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - cancelPipelineRun(resourceGroupName: string, factoryName: string, runId: string, callback: ServiceCallback): void; - cancelPipelineRun(resourceGroupName: string, factoryName: string, runId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - /** * Lists factories under the specified subscription. * @@ -802,6 +950,10 @@ export interface IntegrationRuntimes { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the integration runtime + * entity. Should only be specified for get. If the ETag matches the existing + * entity tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -811,7 +963,7 @@ export interface IntegrationRuntimes { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets an integration runtime. @@ -824,6 +976,10 @@ export interface IntegrationRuntimes { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the integration runtime + * entity. Should only be specified for get. If the ETag matches the existing + * entity tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -850,9 +1006,9 @@ export interface IntegrationRuntimes { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; get(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -883,11 +1039,11 @@ export interface IntegrationRuntimes { * * @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, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates an integration runtime. @@ -922,7 +1078,7 @@ export interface IntegrationRuntimes { * * {Promise} A promise is returned. * - * @resolve {IntegrationRuntimeStatusResponse} - The deserialized result object. + * @resolve {IntegrationRuntimeResource} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -930,17 +1086,17 @@ export interface IntegrationRuntimes { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {IntegrationRuntimeStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link IntegrationRuntimeStatusResponse} for more + * {IntegrationRuntimeResource} [result] - The deserialized result object if an error did not occur. + * See {@link IntegrationRuntimeResource} 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, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, callback: ServiceCallback): void; - update(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, callback: ServiceCallback): void; + update(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, updateIntegrationRuntimeRequest: models.UpdateIntegrationRuntimeRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1403,80 +1559,6 @@ export interface IntegrationRuntimes { stop(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * Remove a node from integration runtime. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} integrationRuntimeName The integration runtime name. - * - * @param {object} removeNodeParameters The name of the node to be removed from - * an integration runtime. - * - * @param {string} [removeNodeParameters.nodeName] The name of the node to be - * removed. - * - * @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. - */ - removeNodeWithHttpOperationResponse(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, removeNodeParameters: models.IntegrationRuntimeRemoveNodeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Remove a node from integration runtime. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} integrationRuntimeName The integration runtime name. - * - * @param {object} removeNodeParameters The name of the node to be removed from - * an integration runtime. - * - * @param {string} [removeNodeParameters.nodeName] The name of the node to be - * removed. - * - * @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. - */ - removeNode(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, removeNodeParameters: models.IntegrationRuntimeRemoveNodeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - removeNode(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, removeNodeParameters: models.IntegrationRuntimeRemoveNodeRequest, callback: ServiceCallback): void; - removeNode(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, removeNodeParameters: models.IntegrationRuntimeRemoveNodeRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - /** * Force the integration runtime to synchronize credentials across integration * runtime nodes, and this will override the credentials across all worker @@ -2283,6 +2365,10 @@ export interface LinkedServices { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the linked service entity. + * Should only be specified for get. If the ETag matches the existing entity + * tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2292,7 +2378,7 @@ export interface LinkedServices { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, linkedServiceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, linkedServiceName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a linked service. @@ -2305,6 +2391,10 @@ export interface LinkedServices { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the linked service entity. + * Should only be specified for get. If the ETag matches the existing entity + * tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2330,9 +2420,9 @@ export interface LinkedServices { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, factoryName: string, linkedServiceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, factoryName: string, linkedServiceName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; get(resourceGroupName: string, factoryName: string, linkedServiceName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, factoryName: string, linkedServiceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, factoryName: string, linkedServiceName: string, options: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2657,6 +2747,10 @@ export interface Datasets { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the dataset entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2666,7 +2760,7 @@ export interface Datasets { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, datasetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, datasetName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a dataset. @@ -2679,6 +2773,10 @@ export interface Datasets { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the dataset entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2704,9 +2802,9 @@ export interface Datasets { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, factoryName: string, datasetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, factoryName: string, datasetName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; get(resourceGroupName: string, factoryName: string, datasetName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, factoryName: string, datasetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, factoryName: string, datasetName: string, options: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3012,6 +3110,10 @@ export interface Pipelines { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the pipeline entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3021,7 +3123,7 @@ export interface Pipelines { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a pipeline. @@ -3034,6 +3136,10 @@ export interface Pipelines { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the pipeline entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3059,9 +3165,9 @@ export interface Pipelines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; get(resourceGroupName: string, factoryName: string, pipelineName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, factoryName: string, pipelineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, factoryName: string, pipelineName: string, options: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3137,7 +3243,12 @@ export interface Pipelines { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters of the pipeline run. + * @param {string} [options.referencePipelineRunId] The pipeline run + * identifier. If run ID is specified the parameters of the the specified run + * will be used to create a new run. + * + * @param {object} [options.parameters] Parameters of the pipeline run. These + * parameters will be used only if the runId is not specified. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3148,7 +3259,7 @@ export interface Pipelines { * * @reject {Error|ServiceError} - The error object. */ - createRunWithHttpOperationResponse(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { parameters? : { [propertyName: string]: any }, customHeaders? : { [headerName: string]: string; } }): Promise>; + createRunWithHttpOperationResponse(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { referencePipelineRunId? : string, parameters? : { [propertyName: string]: any }, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a run of a pipeline. @@ -3161,7 +3272,12 @@ export interface Pipelines { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters of the pipeline run. + * @param {string} [options.referencePipelineRunId] The pipeline run + * identifier. If run ID is specified the parameters of the the specified run + * will be used to create a new run. + * + * @param {object} [options.parameters] Parameters of the pipeline run. These + * parameters will be used only if the runId is not specified. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3188,9 +3304,9 @@ export interface Pipelines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createRun(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { parameters? : { [propertyName: string]: any }, customHeaders? : { [headerName: string]: string; } }): Promise; + createRun(resourceGroupName: string, factoryName: string, pipelineName: string, options?: { referencePipelineRunId? : string, parameters? : { [propertyName: string]: any }, customHeaders? : { [headerName: string]: string; } }): Promise; createRun(resourceGroupName: string, factoryName: string, pipelineName: string, callback: ServiceCallback): void; - createRun(resourceGroupName: string, factoryName: string, pipelineName: string, options: { parameters? : { [propertyName: string]: any }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createRun(resourceGroupName: string, factoryName: string, pipelineName: string, options: { referencePipelineRunId? : string, parameters? : { [propertyName: string]: any }, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3272,10 +3388,10 @@ export interface PipelineRuns { * for getting the next page of results. Null for first page. * * @param {date} filterParameters.lastUpdatedAfter The time at or after which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {date} filterParameters.lastUpdatedBefore The time at or before which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {array} [filterParameters.filters] List of filters. * @@ -3288,11 +3404,11 @@ export interface PipelineRuns { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - queryByFactoryWithHttpOperationResponse(resourceGroupName: string, factoryName: string, filterParameters: models.PipelineRunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + queryByFactoryWithHttpOperationResponse(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Query pipeline runs in the factory based on input filter conditions. @@ -3307,10 +3423,10 @@ export interface PipelineRuns { * for getting the next page of results. Null for first page. * * @param {date} filterParameters.lastUpdatedAfter The time at or after which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {date} filterParameters.lastUpdatedBefore The time at or before which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {array} [filterParameters.filters] List of filters. * @@ -3328,7 +3444,7 @@ export interface PipelineRuns { * * {Promise} A promise is returned. * - * @resolve {PipelineRunQueryResponse} - The deserialized result object. + * @resolve {PipelineRunsQueryResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3336,17 +3452,17 @@ export interface PipelineRuns { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PipelineRunQueryResponse} [result] - The deserialized result object if an error did not occur. - * See {@link PipelineRunQueryResponse} for more + * {PipelineRunsQueryResponse} [result] - The deserialized result object if an error did not occur. + * See {@link PipelineRunsQueryResponse} 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. */ - queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.PipelineRunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.PipelineRunFilterParameters, callback: ServiceCallback): void; - queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.PipelineRunFilterParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, callback: ServiceCallback): void; + queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3410,19 +3526,10 @@ export interface PipelineRuns { get(resourceGroupName: string, factoryName: string, runId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; get(resourceGroupName: string, factoryName: string, runId: string, callback: ServiceCallback): void; get(resourceGroupName: string, factoryName: string, runId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ActivityRuns - * __NOTE__: An instance of this class is automatically created for an - * instance of the DataFactoryManagementClient. - */ -export interface ActivityRuns { /** - * List activity runs based on input filter conditions. + * Cancel a pipeline run by its run ID. * * @param {string} resourceGroupName The resource group name. * @@ -3430,31 +3537,21 @@ export interface ActivityRuns { * * @param {string} runId The pipeline run identifier. * - * @param {date} startTime The start time of activity runs in ISO8601 format. - * - * @param {date} endTime The end time of activity runs in ISO8601 format. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.status] The status of the pipeline run. - * - * @param {string} [options.activityName] The name of the activity. - * - * @param {string} [options.linkedServiceName] The linked service name. - * * @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. */ - listByPipelineRunWithHttpOperationResponse(resourceGroupName: string, factoryName: string, runId: string, startTime: Date|string, endTime: Date|string, options?: { status? : string, activityName? : string, linkedServiceName? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + cancelWithHttpOperationResponse(resourceGroupName: string, factoryName: string, runId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List activity runs based on input filter conditions. + * Cancel a pipeline run by its run ID. * * @param {string} resourceGroupName The resource group name. * @@ -3462,18 +3559,8 @@ export interface ActivityRuns { * * @param {string} runId The pipeline run identifier. * - * @param {date} startTime The start time of activity runs in ISO8601 format. - * - * @param {date} endTime The end time of activity runs in ISO8601 format. - * * @param {object} [options] Optional Parameters. * - * @param {string} [options.status] The status of the pipeline run. - * - * @param {string} [options.activityName] The name of the activity. - * - * @param {string} [options.linkedServiceName] The linked service name. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3484,7 +3571,7 @@ export interface ActivityRuns { * * {Promise} A promise is returned. * - * @resolve {ActivityRunsListResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3492,24 +3579,49 @@ export interface ActivityRuns { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ActivityRunsListResponse} [result] - The deserialized result object if an error did not occur. - * See {@link ActivityRunsListResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByPipelineRun(resourceGroupName: string, factoryName: string, runId: string, startTime: Date|string, endTime: Date|string, options?: { status? : string, activityName? : string, linkedServiceName? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByPipelineRun(resourceGroupName: string, factoryName: string, runId: string, startTime: Date|string, endTime: Date|string, callback: ServiceCallback): void; - listByPipelineRun(resourceGroupName: string, factoryName: string, runId: string, startTime: Date|string, endTime: Date|string, options: { status? : string, activityName? : string, linkedServiceName? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + cancel(resourceGroupName: string, factoryName: string, runId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, factoryName: string, runId: string, callback: ServiceCallback): void; + cancel(resourceGroupName: string, factoryName: string, runId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ActivityRuns + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataFactoryManagementClient. + */ +export interface ActivityRuns { /** - * List activity runs based on input filter conditions. + * Query activity runs based on input filter conditions. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} runId The pipeline run identifier. + * + * @param {object} filterParameters Parameters to filter the activity runs. + * + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. + * + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. + * + * @param {array} [filterParameters.filters] List of filters. + * + * @param {array} [filterParameters.orderBy] List of OrderBy option. * * @param {object} [options] Optional Parameters. * @@ -3518,17 +3630,35 @@ export interface ActivityRuns { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByPipelineRunNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + queryByPipelineRunWithHttpOperationResponse(resourceGroupName: string, factoryName: string, runId: string, filterParameters: models.RunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List activity runs based on input filter conditions. + * Query activity runs based on input filter conditions. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} runId The pipeline run identifier. + * + * @param {object} filterParameters Parameters to filter the activity runs. + * + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. + * + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. + * + * @param {array} [filterParameters.filters] List of filters. + * + * @param {array} [filterParameters.orderBy] List of OrderBy option. * * @param {object} [options] Optional Parameters. * @@ -3542,7 +3672,7 @@ export interface ActivityRuns { * * {Promise} A promise is returned. * - * @resolve {ActivityRunsListResponse} - The deserialized result object. + * @resolve {ActivityRunsQueryResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3550,17 +3680,17 @@ export interface ActivityRuns { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ActivityRunsListResponse} [result] - The deserialized result object if an error did not occur. - * See {@link ActivityRunsListResponse} for more + * {ActivityRunsQueryResponse} [result] - The deserialized result object if an error did not occur. + * See {@link ActivityRunsQueryResponse} 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. */ - listByPipelineRunNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByPipelineRunNext(nextPageLink: string, callback: ServiceCallback): void; - listByPipelineRunNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + queryByPipelineRun(resourceGroupName: string, factoryName: string, runId: string, filterParameters: models.RunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + queryByPipelineRun(resourceGroupName: string, factoryName: string, runId: string, filterParameters: models.RunFilterParameters, callback: ServiceCallback): void; + queryByPipelineRun(resourceGroupName: string, factoryName: string, runId: string, filterParameters: models.RunFilterParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -3729,6 +3859,10 @@ export interface Triggers { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the trigger entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3738,7 +3872,7 @@ export interface Triggers { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, factoryName: string, triggerName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a trigger. @@ -3751,6 +3885,10 @@ export interface Triggers { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the trigger entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3776,9 +3914,9 @@ export interface Triggers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, factoryName: string, triggerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, factoryName: string, triggerName: string, options?: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }): Promise; get(resourceGroupName: string, factoryName: string, triggerName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, factoryName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, factoryName: string, triggerName: string, options: { ifNoneMatch? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3967,78 +4105,6 @@ export interface Triggers { stop(resourceGroupName: string, factoryName: string, triggerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * List trigger runs. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} triggerName The trigger name. - * - * @param {date} startTime Start time for trigger runs. - * - * @param {date} endTime End time for trigger runs. - * - * @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. - */ - listRunsWithHttpOperationResponse(resourceGroupName: string, factoryName: string, triggerName: string, startTime: Date|string, endTime: Date|string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * List trigger runs. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} triggerName The trigger name. - * - * @param {date} startTime Start time for trigger runs. - * - * @param {date} endTime End time for trigger runs. - * - * @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 {TriggerRunListResponse} - 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. - * - * {TriggerRunListResponse} [result] - The deserialized result object if an error did not occur. - * See {@link TriggerRunListResponse} 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. - */ - listRuns(resourceGroupName: string, factoryName: string, triggerName: string, startTime: Date|string, endTime: Date|string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRuns(resourceGroupName: string, factoryName: string, triggerName: string, startTime: Date|string, endTime: Date|string, callback: ServiceCallback): void; - listRuns(resourceGroupName: string, factoryName: string, triggerName: string, startTime: Date|string, endTime: Date|string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - /** * Starts a trigger. * @@ -4218,13 +4284,38 @@ export interface Triggers { listByFactoryNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listByFactoryNext(nextPageLink: string, callback: ServiceCallback): void; listByFactoryNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * TriggerRuns + * __NOTE__: An instance of this class is automatically created for an + * instance of the DataFactoryManagementClient. + */ +export interface TriggerRuns { /** - * List trigger runs. + * Query trigger runs. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} filterParameters Parameters to filter the pipeline run. + * + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. + * + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. + * + * @param {array} [filterParameters.filters] List of filters. + * + * @param {array} [filterParameters.orderBy] List of OrderBy option. * * @param {object} [options] Optional Parameters. * @@ -4233,17 +4324,33 @@ export interface Triggers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listRunsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + queryByFactoryWithHttpOperationResponse(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List trigger runs. + * Query trigger runs. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} filterParameters Parameters to filter the pipeline run. + * + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. + * + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. + * + * @param {array} [filterParameters.filters] List of filters. + * + * @param {array} [filterParameters.orderBy] List of OrderBy option. * * @param {object} [options] Optional Parameters. * @@ -4257,7 +4364,7 @@ export interface Triggers { * * {Promise} A promise is returned. * - * @resolve {TriggerRunListResponse} - The deserialized result object. + * @resolve {TriggerRunsQueryResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4265,15 +4372,15 @@ export interface Triggers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {TriggerRunListResponse} [result] - The deserialized result object if an error did not occur. - * See {@link TriggerRunListResponse} for more + * {TriggerRunsQueryResponse} [result] - The deserialized result object if an error did not occur. + * See {@link TriggerRunsQueryResponse} 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. */ - listRunsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRunsNext(nextPageLink: string, callback: ServiceCallback): void; - listRunsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, callback: ServiceCallback): void; + queryByFactory(resourceGroupName: string, factoryName: string, filterParameters: models.RunFilterParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/datafactoryManagement/lib/operations/index.js b/lib/services/datafactoryManagement/lib/operations/index.js index 5bcd72b28f..1b6e648563 100644 --- a/lib/services/datafactoryManagement/lib/operations/index.js +++ b/lib/services/datafactoryManagement/lib/operations/index.js @@ -24,3 +24,4 @@ exports.Pipelines = require('./pipelines'); exports.PipelineRuns = require('./pipelineRuns'); exports.ActivityRuns = require('./activityRuns'); exports.Triggers = require('./triggers'); +exports.TriggerRuns = require('./triggerRuns'); diff --git a/lib/services/datafactoryManagement/lib/operations/integrationRuntimeNodes.js b/lib/services/datafactoryManagement/lib/operations/integrationRuntimeNodes.js index eac59d3ca7..2baea2efc0 100644 --- a/lib/services/datafactoryManagement/lib/operations/integrationRuntimeNodes.js +++ b/lib/services/datafactoryManagement/lib/operations/integrationRuntimeNodes.js @@ -186,13 +186,12 @@ function _deleteMethod(resourceGroupName, factoryName, integrationRuntimeName, n try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -408,13 +407,12 @@ function _update(resourceGroupName, factoryName, integrationRuntimeName, nodeNam try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -623,13 +621,12 @@ function _getIpAddress(resourceGroupName, factoryName, integrationRuntimeName, n try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { diff --git a/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js b/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js index fa6dc63e2f..830d176ec2 100644 --- a/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js +++ b/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js @@ -148,13 +148,12 @@ function _listByFactory(resourceGroupName, factoryName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -381,13 +380,12 @@ function _createOrUpdate(resourceGroupName, factoryName, integrationRuntimeName, try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -433,6 +431,10 @@ function _createOrUpdate(resourceGroupName, factoryName, integrationRuntimeName, * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the integration runtime + * entity. Should only be specified for get. If the ETag matches the existing + * entity tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -460,6 +462,7 @@ function _get(resourceGroupName, factoryName, integrationRuntimeName, options, c if (!callback) { throw new Error('callback cannot be null.'); } + let ifNoneMatch = (options && options.ifNoneMatch !== undefined) ? options.ifNoneMatch : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -519,6 +522,9 @@ function _get(resourceGroupName, factoryName, integrationRuntimeName, options, c 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 (ifNoneMatch !== null && ifNoneMatch !== undefined && typeof ifNoneMatch.valueOf() !== 'string') { + throw new Error('ifNoneMatch 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.'); } @@ -549,6 +555,9 @@ function _get(resourceGroupName, factoryName, integrationRuntimeName, options, c if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (ifNoneMatch !== undefined && ifNoneMatch !== null) { + httpRequest.headers['If-None-Match'] = ifNoneMatch; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -566,7 +575,7 @@ function _get(resourceGroupName, factoryName, integrationRuntimeName, options, c return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 304) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -576,13 +585,12 @@ function _get(resourceGroupName, factoryName, integrationRuntimeName, options, c try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -650,7 +658,7 @@ function _get(resourceGroupName, factoryName, integrationRuntimeName, options, c * {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 IntegrationRuntimeStatusResponse} for more + * See {@link IntegrationRuntimeResource} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -800,13 +808,12 @@ function _update(resourceGroupName, factoryName, integrationRuntimeName, updateI try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -826,7 +833,7 @@ function _update(resourceGroupName, factoryName, integrationRuntimeName, updateI parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['IntegrationRuntimeStatusResponse']().mapper(); + let resultMapper = new client.models['IntegrationRuntimeResource']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -993,13 +1000,12 @@ function _deleteMethod(resourceGroupName, factoryName, integrationRuntimeName, o try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1171,13 +1177,12 @@ function _getStatus(resourceGroupName, factoryName, integrationRuntimeName, opti try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1367,13 +1372,12 @@ function _getConnectionInfo(resourceGroupName, factoryName, integrationRuntimeNa try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1586,13 +1590,12 @@ function _regenerateAuthKey(resourceGroupName, factoryName, integrationRuntimeNa try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1781,13 +1784,12 @@ function _listAuthKeys(resourceGroupName, factoryName, integrationRuntimeName, o try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1968,205 +1970,6 @@ function _stop(resourceGroupName, factoryName, integrationRuntimeName, options, }); } -/** - * Remove a node from integration runtime. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} integrationRuntimeName The integration runtime name. - * - * @param {object} removeNodeParameters The name of the node to be removed from - * an integration runtime. - * - * @param {string} [removeNodeParameters.nodeName] The name of the node to be - * removed. - * - * @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 _removeNode(resourceGroupName, factoryName, integrationRuntimeName, removeNodeParameters, 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 (resourceGroupName !== null && resourceGroupName !== undefined) { - if (resourceGroupName.length > 90) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); - } - if (resourceGroupName.length < 1) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); - } - if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); - } - } - if (factoryName === null || factoryName === undefined || typeof factoryName.valueOf() !== 'string') { - throw new Error('factoryName cannot be null or undefined and it must be of type string.'); - } - if (factoryName !== null && factoryName !== undefined) { - if (factoryName.length > 63) - { - throw new Error('"factoryName" should satisfy the constraint - "MaxLength": 63'); - } - if (factoryName.length < 3) - { - throw new Error('"factoryName" should satisfy the constraint - "MinLength": 3'); - } - if (factoryName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) - { - throw new Error('"factoryName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); - } - } - if (integrationRuntimeName === null || integrationRuntimeName === undefined || typeof integrationRuntimeName.valueOf() !== 'string') { - throw new Error('integrationRuntimeName cannot be null or undefined and it must be of type string.'); - } - if (integrationRuntimeName !== null && integrationRuntimeName !== undefined) { - if (integrationRuntimeName.length > 63) - { - throw new Error('"integrationRuntimeName" should satisfy the constraint - "MaxLength": 63'); - } - if (integrationRuntimeName.length < 3) - { - throw new Error('"integrationRuntimeName" should satisfy the constraint - "MinLength": 3'); - } - if (integrationRuntimeName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) - { - throw new Error('"integrationRuntimeName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); - } - } - 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 (removeNodeParameters === null || removeNodeParameters === undefined) { - throw new Error('removeNodeParameters 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.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeNode'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); - requestUrl = requestUrl.replace('{integrationRuntimeName}', encodeURIComponent(integrationRuntimeName)); - 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 (removeNodeParameters !== null && removeNodeParameters !== undefined) { - let requestModelMapper = new client.models['IntegrationRuntimeRemoveNodeRequest']().mapper(); - requestModel = client.serialize(requestModelMapper, removeNodeParameters, 'removeNodeParameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(removeNodeParameters, 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 !== 204) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().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); - }); -} - /** * Force the integration runtime to synchronize credentials across integration * runtime nodes, and this will override the credentials across all worker @@ -2323,13 +2126,12 @@ function _syncCredentials(resourceGroupName, factoryName, integrationRuntimeName try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -2502,13 +2304,12 @@ function _getMonitoringData(resourceGroupName, factoryName, integrationRuntimeNa try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -2695,13 +2496,12 @@ function _upgrade(resourceGroupName, factoryName, integrationRuntimeName, option try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -2873,13 +2673,12 @@ function _beginStart(resourceGroupName, factoryName, integrationRuntimeName, opt try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -3066,13 +2865,12 @@ function _beginStop(resourceGroupName, factoryName, integrationRuntimeName, opti try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -3178,13 +2976,12 @@ function _listByFactoryNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -3238,7 +3035,6 @@ class IntegrationRuntimes { this._listAuthKeys = _listAuthKeys; this._start = _start; this._stop = _stop; - this._removeNode = _removeNode; this._syncCredentials = _syncCredentials; this._getMonitoringData = _getMonitoringData; this._upgrade = _upgrade; @@ -3464,6 +3260,10 @@ class IntegrationRuntimes { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the integration runtime + * entity. Should only be specified for get. If the ETag matches the existing + * entity tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3498,6 +3298,10 @@ class IntegrationRuntimes { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the integration runtime + * entity. Should only be specified for get. If the ETag matches the existing + * entity tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3572,7 +3376,7 @@ class IntegrationRuntimes { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3623,7 +3427,7 @@ class IntegrationRuntimes { * * {Promise} A promise is returned * - * @resolve {IntegrationRuntimeStatusResponse} - The deserialized result object. + * @resolve {IntegrationRuntimeResource} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3632,7 +3436,7 @@ class IntegrationRuntimes { * {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 IntegrationRuntimeStatusResponse} for more + * See {@link IntegrationRuntimeResource} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -4308,107 +4112,6 @@ class IntegrationRuntimes { } } - /** - * Remove a node from integration runtime. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} integrationRuntimeName The integration runtime name. - * - * @param {object} removeNodeParameters The name of the node to be removed from - * an integration runtime. - * - * @param {string} [removeNodeParameters.nodeName] The name of the node to be - * removed. - * - * @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. - */ - removeNodeWithHttpOperationResponse(resourceGroupName, factoryName, integrationRuntimeName, removeNodeParameters, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._removeNode(resourceGroupName, factoryName, integrationRuntimeName, removeNodeParameters, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Remove a node from integration runtime. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} integrationRuntimeName The integration runtime name. - * - * @param {object} removeNodeParameters The name of the node to be removed from - * an integration runtime. - * - * @param {string} [removeNodeParameters.nodeName] The name of the node to be - * removed. - * - * @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. - */ - removeNode(resourceGroupName, factoryName, integrationRuntimeName, removeNodeParameters, 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._removeNode(resourceGroupName, factoryName, integrationRuntimeName, removeNodeParameters, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._removeNode(resourceGroupName, factoryName, integrationRuntimeName, removeNodeParameters, options, optionalCallback); - } - } - /** * Force the integration runtime to synchronize credentials across integration * runtime nodes, and this will override the credentials across all worker diff --git a/lib/services/datafactoryManagement/lib/operations/linkedServices.js b/lib/services/datafactoryManagement/lib/operations/linkedServices.js index 1b8352ebc0..9f910f42ce 100644 --- a/lib/services/datafactoryManagement/lib/operations/linkedServices.js +++ b/lib/services/datafactoryManagement/lib/operations/linkedServices.js @@ -148,13 +148,12 @@ function _listByFactory(resourceGroupName, factoryName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -398,13 +397,12 @@ function _createOrUpdate(resourceGroupName, factoryName, linkedServiceName, link try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -450,6 +448,10 @@ function _createOrUpdate(resourceGroupName, factoryName, linkedServiceName, link * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the linked service entity. + * Should only be specified for get. If the ETag matches the existing entity + * tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -476,6 +478,7 @@ function _get(resourceGroupName, factoryName, linkedServiceName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } + let ifNoneMatch = (options && options.ifNoneMatch !== undefined) ? options.ifNoneMatch : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -535,6 +538,9 @@ function _get(resourceGroupName, factoryName, linkedServiceName, options, callba 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 (ifNoneMatch !== null && ifNoneMatch !== undefined && typeof ifNoneMatch.valueOf() !== 'string') { + throw new Error('ifNoneMatch 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.'); } @@ -565,6 +571,9 @@ function _get(resourceGroupName, factoryName, linkedServiceName, options, callba if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (ifNoneMatch !== undefined && ifNoneMatch !== null) { + httpRequest.headers['If-None-Match'] = ifNoneMatch; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -582,7 +591,7 @@ function _get(resourceGroupName, factoryName, linkedServiceName, options, callba return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 304) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -592,13 +601,12 @@ function _get(resourceGroupName, factoryName, linkedServiceName, options, callba try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -785,13 +793,12 @@ function _deleteMethod(resourceGroupName, factoryName, linkedServiceName, option try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -897,13 +904,12 @@ function _listByFactoryNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1197,6 +1203,10 @@ class LinkedServices { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the linked service entity. + * Should only be specified for get. If the ETag matches the existing entity + * tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1231,6 +1241,10 @@ class LinkedServices { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the linked service entity. + * Should only be specified for get. If the ETag matches the existing entity + * tag, or if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/datafactoryManagement/lib/operations/operations.js b/lib/services/datafactoryManagement/lib/operations/operations.js index 1b7ea4a0a2..13cf0b154f 100644 --- a/lib/services/datafactoryManagement/lib/operations/operations.js +++ b/lib/services/datafactoryManagement/lib/operations/operations.js @@ -103,13 +103,139 @@ function _list(options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + 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['OperationListResponse']().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 the available Azure Data Factory API operations. + * + * @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 OperationListResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + 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) { @@ -153,6 +279,7 @@ class Operations { constructor(client) { this.client = client; this._list = _list; + this._listNext = _listNext; } /** @@ -233,6 +360,90 @@ class Operations { } } + /** + * Lists the available Azure Data Factory API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationListResponse} - 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 OperationListResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = Operations; diff --git a/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js b/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js index 90b94fb5a1..34cd8c5214 100644 --- a/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js +++ b/lib/services/datafactoryManagement/lib/operations/pipelineRuns.js @@ -27,10 +27,10 @@ const WebResource = msRest.WebResource; * for getting the next page of results. Null for first page. * * @param {date} filterParameters.lastUpdatedAfter The time at or after which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {date} filterParameters.lastUpdatedBefore The time at or before which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {array} [filterParameters.filters] List of filters. * @@ -48,7 +48,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PipelineRunQueryResponse} for more + * See {@link PipelineRunsQueryResponse} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -119,7 +119,7 @@ function _queryByFactory(resourceGroupName, factoryName, filterParameters, optio // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); @@ -154,7 +154,7 @@ function _queryByFactory(resourceGroupName, factoryName, filterParameters, optio let requestModel = null; try { if (filterParameters !== null && filterParameters !== undefined) { - let requestModelMapper = new client.models['PipelineRunFilterParameters']().mapper(); + let requestModelMapper = new client.models['RunFilterParameters']().mapper(); requestModel = client.serialize(requestModelMapper, filterParameters, 'filterParameters'); requestContent = JSON.stringify(requestModel); } @@ -180,13 +180,12 @@ function _queryByFactory(resourceGroupName, factoryName, filterParameters, optio try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -206,7 +205,7 @@ function _queryByFactory(resourceGroupName, factoryName, filterParameters, optio parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PipelineRunQueryResponse']().mapper(); + let resultMapper = new client.models['PipelineRunsQueryResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -360,13 +359,12 @@ function _get(resourceGroupName, factoryName, runId, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -401,6 +399,167 @@ function _get(resourceGroupName, factoryName, runId, options, callback) { }); } +/** + * Cancel a pipeline run by its run ID. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} runId The pipeline run identifier. + * + * @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 _cancel(resourceGroupName, factoryName, runId, 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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); + } + } + if (factoryName === null || factoryName === undefined || typeof factoryName.valueOf() !== 'string') { + throw new Error('factoryName cannot be null or undefined and it must be of type string.'); + } + if (factoryName !== null && factoryName !== undefined) { + if (factoryName.length > 63) + { + throw new Error('"factoryName" should satisfy the constraint - "MaxLength": 63'); + } + if (factoryName.length < 3) + { + throw new Error('"factoryName" should satisfy the constraint - "MinLength": 3'); + } + if (factoryName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) + { + throw new Error('"factoryName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); + } + } + if (runId === null || runId === undefined || typeof runId.valueOf() !== 'string') { + throw new Error('runId 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.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); + requestUrl = requestUrl.replace('{runId}', encodeURIComponent(runId)); + 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); + }); +} + /** Class representing a PipelineRuns. */ class PipelineRuns { /** @@ -411,6 +570,7 @@ class PipelineRuns { this.client = client; this._queryByFactory = _queryByFactory; this._get = _get; + this._cancel = _cancel; } /** @@ -426,10 +586,10 @@ class PipelineRuns { * for getting the next page of results. Null for first page. * * @param {date} filterParameters.lastUpdatedAfter The time at or after which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {date} filterParameters.lastUpdatedBefore The time at or before which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {array} [filterParameters.filters] List of filters. * @@ -442,7 +602,7 @@ class PipelineRuns { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -473,10 +633,10 @@ class PipelineRuns { * for getting the next page of results. Null for first page. * * @param {date} filterParameters.lastUpdatedAfter The time at or after which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {date} filterParameters.lastUpdatedBefore The time at or before which - * the pipeline run event was updated in 'ISO 8601' format. + * the run event was updated in 'ISO 8601' format. * * @param {array} [filterParameters.filters] List of filters. * @@ -494,7 +654,7 @@ class PipelineRuns { * * {Promise} A promise is returned * - * @resolve {PipelineRunQueryResponse} - The deserialized result object. + * @resolve {PipelineRunsQueryResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -503,7 +663,7 @@ class PipelineRuns { * {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 PipelineRunQueryResponse} for more + * See {@link PipelineRunsQueryResponse} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. @@ -620,6 +780,95 @@ class PipelineRuns { } } + /** + * Cancel a pipeline run by its run ID. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} runId The pipeline run identifier. + * + * @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. + */ + cancelWithHttpOperationResponse(resourceGroupName, factoryName, runId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._cancel(resourceGroupName, factoryName, runId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Cancel a pipeline run by its run ID. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} runId The pipeline run identifier. + * + * @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. + */ + cancel(resourceGroupName, factoryName, runId, 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._cancel(resourceGroupName, factoryName, runId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._cancel(resourceGroupName, factoryName, runId, options, optionalCallback); + } + } + } module.exports = PipelineRuns; diff --git a/lib/services/datafactoryManagement/lib/operations/pipelines.js b/lib/services/datafactoryManagement/lib/operations/pipelines.js index 8d0f77e7ed..cd7d98d318 100644 --- a/lib/services/datafactoryManagement/lib/operations/pipelines.js +++ b/lib/services/datafactoryManagement/lib/operations/pipelines.js @@ -147,13 +147,12 @@ function _listByFactory(resourceGroupName, factoryName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -386,13 +385,12 @@ function _createOrUpdate(resourceGroupName, factoryName, pipelineName, pipelineP try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -438,6 +436,10 @@ function _createOrUpdate(resourceGroupName, factoryName, pipelineName, pipelineP * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the pipeline entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -464,6 +466,7 @@ function _get(resourceGroupName, factoryName, pipelineName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let ifNoneMatch = (options && options.ifNoneMatch !== undefined) ? options.ifNoneMatch : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -523,6 +526,9 @@ function _get(resourceGroupName, factoryName, pipelineName, options, callback) { 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 (ifNoneMatch !== null && ifNoneMatch !== undefined && typeof ifNoneMatch.valueOf() !== 'string') { + throw new Error('ifNoneMatch 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.'); } @@ -553,6 +559,9 @@ function _get(resourceGroupName, factoryName, pipelineName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (ifNoneMatch !== undefined && ifNoneMatch !== null) { + httpRequest.headers['If-None-Match'] = ifNoneMatch; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -570,7 +579,7 @@ function _get(resourceGroupName, factoryName, pipelineName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 304) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -580,13 +589,12 @@ function _get(resourceGroupName, factoryName, pipelineName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -773,13 +781,12 @@ function _deleteMethod(resourceGroupName, factoryName, pipelineName, options, ca try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -808,7 +815,12 @@ function _deleteMethod(resourceGroupName, factoryName, pipelineName, options, ca * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters of the pipeline run. + * @param {string} [options.referencePipelineRunId] The pipeline run + * identifier. If run ID is specified the parameters of the the specified run + * will be used to create a new run. + * + * @param {object} [options.parameters] Parameters of the pipeline run. These + * parameters will be used only if the runId is not specified. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -836,6 +848,7 @@ function _createRun(resourceGroupName, factoryName, pipelineName, options, callb if (!callback) { throw new Error('callback cannot be null.'); } + let referencePipelineRunId = (options && options.referencePipelineRunId !== undefined) ? options.referencePipelineRunId : undefined; let parameters = (options && options.parameters !== undefined) ? options.parameters : undefined; // Validate try { @@ -896,6 +909,9 @@ function _createRun(resourceGroupName, factoryName, pipelineName, options, callb 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 (referencePipelineRunId !== null && referencePipelineRunId !== undefined && typeof referencePipelineRunId.valueOf() !== 'string') { + throw new Error('referencePipelineRunId must be of type string.'); + } if (parameters && typeof parameters === 'object') { for(let valueElement in parameters) { if (parameters[valueElement] !== null && parameters[valueElement] !== undefined && typeof parameters[valueElement] !== 'object') { @@ -919,6 +935,9 @@ function _createRun(resourceGroupName, factoryName, pipelineName, options, callb requestUrl = requestUrl.replace('{pipelineName}', encodeURIComponent(pipelineName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (referencePipelineRunId !== null && referencePipelineRunId !== undefined) { + queryParameters.push('referencePipelineRunId=' + encodeURIComponent(referencePipelineRunId)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -977,7 +996,7 @@ function _createRun(resourceGroupName, factoryName, pipelineName, options, callb return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -987,13 +1006,12 @@ function _createRun(resourceGroupName, factoryName, pipelineName, options, callb try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1007,7 +1025,7 @@ function _createRun(resourceGroupName, factoryName, pipelineName, options, callb let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 202) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1115,13 +1133,12 @@ function _listByFactoryNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1401,6 +1418,10 @@ class Pipelines { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the pipeline entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1435,6 +1456,10 @@ class Pipelines { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the pipeline entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1580,7 +1605,12 @@ class Pipelines { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters of the pipeline run. + * @param {string} [options.referencePipelineRunId] The pipeline run + * identifier. If run ID is specified the parameters of the the specified run + * will be used to create a new run. + * + * @param {object} [options.parameters] Parameters of the pipeline run. These + * parameters will be used only if the runId is not specified. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1616,7 +1646,12 @@ class Pipelines { * * @param {object} [options] Optional Parameters. * - * @param {object} [options.parameters] Parameters of the pipeline run. + * @param {string} [options.referencePipelineRunId] The pipeline run + * identifier. If run ID is specified the parameters of the the specified run + * will be used to create a new run. + * + * @param {object} [options.parameters] Parameters of the pipeline run. These + * parameters will be used only if the runId is not specified. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/datafactoryManagement/lib/operations/triggerRuns.js b/lib/services/datafactoryManagement/lib/operations/triggerRuns.js new file mode 100644 index 0000000000..ea3329e662 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/operations/triggerRuns.js @@ -0,0 +1,353 @@ +/* + * 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; + +/** + * Query trigger runs. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} filterParameters Parameters to filter the pipeline run. + * + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. + * + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. + * + * @param {array} [filterParameters.filters] List of filters. + * + * @param {array} [filterParameters.orderBy] List of OrderBy option. + * + * @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 TriggerRunsQueryResponse} 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 _queryByFactory(resourceGroupName, factoryName, filterParameters, 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 (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); + } + } + if (factoryName === null || factoryName === undefined || typeof factoryName.valueOf() !== 'string') { + throw new Error('factoryName cannot be null or undefined and it must be of type string.'); + } + if (factoryName !== null && factoryName !== undefined) { + if (factoryName.length > 63) + { + throw new Error('"factoryName" should satisfy the constraint - "MaxLength": 63'); + } + if (factoryName.length < 3) + { + throw new Error('"factoryName" should satisfy the constraint - "MinLength": 3'); + } + if (factoryName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) + { + throw new Error('"factoryName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); + } + } + 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 (filterParameters === null || filterParameters === undefined) { + throw new Error('filterParameters 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.DataFactory/factories/{factoryName}/queryTriggerRuns'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); + 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 (filterParameters !== null && filterParameters !== undefined) { + let requestModelMapper = new client.models['RunFilterParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, filterParameters, 'filterParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(filterParameters, 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['TriggerRunsQueryResponse']().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 TriggerRuns. */ +class TriggerRuns { + /** + * Create a TriggerRuns. + * @param {DataFactoryManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._queryByFactory = _queryByFactory; + } + + /** + * Query trigger runs. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} filterParameters Parameters to filter the pipeline run. + * + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. + * + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. + * + * @param {array} [filterParameters.filters] List of filters. + * + * @param {array} [filterParameters.orderBy] List of OrderBy option. + * + * @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. + */ + queryByFactoryWithHttpOperationResponse(resourceGroupName, factoryName, filterParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._queryByFactory(resourceGroupName, factoryName, filterParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Query trigger runs. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} filterParameters Parameters to filter the pipeline run. + * + * @param {string} [filterParameters.continuationToken] The continuation token + * for getting the next page of results. Null for first page. + * + * @param {date} filterParameters.lastUpdatedAfter The time at or after which + * the run event was updated in 'ISO 8601' format. + * + * @param {date} filterParameters.lastUpdatedBefore The time at or before which + * the run event was updated in 'ISO 8601' format. + * + * @param {array} [filterParameters.filters] List of filters. + * + * @param {array} [filterParameters.orderBy] List of OrderBy option. + * + * @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 {TriggerRunsQueryResponse} - 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 TriggerRunsQueryResponse} 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. + */ + queryByFactory(resourceGroupName, factoryName, filterParameters, 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._queryByFactory(resourceGroupName, factoryName, filterParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._queryByFactory(resourceGroupName, factoryName, filterParameters, options, optionalCallback); + } + } + +} + +module.exports = TriggerRuns; diff --git a/lib/services/datafactoryManagement/lib/operations/triggers.js b/lib/services/datafactoryManagement/lib/operations/triggers.js index 5a782f1ca1..d5797f0437 100644 --- a/lib/services/datafactoryManagement/lib/operations/triggers.js +++ b/lib/services/datafactoryManagement/lib/operations/triggers.js @@ -147,13 +147,12 @@ function _listByFactory(resourceGroupName, factoryName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -377,13 +376,12 @@ function _createOrUpdate(resourceGroupName, factoryName, triggerName, trigger, o try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -429,6 +427,10 @@ function _createOrUpdate(resourceGroupName, factoryName, triggerName, trigger, o * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the trigger entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -455,6 +457,7 @@ function _get(resourceGroupName, factoryName, triggerName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let ifNoneMatch = (options && options.ifNoneMatch !== undefined) ? options.ifNoneMatch : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -514,6 +517,9 @@ function _get(resourceGroupName, factoryName, triggerName, options, callback) { 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 (ifNoneMatch !== null && ifNoneMatch !== undefined && typeof ifNoneMatch.valueOf() !== 'string') { + throw new Error('ifNoneMatch 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.'); } @@ -544,6 +550,9 @@ function _get(resourceGroupName, factoryName, triggerName, options, callback) { if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } + if (ifNoneMatch !== undefined && ifNoneMatch !== null) { + httpRequest.headers['If-None-Match'] = ifNoneMatch; + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -561,7 +570,7 @@ function _get(resourceGroupName, factoryName, triggerName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 304) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -571,13 +580,12 @@ function _get(resourceGroupName, factoryName, triggerName, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -764,13 +772,12 @@ function _deleteMethod(resourceGroupName, factoryName, triggerName, options, cal try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -918,215 +925,6 @@ function _stop(resourceGroupName, factoryName, triggerName, options, callback) { }); } -/** - * List trigger runs. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} triggerName The trigger name. - * - * @param {date} startTime Start time for trigger runs. - * - * @param {date} endTime End time for trigger runs. - * - * @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 TriggerRunListResponse} 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 _listRuns(resourceGroupName, factoryName, triggerName, startTime, endTime, 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 (resourceGroupName !== null && resourceGroupName !== undefined) { - if (resourceGroupName.length > 90) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); - } - if (resourceGroupName.length < 1) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); - } - if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) - { - throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); - } - } - if (factoryName === null || factoryName === undefined || typeof factoryName.valueOf() !== 'string') { - throw new Error('factoryName cannot be null or undefined and it must be of type string.'); - } - if (factoryName !== null && factoryName !== undefined) { - if (factoryName.length > 63) - { - throw new Error('"factoryName" should satisfy the constraint - "MaxLength": 63'); - } - if (factoryName.length < 3) - { - throw new Error('"factoryName" should satisfy the constraint - "MinLength": 3'); - } - if (factoryName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) - { - throw new Error('"factoryName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); - } - } - 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 (triggerName !== null && triggerName !== undefined) { - if (triggerName.length > 260) - { - throw new Error('"triggerName" should satisfy the constraint - "MaxLength": 260'); - } - if (triggerName.length < 1) - { - throw new Error('"triggerName" should satisfy the constraint - "MinLength": 1'); - } - if (triggerName.match(/^[A-Za-z0-9_][^<>*#.%&:\\+?\/]*$/) === null) - { - throw new Error('"triggerName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9_][^<>*#.%&:\\+?\/]*$/'); - } - } - 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(!startTime || !(startTime instanceof Date || - (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { - throw new Error('startTime cannot be null or undefined and it must be of type date.'); - } - if(!endTime || !(endTime instanceof Date || - (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { - throw new Error('endTime cannot be null or undefined and it must be of type date.'); - } - 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.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerruns'; - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); - requestUrl = requestUrl.replace('{triggerName}', encodeURIComponent(triggerName)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); - queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); - queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().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['TriggerRunListResponse']().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); - }); -} - /** * Starts a trigger. * @@ -1279,13 +1077,12 @@ function _beginStart(resourceGroupName, factoryName, triggerName, options, callb try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1455,13 +1252,12 @@ function _beginStop(resourceGroupName, factoryName, triggerName, options, callba try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1566,13 +1362,12 @@ function _listByFactoryNext(nextPageLink, options, callback) { try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.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['ErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1607,135 +1402,6 @@ function _listByFactoryNext(nextPageLink, options, callback) { }); } -/** - * List trigger runs. - * - * @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 TriggerRunListResponse} 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 _listRunsNext(nextPageLink, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - // Validate - try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); - } - if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.client.acceptLanguage must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['ErrorResponse']().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['TriggerRunListResponse']().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 Triggers. */ class Triggers { /** @@ -1750,11 +1416,9 @@ class Triggers { this._deleteMethod = _deleteMethod; this._start = _start; this._stop = _stop; - this._listRuns = _listRuns; this._beginStart = _beginStart; this._beginStop = _beginStop; this._listByFactoryNext = _listByFactoryNext; - this._listRunsNext = _listRunsNext; } /** @@ -1968,6 +1632,10 @@ class Triggers { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the trigger entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2002,6 +1670,10 @@ class Triggers { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.ifNoneMatch] ETag of the trigger entity. Should + * only be specified for get. If the ETag matches the existing entity tag, or + * if * was provided, then no content will be returned. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2314,105 +1986,6 @@ class Triggers { } } - /** - * List trigger runs. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} triggerName The trigger name. - * - * @param {date} startTime Start time for trigger runs. - * - * @param {date} endTime End time for trigger runs. - * - * @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. - */ - listRunsWithHttpOperationResponse(resourceGroupName, factoryName, triggerName, startTime, endTime, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listRuns(resourceGroupName, factoryName, triggerName, startTime, endTime, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * List trigger runs. - * - * @param {string} resourceGroupName The resource group name. - * - * @param {string} factoryName The factory name. - * - * @param {string} triggerName The trigger name. - * - * @param {date} startTime Start time for trigger runs. - * - * @param {date} endTime End time for trigger runs. - * - * @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 {TriggerRunListResponse} - 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 TriggerRunListResponse} 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. - */ - listRuns(resourceGroupName, factoryName, triggerName, startTime, endTime, 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._listRuns(resourceGroupName, factoryName, triggerName, startTime, endTime, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._listRuns(resourceGroupName, factoryName, triggerName, startTime, endTime, options, optionalCallback); - } - } - /** * Starts a trigger. * @@ -2675,91 +2248,6 @@ class Triggers { } } - /** - * List trigger runs. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - listRunsNextWithHttpOperationResponse(nextPageLink, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listRunsNext(nextPageLink, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * List trigger runs. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {TriggerRunListResponse} - 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 TriggerRunListResponse} 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. - */ - listRunsNext(nextPageLink, options, optionalCallback) { - let client = this.client; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._listRunsNext(nextPageLink, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._listRunsNext(nextPageLink, options, optionalCallback); - } - } - } module.exports = Triggers; diff --git a/lib/services/datafactoryManagement/package.json b/lib/services/datafactoryManagement/package.json index befac77303..3de6e15545 100644 --- a/lib/services/datafactoryManagement/package.json +++ b/lib/services/datafactoryManagement/package.json @@ -7,7 +7,10 @@ "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" }, - "keywords": [ "node", "azure" ], + "keywords": [ + "node", + "azure" + ], "license": "MIT", "main": "./lib/dataFactoryManagementClient.js", "types": "./lib/dataFactoryManagementClient.d.ts",