From 85a47a39bfa240a4202f930b7b3abe3be469cb09 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 20 Apr 2018 10:15:02 -0700 Subject: [PATCH 01/13] =?UTF-8?q?[AutoPR=20datafactory/resource-manager]?= =?UTF-8?q?=20Change=20connection-string=20to=20be=20object=20and=20suppor?= =?UTF-8?q?t=20making=20severname,=20d=E2=80=A6=20(#2702)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Generated from 5a4a7d356b6a096b96e0e20a050c20d22ab32150 Change connection-string to be object and support making severname, databasename visible to customers * Generated from a3865a4230e1cd415b7970b09d82083432fc2b9f Update description --- .../datafactoryManagement/LICENSE.txt | 42 +++--- lib/services/datafactoryManagement/README.md | 75 +++++----- .../lib/models/azureMySqlLinkedService.js | 12 +- .../models/azurePostgreSqlLinkedService.js | 12 +- .../lib/models/azureSqlDWLinkedService.js | 13 +- .../models/azureSqlDatabaseLinkedService.js | 12 +- .../lib/models/azureStorageLinkedService.js | 12 +- .../lib/models/cosmosDbLinkedService.js | 12 +- .../lib/models/couchbaseLinkedService.js | 12 +- .../lib/models/drillLinkedService.js | 12 +- .../lib/models/executeSSISPackageActivity.js | 101 ++++++++++++- .../lib/models/greenplumLinkedService.js | 12 +- .../lib/models/index.d.ts | 139 ++++++++++++------ .../datafactoryManagement/lib/models/index.js | 2 + .../lib/models/mariaDBLinkedService.js | 12 +- .../lib/models/netezzaLinkedService.js | 12 +- .../lib/models/odbcLinkedService.js | 12 +- .../lib/models/oracleLinkedService.js | 12 +- .../lib/models/sSISExecutionParameter.js | 53 +++++++ .../lib/models/sSISPropertyOverride.js | 62 ++++++++ .../lib/models/sqlServerLinkedService.js | 12 +- .../lib/models/verticaLinkedService.js | 12 +- .../datafactoryManagement/package.json | 2 +- 23 files changed, 417 insertions(+), 240 deletions(-) create mode 100644 lib/services/datafactoryManagement/lib/models/sSISExecutionParameter.js create mode 100644 lib/services/datafactoryManagement/lib/models/sSISPropertyOverride.js 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/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/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/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/executeSSISPackageActivity.js b/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js index 7ca508a365..4c0f59bf91 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(); @@ -171,6 +181,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/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/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 849302301d..bc150597d5 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -1252,14 +1252,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 +1269,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; } @@ -1728,14 +1728,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 +2015,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 +2122,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 +2139,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 +2190,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 +2857,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 +2874,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; @@ -3076,14 +3076,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 +3093,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 +3214,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 +3277,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 +3292,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 +3305,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 +3316,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 +3328,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 +3344,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 +3358,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 +3368,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; } @@ -5644,6 +5645,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 +5697,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 +5720,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 }; } /** diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 83986bec0d..6f94a786b1 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -280,6 +280,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'); 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/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/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/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/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/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/package.json b/lib/services/datafactoryManagement/package.json index befac77303..f152cd8b68 100644 --- a/lib/services/datafactoryManagement/package.json +++ b/lib/services/datafactoryManagement/package.json @@ -4,7 +4,7 @@ "description": "DataFactoryManagementClient Library with typescript type definitions for node", "version": "2.0.0-preview", "dependencies": { - "ms-rest": "^2.3.3", + "ms-rest": "^2.3.2", "ms-rest-azure": "^2.5.5" }, "keywords": [ "node", "azure" ], From d97bfebe0ac8e5ff7b2bc58a7be2961fa02df52b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 12:59:09 -0700 Subject: [PATCH 02/13] [AutoPR datafactory/resource-manager] [DataFactory] blob events trigger (#2832) * Generated from ce3cce80a8ae6434caf934e7baa601ba36c41874 blob events trigger * Generated from 8f703fbbae01ca72cfc3d1025f774125c0cc3540 address review feedback * Generated from 764ab738e12c8a7d388ec9f216230f664a102681 address review feedback * Generated from af2af5124c1789a46dce1086f97b9e7a6e2b2928 address review feedback * Generated from 31a95abf24bd5a79c06d22c611e949e83d0d41c2 resolve blob path property issue --- .../lib/models/blobEventsTrigger.js | 137 ++++++++++++++++++ .../lib/models/db2LinkedService.js | 9 -- .../lib/models/index.d.ts | 67 ++++----- .../datafactoryManagement/lib/models/index.js | 2 + .../lib/models/mySqlLinkedService.js | 44 +----- .../lib/models/postgreSqlLinkedService.js | 44 +----- .../lib/models/teradataLinkedService.js | 9 -- .../datafactoryManagement/package.json | 7 +- 8 files changed, 183 insertions(+), 136 deletions(-) create mode 100644 lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js 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/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/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index bc150597d5..ca99c2edb4 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -2927,8 +2927,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 +2939,6 @@ export interface AzureMLLinkedService extends LinkedService { */ export interface TeradataLinkedService extends LinkedService { server: any; - schema?: any; authenticationType?: string; username?: any; password?: SecretBase; @@ -2958,8 +2955,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 +2968,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 +3012,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 +3029,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; } @@ -4349,6 +4319,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. diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 6f94a786b1..7fb9d05e28 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -207,6 +207,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'); @@ -498,6 +499,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, 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/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/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/package.json b/lib/services/datafactoryManagement/package.json index f152cd8b68..3de6e15545 100644 --- a/lib/services/datafactoryManagement/package.json +++ b/lib/services/datafactoryManagement/package.json @@ -4,10 +4,13 @@ "description": "DataFactoryManagementClient Library with typescript type definitions for node", "version": "2.0.0-preview", "dependencies": { - "ms-rest": "^2.3.2", + "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", From 4bbbe374796ad25fa49ff3c4449fede59af25129 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 22 May 2018 10:30:47 -0700 Subject: [PATCH 03/13] [AutoPR datafactory/resource-manager] add configure repo api swagger (#2731) * Generated from d7f5567289add61a8368ce9bf1a710264183366c add configure repo api swagger * Generated from 42b127de426d2e7e62893799af31cfac6a58b07d fixing autorest issue * Generated from 27d71a427c73a4adfd90f2347ba5c0a9e0403e7d change route * Generated from 2c233a59f11801e38916d47e13019b26ea4566ed fix per comments * Generated from fa5757e279b6732dedc799857b4b8cbaac22a663 change factoryId for factoryResourceId * Generated from 47d1905337fe73deee6e623add5eaafb62caf5d0 rename example * Generated from 47d1905337fe73deee6e623add5eaafb62caf5d0 rename example --- .../lib/models/factory.js | 17 + .../lib/models/factoryRepoUpdate.js | 79 ++++ .../lib/models/factoryVSTSConfiguration.js | 100 +++++ .../lib/models/index.d.ts | 58 +++ .../datafactoryManagement/lib/models/index.js | 2 + .../lib/operations/configureFactoryRepo.js | 362 ++++++++++++++++ .../lib/operations/configureRepo.js | 391 +++++++++++++++++ .../lib/operations/factories.js | 396 ++++++++++++++++++ .../lib/operations/index.d.ts | 159 +++++++ 9 files changed, 1564 insertions(+) create mode 100644 lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js create mode 100644 lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js create mode 100644 lib/services/datafactoryManagement/lib/operations/configureFactoryRepo.js create mode 100644 lib/services/datafactoryManagement/lib/operations/configureRepo.js diff --git a/lib/services/datafactoryManagement/lib/models/factory.js b/lib/services/datafactoryManagement/lib/models/factory.js index 744284edbd..1a45217901 100644 --- a/lib/services/datafactoryManagement/lib/models/factory.js +++ b/lib/services/datafactoryManagement/lib/models/factory.js @@ -28,6 +28,15 @@ 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} [vstsConfiguration] VSTS repo information of the factory. + * @member {string} [vstsConfiguration.accountName] VSTS account name. + * @member {string} [vstsConfiguration.projectName] VSTS project name. + * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. + * @member {string} [vstsConfiguration.collaborationBranch] VSTS + * collaboration branch. + * @member {string} [vstsConfiguration.rootFolder] VSTS root folder. + * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. + * @member {string} [vstsConfiguration.tenantId] VSTS tenant id. */ constructor() { super(); @@ -135,6 +144,14 @@ class Factory extends models['Resource'] { type: { name: 'String' } + }, + vstsConfiguration: { + required: false, + serializedName: 'properties.vstsConfiguration', + type: { + name: 'Composite', + className: 'FactoryVSTSConfiguration' + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js b/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js new file mode 100644 index 0000000000..5d1f8786b0 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Factory's VSTS repo information. + * + */ +class FactoryRepoUpdate { + /** + * Create a FactoryRepoUpdate. + * @member {string} [factoryResourceId] The factory resource id. + * @member {string} [resourceGroupName] The resource group name. + * @member {object} [vstsConfiguration] VSTS repo information of the factory. + * @member {string} [vstsConfiguration.accountName] VSTS account name. + * @member {string} [vstsConfiguration.projectName] VSTS project name. + * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. + * @member {string} [vstsConfiguration.collaborationBranch] VSTS + * collaboration branch. + * @member {string} [vstsConfiguration.rootFolder] VSTS root folder. + * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. + * @member {string} [vstsConfiguration.tenantId] VSTS tenant id. + */ + 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' + } + }, + resourceGroupName: { + required: false, + serializedName: 'resourceGroupName', + type: { + name: 'String' + } + }, + vstsConfiguration: { + required: false, + serializedName: 'vstsConfiguration', + type: { + name: 'Composite', + className: 'FactoryVSTSConfiguration' + } + } + } + } + }; + } +} + +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..b6267122e7 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js @@ -0,0 +1,100 @@ +/* + * 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 VSTS repo information. + * + */ +class FactoryVSTSConfiguration { + /** + * Create a FactoryVSTSConfiguration. + * @member {string} [accountName] VSTS account name. + * @member {string} [projectName] VSTS project name. + * @member {string} [repositoryName] VSTS repository name. + * @member {string} [collaborationBranch] VSTS collaboration branch. + * @member {string} [rootFolder] VSTS root folder. + * @member {string} [lastCommitId] VSTS last commit id. + * @member {string} [tenantId] VSTS tenant id. + */ + constructor() { + } + + /** + * Defines the metadata of FactoryVSTSConfiguration + * + * @returns {object} metadata of FactoryVSTSConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'FactoryVSTSConfiguration', + type: { + name: 'Composite', + className: 'FactoryVSTSConfiguration', + modelProperties: { + accountName: { + required: false, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + projectName: { + required: false, + serializedName: 'projectName', + type: { + name: 'String' + } + }, + repositoryName: { + required: false, + serializedName: 'repositoryName', + type: { + name: 'String' + } + }, + collaborationBranch: { + required: false, + serializedName: 'collaborationBranch', + type: { + name: 'String' + } + }, + rootFolder: { + required: false, + serializedName: 'rootFolder', + type: { + name: 'String' + } + }, + lastCommitId: { + required: false, + serializedName: 'lastCommitId', + type: { + name: 'String' + } + }, + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FactoryVSTSConfiguration; diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index ca99c2edb4..d03df4d3d4 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -140,6 +140,30 @@ export interface FactoryIdentity { readonly tenantId?: string; } +/** + * @class + * Initializes a new instance of the FactoryVSTSConfiguration class. + * @constructor + * Factory's VSTS repo information. + * + * @member {string} [accountName] VSTS account name. + * @member {string} [projectName] VSTS project name. + * @member {string} [repositoryName] VSTS repository name. + * @member {string} [collaborationBranch] VSTS collaboration branch. + * @member {string} [rootFolder] VSTS root folder. + * @member {string} [lastCommitId] VSTS last commit id. + * @member {string} [tenantId] VSTS tenant id. + */ +export interface FactoryVSTSConfiguration { + accountName?: string; + projectName?: string; + repositoryName?: string; + collaborationBranch?: string; + rootFolder?: string; + lastCommitId?: string; + tenantId?: string; +} + /** * @class * Initializes a new instance of the Factory class. @@ -153,12 +177,22 @@ export interface FactoryIdentity { * Succeeded. * @member {date} [createTime] Time the factory was created in ISO8601 format. * @member {string} [version] Version of the factory. + * @member {object} [vstsConfiguration] VSTS repo information of the factory. + * @member {string} [vstsConfiguration.accountName] VSTS account name. + * @member {string} [vstsConfiguration.projectName] VSTS project name. + * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. + * @member {string} [vstsConfiguration.collaborationBranch] VSTS collaboration + * branch. + * @member {string} [vstsConfiguration.rootFolder] VSTS root folder. + * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. + * @member {string} [vstsConfiguration.tenantId] VSTS tenant id. */ export interface Factory extends Resource { identity?: FactoryIdentity; readonly provisioningState?: string; readonly createTime?: Date; readonly version?: string; + vstsConfiguration?: FactoryVSTSConfiguration; /** * @property Describes unknown properties. The value of an unknown property * can be of "any" type. @@ -574,6 +608,30 @@ export interface ErrorResponse { details?: ErrorResponse[]; } +/** + * @class + * Initializes a new instance of the FactoryRepoUpdate class. + * @constructor + * Factory's VSTS repo information. + * + * @member {string} [factoryResourceId] The factory resource id. + * @member {string} [resourceGroupName] The resource group name. + * @member {object} [vstsConfiguration] VSTS repo information of the factory. + * @member {string} [vstsConfiguration.accountName] VSTS account name. + * @member {string} [vstsConfiguration.projectName] VSTS project name. + * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. + * @member {string} [vstsConfiguration.collaborationBranch] VSTS collaboration + * branch. + * @member {string} [vstsConfiguration.rootFolder] VSTS root folder. + * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. + * @member {string} [vstsConfiguration.tenantId] VSTS tenant id. + */ +export interface FactoryRepoUpdate { + factoryResourceId?: string; + resourceGroupName?: string; + vstsConfiguration?: FactoryVSTSConfiguration; +} + /** * @class * Initializes a new instance of the PipelineReference class. diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 7fb9d05e28..882ff4944f 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.FactoryVSTSConfiguration = require('./factoryVSTSConfiguration'); exports.Factory = require('./factory'); exports.IntegrationRuntime = require('./integrationRuntime'); exports.IntegrationRuntimeResource = require('./integrationRuntimeResource'); @@ -47,6 +48,7 @@ exports.Trigger = require('./trigger'); exports.TriggerResource = require('./triggerResource'); exports.CreateRunResponse = require('./createRunResponse'); exports.ErrorResponse = require('./errorResponse'); +exports.FactoryRepoUpdate = require('./factoryRepoUpdate'); exports.PipelineReference = require('./pipelineReference'); exports.TriggerPipelineReference = require('./triggerPipelineReference'); exports.FactoryUpdateParameters = require('./factoryUpdateParameters'); diff --git a/lib/services/datafactoryManagement/lib/operations/configureFactoryRepo.js b/lib/services/datafactoryManagement/lib/operations/configureFactoryRepo.js new file mode 100644 index 0000000000..b1c9b4da83 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/operations/configureFactoryRepo.js @@ -0,0 +1,362 @@ +/* + * 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; + +/** + * Updates a factory's repo information. + * + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryId] The factory id. + * + * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link 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 _update(locationId, factoryRepoUpdate, 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 (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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{locationId}', encodeURIComponent(locationId)); + 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 (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) { + 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['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); + }); +} + +/** Class representing a ConfigureFactoryRepo. */ +class ConfigureFactoryRepo { + /** + * Create a ConfigureFactoryRepo. + * @param {DataFactoryManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._update = _update; + } + + /** + * Updates a factory's repo information. + * + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryId] The factory id. + * + * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(locationId, factoryRepoUpdate, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(locationId, factoryRepoUpdate, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates a factory's repo information. + * + * @param {string} locationId The location identifier. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryId] The factory id. + * + * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Factory} - 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 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. + */ + update(locationId, factoryRepoUpdate, 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._update(locationId, factoryRepoUpdate, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(locationId, factoryRepoUpdate, options, optionalCallback); + } + } + +} + +module.exports = ConfigureFactoryRepo; diff --git a/lib/services/datafactoryManagement/lib/operations/configureRepo.js b/lib/services/datafactoryManagement/lib/operations/configureRepo.js new file mode 100644 index 0000000000..0a441b377e --- /dev/null +++ b/lib/services/datafactoryManagement/lib/operations/configureRepo.js @@ -0,0 +1,391 @@ +/* + * 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; + +/** + * Updates a factory's repo information. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryId] The factory id. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link 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 _update(resourceGroupName, factoryName, factoryRepoUpdate, 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 (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.'); + } + } 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}/configureRepo'; + 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 (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) { + 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['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); + }); +} + +/** Class representing a ConfigureRepo. */ +class ConfigureRepo { + /** + * Create a ConfigureRepo. + * @param {DataFactoryManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._update = _update; + } + + /** + * Updates a factory's repo information. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryId] The factory id. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, factoryName, factoryRepoUpdate, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, factoryName, factoryRepoUpdate, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates a factory's repo information. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {object} factoryRepoUpdate Update factory repo request definition. + * + * @param {string} [factoryRepoUpdate.factoryId] The factory id. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Factory} - 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 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. + */ + update(resourceGroupName, factoryName, factoryRepoUpdate, 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._update(resourceGroupName, factoryName, factoryRepoUpdate, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, factoryName, factoryRepoUpdate, options, optionalCallback); + } + } + +} + +module.exports = ConfigureRepo; diff --git a/lib/services/datafactoryManagement/lib/operations/factories.js b/lib/services/datafactoryManagement/lib/operations/factories.js index 89e120e913..ae06a221cb 100644 --- a/lib/services/datafactoryManagement/lib/operations/factories.js +++ b/lib/services/datafactoryManagement/lib/operations/factories.js @@ -148,6 +148,195 @@ function _list(options, callback) { }); } +/** + * 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 {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link 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 _configureFactoryRepo(locationId, factoryRepoUpdate, 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 (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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{locationId}', encodeURIComponent(locationId)); + 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 (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) { + 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['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); + }); +} + /** * Lists factories. * @@ -313,6 +502,26 @@ function _listByResourceGroup(resourceGroupName, options, callback) { * * @param {object} [factory.identity] Managed service identity of the factory. * + * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * factory. + * + * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * + * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * + * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository + * name. + * + * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS + * collaboration branch. + * + * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * + * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit + * id. + * + * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * * @param {string} [factory.location] The resource location. * * @param {object} [factory.tags] The resource tags. @@ -1465,6 +1674,7 @@ class Factories { constructor(client) { this.client = client; this._list = _list; + this._configureFactoryRepo = _configureFactoryRepo; this._listByResourceGroup = _listByResourceGroup; this._createOrUpdate = _createOrUpdate; this._update = _update; @@ -1553,6 +1763,152 @@ class Factories { } } + /** + * 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 {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + configureFactoryRepoWithHttpOperationResponse(locationId, factoryRepoUpdate, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._configureFactoryRepo(locationId, factoryRepoUpdate, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * 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 {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Factory} - 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 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. + */ + configureFactoryRepo(locationId, factoryRepoUpdate, 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._configureFactoryRepo(locationId, factoryRepoUpdate, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._configureFactoryRepo(locationId, factoryRepoUpdate, options, optionalCallback); + } + } + /** * Lists factories. * @@ -1646,6 +2002,26 @@ class Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * + * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * factory. + * + * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * + * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * + * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository + * name. + * + * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS + * collaboration branch. + * + * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * + * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit + * id. + * + * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * * @param {string} [factory.location] The resource location. * * @param {object} [factory.tags] The resource tags. @@ -1686,6 +2062,26 @@ class Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * + * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * factory. + * + * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * + * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * + * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository + * name. + * + * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS + * collaboration branch. + * + * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * + * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit + * id. + * + * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * * @param {string} [factory.location] The resource location. * * @param {object} [factory.tags] The resource tags. diff --git a/lib/services/datafactoryManagement/lib/operations/index.d.ts b/lib/services/datafactoryManagement/lib/operations/index.d.ts index 3a65b8a064..c8ff35b73d 100644 --- a/lib/services/datafactoryManagement/lib/operations/index.d.ts +++ b/lib/services/datafactoryManagement/lib/operations/index.d.ts @@ -132,6 +132,125 @@ 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 {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|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 {string} [factoryRepoUpdate.resourceGroupName] The resource group + * name. + * + * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * of the factory. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS + * account name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS + * project name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS + * repository name. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] + * VSTS collaboration branch. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root + * folder. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * commit id. + * + * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant + * id. + * + * @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,6 +317,26 @@ export interface Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * + * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * factory. + * + * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * + * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * + * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository + * name. + * + * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS + * collaboration branch. + * + * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * + * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit + * id. + * + * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * * @param {string} [factory.location] The resource location. * * @param {object} [factory.tags] The resource tags. @@ -226,6 +365,26 @@ export interface Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * + * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * factory. + * + * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * + * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * + * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository + * name. + * + * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS + * collaboration branch. + * + * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * + * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit + * id. + * + * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * * @param {string} [factory.location] The resource location. * * @param {object} [factory.tags] The resource tags. From 3b9cf23053d7f6ea372b2005474ec1cde90aa8a0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 8 Jun 2018 11:27:45 -0700 Subject: [PATCH 04/13] [AutoPR datafactory/resource-manager] [Data Factory]Add schema mapping for hierarchical data (#2762) * Generated from 219315700287d09055dec44446b34f261d15d2c1 Add schema mapping for hierarchical data * Generated from a3c2bff7ee233f1de44032b1fccc27450874c77f Add example for column mapping * Generated from efe8a46867a169c9cd530d4562c56c5c3dba4da8 Merge remote-tracking branch 'upstream/master' --- .../lib/models/index.d.ts | 25 ++++++++++---- .../lib/models/quickBooksLinkedService.js | 33 ++++++++++++++++--- .../lib/models/serviceNowLinkedService.js | 2 +- .../lib/models/tabularTranslator.js | 16 +++++++-- 4 files changed, 62 insertions(+), 14 deletions(-) diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index d03df4d3d4..12fbc21e44 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -1537,7 +1537,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 @@ -1582,10 +1582,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 @@ -1597,8 +1600,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; } @@ -6030,11 +6035,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; } /** 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/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/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' + } } } } From 7da878a920adf9cd337080b8e80c16c71b19c3b5 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 15 Jun 2018 11:22:39 -0700 Subject: [PATCH 05/13] Generated from 932f3adb13821639c173dc647dd024875372238a (#3000) Remove maximum maxParallelExecutionsPerNode validation --- .../lib/models/integrationRuntimeComputeProperties.js | 1 - 1 file changed, 1 deletion(-) 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: { From 13d07ccb9c56cdc18c97a4bf8ef737344d827e28 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 2 Jul 2018 11:52:09 -0700 Subject: [PATCH 06/13] Generated from 8393549a4c4950496639ed890fb994a16ed1613b (#3094) Updating default ADF package tag to GA --- .../lib/dataFactoryManagementClient.d.ts | 1 + .../lib/dataFactoryManagementClient.js | 3 +- .../lib/models/activity.js | 15 + .../lib/models/activityRunsQueryResponse.js | 83 ++ .../models/azureMLBatchExecutionActivity.js | 14 + .../models/azureMLUpdateResourceActivity.js | 14 + .../lib/models/controlActivity.js | 14 + .../lib/models/copyActivity.js | 24 +- .../lib/models/customActivity.js | 14 + .../models/dataLakeAnalyticsUSQLActivity.js | 14 + .../lib/models/databricksNotebookActivity.js | 14 + .../lib/models/executePipelineActivity.js | 14 + .../lib/models/executeSSISPackageActivity.js | 14 + .../lib/models/executionActivity.js | 14 + .../lib/models/factory.js | 36 +- .../lib/models/factoryGitHubConfiguration.js | 105 +++ .../lib/models/factoryRepoConfiguration.js | 98 +++ .../lib/models/factoryRepoUpdate.js | 38 +- .../lib/models/factoryVSTSConfiguration.js | 48 +- .../lib/models/filterActivity.js | 14 + .../lib/models/forEachActivity.js | 14 + .../lib/models/getMetadataActivity.js | 14 + .../lib/models/hDInsightHiveActivity.js | 14 + .../lib/models/hDInsightMapReduceActivity.js | 14 + .../lib/models/hDInsightPigActivity.js | 14 + .../lib/models/hDInsightSparkActivity.js | 14 + .../lib/models/hDInsightStreamingActivity.js | 14 + .../lib/models/ifConditionActivity.js | 14 + .../lib/models/index.d.ts | 363 ++++----- .../datafactoryManagement/lib/models/index.js | 31 +- .../lib/models/lookupActivity.js | 14 + .../lib/models/operationListResponse.js | 10 +- .../lib/models/operationMetricDimension.js | 69 ++ .../models/operationMetricSpecification.js | 16 + .../lib/models/pipelineRun.js | 2 + .../lib/models/pipelineRunInvokedBy.js | 10 + .../lib/models/pipelineRunsQueryResponse.js | 83 ++ .../lib/models/resource.js | 9 + .../lib/models/runFilterParameters.js | 105 +++ .../lib/models/runQueryFilter.js | 83 ++ .../lib/models/runQueryOrderBy.js | 67 ++ .../models/selfHostedIntegrationRuntime.js | 15 - .../selfHostedIntegrationRuntimeStatus.js | 28 +- .../sqlServerStoredProcedureActivity.js | 14 + .../lib/models/triggerRunsQueryResponse.js | 83 ++ .../lib/models/untilActivity.js | 14 + .../lib/models/waitActivity.js | 14 + .../lib/models/webActivity.js | 14 + .../lib/operations/activityRuns.js | 359 ++------- .../lib/operations/datasets.js | 66 +- .../lib/operations/factories.js | 520 ++++--------- .../lib/operations/index.d.ts | 712 ++++++++---------- .../lib/operations/index.js | 1 + .../lib/operations/integrationRuntimeNodes.js | 27 +- .../lib/operations/integrationRuntimes.js | 467 +++--------- .../lib/operations/linkedServices.js | 66 +- .../lib/operations/operations.js | 221 +++++- .../lib/operations/pipelineRuns.js | 295 +++++++- .../lib/operations/pipelines.js | 107 ++- .../lib/operations/triggerRuns.js | 353 +++++++++ .../lib/operations/triggers.js | 608 ++------------- 61 files changed, 3102 insertions(+), 2447 deletions(-) create mode 100644 lib/services/datafactoryManagement/lib/models/activityRunsQueryResponse.js create mode 100644 lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js create mode 100644 lib/services/datafactoryManagement/lib/models/factoryRepoConfiguration.js create mode 100644 lib/services/datafactoryManagement/lib/models/operationMetricDimension.js create mode 100644 lib/services/datafactoryManagement/lib/models/pipelineRunsQueryResponse.js create mode 100644 lib/services/datafactoryManagement/lib/models/runFilterParameters.js create mode 100644 lib/services/datafactoryManagement/lib/models/runQueryFilter.js create mode 100644 lib/services/datafactoryManagement/lib/models/runQueryOrderBy.js create mode 100644 lib/services/datafactoryManagement/lib/models/triggerRunsQueryResponse.js create mode 100644 lib/services/datafactoryManagement/lib/operations/triggerRuns.js 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/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/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/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 4c0f59bf91..253142ffa7 100644 --- a/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js @@ -108,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', 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 1a45217901..42151c6f38 100644 --- a/lib/services/datafactoryManagement/lib/models/factory.js +++ b/lib/services/datafactoryManagement/lib/models/factory.js @@ -28,15 +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} [vstsConfiguration] VSTS repo information of the factory. - * @member {string} [vstsConfiguration.accountName] VSTS account name. - * @member {string} [vstsConfiguration.projectName] VSTS project name. - * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. - * @member {string} [vstsConfiguration.collaborationBranch] VSTS - * collaboration branch. - * @member {string} [vstsConfiguration.rootFolder] VSTS root folder. - * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. - * @member {string} [vstsConfiguration.tenantId] VSTS tenant 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() { super(); @@ -113,6 +112,14 @@ class Factory extends models['Resource'] { } } }, + eTag: { + required: false, + readOnly: true, + serializedName: 'eTag', + type: { + name: 'String' + } + }, identity: { required: false, serializedName: 'identity', @@ -145,12 +152,17 @@ class Factory extends models['Resource'] { name: 'String' } }, - vstsConfiguration: { + repoConfiguration: { required: false, - serializedName: 'properties.vstsConfiguration', + serializedName: 'properties.repoConfiguration', type: { name: 'Composite', - className: 'FactoryVSTSConfiguration' + 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 index 5d1f8786b0..07344d1733 100644 --- a/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js +++ b/lib/services/datafactoryManagement/lib/models/factoryRepoUpdate.js @@ -13,23 +13,21 @@ const models = require('./index'); /** - * Factory's VSTS repo information. + * Factory's git repo information. * */ class FactoryRepoUpdate { /** * Create a FactoryRepoUpdate. * @member {string} [factoryResourceId] The factory resource id. - * @member {string} [resourceGroupName] The resource group name. - * @member {object} [vstsConfiguration] VSTS repo information of the factory. - * @member {string} [vstsConfiguration.accountName] VSTS account name. - * @member {string} [vstsConfiguration.projectName] VSTS project name. - * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. - * @member {string} [vstsConfiguration.collaborationBranch] VSTS - * collaboration branch. - * @member {string} [vstsConfiguration.rootFolder] VSTS root folder. - * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. - * @member {string} [vstsConfiguration.tenantId] VSTS tenant 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() { } @@ -55,19 +53,17 @@ class FactoryRepoUpdate { name: 'String' } }, - resourceGroupName: { + repoConfiguration: { required: false, - serializedName: 'resourceGroupName', - type: { - name: 'String' - } - }, - vstsConfiguration: { - required: false, - serializedName: 'vstsConfiguration', + serializedName: 'repoConfiguration', type: { name: 'Composite', - className: 'FactoryVSTSConfiguration' + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'FactoryRepoConfiguration', + className: 'FactoryRepoConfiguration' } } } diff --git a/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js b/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js index b6267122e7..df68d3d378 100644 --- a/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js +++ b/lib/services/datafactoryManagement/lib/models/factoryVSTSConfiguration.js @@ -10,22 +10,21 @@ 'use strict'; +const models = require('./index'); + /** * Factory's VSTS repo information. * + * @extends models['FactoryRepoConfiguration'] */ -class FactoryVSTSConfiguration { +class FactoryVSTSConfiguration extends models['FactoryRepoConfiguration'] { /** * Create a FactoryVSTSConfiguration. - * @member {string} [accountName] VSTS account name. - * @member {string} [projectName] VSTS project name. - * @member {string} [repositoryName] VSTS repository name. - * @member {string} [collaborationBranch] VSTS collaboration branch. - * @member {string} [rootFolder] VSTS root folder. - * @member {string} [lastCommitId] VSTS last commit id. + * @member {string} projectName VSTS project name. * @member {string} [tenantId] VSTS tenant id. */ constructor() { + super(); } /** @@ -40,38 +39,36 @@ class FactoryVSTSConfiguration { serializedName: 'FactoryVSTSConfiguration', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'FactoryRepoConfiguration', className: 'FactoryVSTSConfiguration', modelProperties: { accountName: { - required: false, + required: true, serializedName: 'accountName', type: { name: 'String' } }, - projectName: { - required: false, - serializedName: 'projectName', - type: { - name: 'String' - } - }, repositoryName: { - required: false, + required: true, serializedName: 'repositoryName', type: { name: 'String' } }, collaborationBranch: { - required: false, + required: true, serializedName: 'collaborationBranch', type: { name: 'String' } }, rootFolder: { - required: false, + required: true, serializedName: 'rootFolder', type: { name: 'String' @@ -84,6 +81,21 @@ class FactoryVSTSConfiguration { 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', 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/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 12fbc21e44..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; } /** @@ -142,26 +144,24 @@ export interface FactoryIdentity { /** * @class - * Initializes a new instance of the FactoryVSTSConfiguration class. + * Initializes a new instance of the FactoryRepoConfiguration class. * @constructor - * Factory's VSTS repo information. + * Factory's git repo information. * - * @member {string} [accountName] VSTS account name. - * @member {string} [projectName] VSTS project name. - * @member {string} [repositoryName] VSTS repository name. - * @member {string} [collaborationBranch] VSTS collaboration branch. - * @member {string} [rootFolder] VSTS root folder. - * @member {string} [lastCommitId] VSTS last commit id. - * @member {string} [tenantId] VSTS tenant id. + * @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 FactoryVSTSConfiguration { - accountName?: string; - projectName?: string; - repositoryName?: string; - collaborationBranch?: string; - rootFolder?: string; +export interface FactoryRepoConfiguration { + accountName: string; + repositoryName: string; + collaborationBranch: string; + rootFolder: string; lastCommitId?: string; - tenantId?: string; + type: string; } /** @@ -177,22 +177,21 @@ export interface FactoryVSTSConfiguration { * Succeeded. * @member {date} [createTime] Time the factory was created in ISO8601 format. * @member {string} [version] Version of the factory. - * @member {object} [vstsConfiguration] VSTS repo information of the factory. - * @member {string} [vstsConfiguration.accountName] VSTS account name. - * @member {string} [vstsConfiguration.projectName] VSTS project name. - * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. - * @member {string} [vstsConfiguration.collaborationBranch] VSTS collaboration + * @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} [vstsConfiguration.rootFolder] VSTS root folder. - * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. - * @member {string} [vstsConfiguration.tenantId] VSTS tenant id. + * @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; - vstsConfiguration?: FactoryVSTSConfiguration; + repoConfiguration?: FactoryRepoConfiguration; /** * @property Describes unknown properties. The value of an unknown property * can be of "any" type. @@ -495,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 @@ -591,45 +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 VSTS repo information. + * Factory's git repo information. * * @member {string} [factoryResourceId] The factory resource id. - * @member {string} [resourceGroupName] The resource group name. - * @member {object} [vstsConfiguration] VSTS repo information of the factory. - * @member {string} [vstsConfiguration.accountName] VSTS account name. - * @member {string} [vstsConfiguration.projectName] VSTS project name. - * @member {string} [vstsConfiguration.repositoryName] VSTS repository name. - * @member {string} [vstsConfiguration.collaborationBranch] VSTS collaboration + * @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} [vstsConfiguration.rootFolder] VSTS root folder. - * @member {string} [vstsConfiguration.lastCommitId] VSTS last commit id. - * @member {string} [vstsConfiguration.tenantId] VSTS tenant id. + * @member {string} [repoConfiguration.rootFolder] Root folder. + * @member {string} [repoConfiguration.lastCommitId] Last commit id. + * @member {string} [repoConfiguration.type] Polymorphic Discriminator */ export interface FactoryRepoUpdate { factoryResourceId?: string; - resourceGroupName?: string; - vstsConfiguration?: FactoryVSTSConfiguration; + repoConfiguration?: FactoryRepoConfiguration; } /** @@ -694,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[]; @@ -712,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[]; } /** @@ -757,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; } /** @@ -777,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 @@ -806,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. * @@ -814,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; } @@ -862,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. @@ -896,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. @@ -947,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. @@ -964,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; @@ -975,6 +1044,7 @@ export interface OperationMetricSpecification { sourceMdmAccount?: string; sourceMdmNamespace?: string; availabilities?: OperationMetricAvailability[]; + dimensions?: OperationMetricDimension[]; } /** @@ -1021,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. @@ -6400,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). @@ -6426,7 +6480,7 @@ export interface CopyActivity extends ExecutionActivity { enableStaging?: any; stagingSettings?: StagingSettings; parallelCopies?: any; - cloudDataMovementUnits?: any; + dataIntegrationUnits?: any; enableSkipIncompatibleRow?: any; redirectIncompatibleRowSettings?: RedirectIncompatibleRowSettings; inputs?: DatasetReference[]; @@ -6561,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. @@ -6677,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; @@ -6693,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; } /** @@ -6799,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; } /** @@ -7125,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. @@ -7206,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. @@ -7271,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. @@ -7296,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 882ff4944f..3b376c98a4 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -26,7 +26,7 @@ exports.SecureString = require('./secureString'); exports.LinkedServiceReference = require('./linkedServiceReference'); exports.AzureKeyVaultSecretReference = require('./azureKeyVaultSecretReference'); exports.FactoryIdentity = require('./factoryIdentity'); -exports.FactoryVSTSConfiguration = require('./factoryVSTSConfiguration'); +exports.FactoryRepoConfiguration = require('./factoryRepoConfiguration'); exports.Factory = require('./factory'); exports.IntegrationRuntime = require('./integrationRuntime'); exports.IntegrationRuntimeResource = require('./integrationRuntimeResource'); @@ -47,27 +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'); @@ -320,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'); @@ -340,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, @@ -599,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/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/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/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/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/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/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/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/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/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 ae06a221cb..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) { @@ -158,32 +157,25 @@ function _list(options, callback) { * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource * id. * - * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group - * name. - * - * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information * of the factory. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS - * account name. - * - * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS - * project name. + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS - * repository name. + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] - * VSTS collaboration branch. + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root - * folder. + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last * commit id. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant - * id. + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -296,13 +288,12 @@ function _configureFactoryRepo(locationId, factoryRepoUpdate, 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) { @@ -450,13 +441,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) { @@ -502,25 +492,21 @@ function _listByResourceGroup(resourceGroupName, options, callback) { * * @param {object} [factory.identity] Managed service identity of the factory. * - * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. * - * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository - * name. - * - * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS - * collaboration branch. + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. * - * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * @param {string} factory.repoConfiguration.rootFolder Root folder. * - * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit - * id. + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. * - * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator * * @param {string} [factory.location] The resource location. * @@ -528,6 +514,10 @@ function _listByResourceGroup(resourceGroupName, options, callback) { * * @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 * @@ -554,6 +544,7 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb if (!callback) { throw new Error('callback cannot be null.'); } + let ifMatch = (options && options.ifMatch !== undefined) ? options.ifMatch : undefined; if (factory === null || factory === undefined) { factory = {}; @@ -603,6 +594,9 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb 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.'); } @@ -632,6 +626,9 @@ function _createOrUpdate(resourceGroupName, factoryName, factory, options, callb 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; } @@ -673,13 +670,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) { @@ -876,13 +872,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) { @@ -926,6 +921,10 @@ function _update(resourceGroupName, factoryName, factoryUpdateParameters, option * * @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 * @@ -952,6 +951,7 @@ function _get(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') { @@ -994,6 +994,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 (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.'); } @@ -1023,6 +1026,9 @@ function _get(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; } @@ -1040,7 +1046,7 @@ function _get(resourceGroupName, factoryName, 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); @@ -1050,13 +1056,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) { @@ -1223,175 +1228,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(); - 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); - }); -} - -/** - * 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 _cancelPipelineRun(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}/cancelpipelinerun/{runId}'; - 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) { - 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(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -1496,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) { @@ -1624,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) { @@ -1680,7 +1520,6 @@ class Factories { this._update = _update; this._get = _get; this._deleteMethod = _deleteMethod; - this._cancelPipelineRun = _cancelPipelineRun; this._listNext = _listNext; this._listByResourceGroupNext = _listByResourceGroupNext; } @@ -1773,32 +1612,25 @@ class Factories { * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource * id. * - * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group - * name. - * - * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information * of the factory. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS - * account name. - * - * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS - * project name. + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS - * repository name. + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] - * VSTS collaboration branch. + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root - * folder. + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last * commit id. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant - * id. + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -1835,32 +1667,25 @@ class Factories { * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource * id. * - * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group - * name. - * - * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information * of the factory. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS - * account name. - * - * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS - * project name. + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS - * repository name. + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] - * VSTS collaboration branch. + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root - * folder. + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last * commit id. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant - * id. + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -2002,25 +1827,21 @@ class Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * - * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. * - * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository - * name. - * - * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS - * collaboration branch. + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. * - * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * @param {string} factory.repoConfiguration.rootFolder Root folder. * - * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit - * id. + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. * - * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator * * @param {string} [factory.location] The resource location. * @@ -2028,6 +1849,10 @@ class Factories { * * @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 * @@ -2062,25 +1887,21 @@ class Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * - * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. * - * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository - * name. - * - * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS - * collaboration branch. + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. * - * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * @param {string} factory.repoConfiguration.rootFolder Root folder. * - * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit - * id. + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. * - * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator * * @param {string} [factory.location] The resource location. * @@ -2088,6 +1909,10 @@ class Factories { * * @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 * @@ -2244,6 +2069,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 * @@ -2276,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 * @@ -2406,95 +2239,6 @@ class Factories { } } - /** - * 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. - */ - cancelPipelineRunWithHttpOperationResponse(resourceGroupName, factoryName, runId, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._cancelPipelineRun(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. - */ - cancelPipelineRun(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._cancelPipelineRun(resourceGroupName, factoryName, runId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._cancelPipelineRun(resourceGroupName, factoryName, runId, options, optionalCallback); - } - } - /** * Lists factories under the specified subscription. * diff --git a/lib/services/datafactoryManagement/lib/operations/index.d.ts b/lib/services/datafactoryManagement/lib/operations/index.d.ts index c8ff35b73d..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; } /** @@ -142,32 +199,25 @@ export interface Factories { * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource * id. * - * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group - * name. - * - * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information * of the factory. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS - * account name. - * - * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS - * project name. + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS - * repository name. + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] - * VSTS collaboration branch. + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root - * folder. + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last * commit id. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant - * id. + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -192,32 +242,25 @@ export interface Factories { * @param {string} [factoryRepoUpdate.factoryResourceId] The factory resource * id. * - * @param {string} [factoryRepoUpdate.resourceGroupName] The resource group - * name. - * - * @param {object} [factoryRepoUpdate.vstsConfiguration] VSTS repo information + * @param {object} [factoryRepoUpdate.repoConfiguration] Git repo information * of the factory. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.accountName] VSTS - * account name. - * - * @param {string} [factoryRepoUpdate.vstsConfiguration.projectName] VSTS - * project name. + * @param {string} factoryRepoUpdate.repoConfiguration.accountName Account + * name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.repositoryName] VSTS - * repository name. + * @param {string} factoryRepoUpdate.repoConfiguration.repositoryName + * Rrepository name. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.collaborationBranch] - * VSTS collaboration branch. + * @param {string} factoryRepoUpdate.repoConfiguration.collaborationBranch + * Collaboration branch. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.rootFolder] VSTS root - * folder. + * @param {string} factoryRepoUpdate.repoConfiguration.rootFolder Root folder. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.lastCommitId] VSTS last + * @param {string} [factoryRepoUpdate.repoConfiguration.lastCommitId] Last * commit id. * - * @param {string} [factoryRepoUpdate.vstsConfiguration.tenantId] VSTS tenant - * id. + * @param {string} factoryRepoUpdate.repoConfiguration.type Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * @@ -317,25 +360,21 @@ export interface Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * - * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. - * - * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository - * name. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. * - * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS - * collaboration branch. + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. * - * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * @param {string} factory.repoConfiguration.rootFolder Root folder. * - * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit - * id. + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. * - * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator * * @param {string} [factory.location] The resource location. * @@ -343,6 +382,10 @@ export interface Factories { * * @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 * @@ -352,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. @@ -365,25 +408,21 @@ export interface Factories { * * @param {object} [factory.identity] Managed service identity of the factory. * - * @param {object} [factory.vstsConfiguration] VSTS repo information of the + * @param {object} [factory.repoConfiguration] Git repo information of the * factory. * - * @param {string} [factory.vstsConfiguration.accountName] VSTS account name. + * @param {string} factory.repoConfiguration.accountName Account name. * - * @param {string} [factory.vstsConfiguration.projectName] VSTS project name. + * @param {string} factory.repoConfiguration.repositoryName Rrepository name. * - * @param {string} [factory.vstsConfiguration.repositoryName] VSTS repository - * name. - * - * @param {string} [factory.vstsConfiguration.collaborationBranch] VSTS - * collaboration branch. + * @param {string} factory.repoConfiguration.collaborationBranch Collaboration + * branch. * - * @param {string} [factory.vstsConfiguration.rootFolder] VSTS root folder. + * @param {string} factory.repoConfiguration.rootFolder Root folder. * - * @param {string} [factory.vstsConfiguration.lastCommitId] VSTS last commit - * id. + * @param {string} [factory.repoConfiguration.lastCommitId] Last commit id. * - * @param {string} [factory.vstsConfiguration.tenantId] VSTS tenant id. + * @param {string} factory.repoConfiguration.type Polymorphic Discriminator * * @param {string} [factory.location] The resource location. * @@ -391,6 +430,10 @@ export interface Factories { * * @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 * @@ -416,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; /** @@ -505,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 * @@ -514,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. @@ -525,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 * @@ -550,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; /** @@ -613,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. * @@ -961,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 * @@ -970,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. @@ -983,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 * @@ -1009,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; /** @@ -1042,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. @@ -1081,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. * @@ -1089,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; /** @@ -1562,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 @@ -2442,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 * @@ -2451,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. @@ -2464,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 * @@ -2489,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; /** @@ -2816,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 * @@ -2825,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. @@ -2838,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 * @@ -2863,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; /** @@ -3171,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 * @@ -3180,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. @@ -3193,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 * @@ -3218,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; /** @@ -3296,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 @@ -3307,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. @@ -3320,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 @@ -3347,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; /** @@ -3431,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. * @@ -3447,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. @@ -3466,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. * @@ -3487,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. * @@ -3495,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; /** @@ -3569,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. * @@ -3589,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. * @@ -3621,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 * @@ -3643,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. * @@ -3651,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. * @@ -3677,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. * @@ -3701,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. * @@ -3709,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; } /** @@ -3888,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 * @@ -3897,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. @@ -3910,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 * @@ -3935,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; /** @@ -4126,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. * @@ -4377,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. * @@ -4392,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. * @@ -4416,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. * @@ -4424,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; From adddec1058915232ce4c4172f6c8407217496d07 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 10 Jul 2018 06:53:22 -0700 Subject: [PATCH 07/13] [AutoPR datafactory/resource-manager] [ADF v2]Add integration runtime sharing feature. (#3108) * Generated from 8252d05908b4f2a6dc1dff659c6eb61d6d0220eb Add integration runtime sharing feature. * Generated from 10967f6b83c1ff5532b2383c8fbac24f59c9e502 Add x-ms-client-name to LinkedIntegrationRuntimeRequest.factoryName * Generated from fce7b6fcf59f03d2866abfd45b122a02bcd12afd Change class name according review comments --- .../lib/models/index.d.ts | 91 +++++- .../datafactoryManagement/lib/models/index.js | 8 + .../lib/models/integrationRuntimeStatus.js | 2 +- .../integrationRuntimeStatusResponse.js | 3 +- .../lib/models/linkedIntegrationRuntimeKey.js | 4 +- ...inkedIntegrationRuntimeKeyAuthorization.js | 76 +++++ .../linkedIntegrationRuntimeProperties.js | 2 +- .../models/linkedIntegrationRuntimeRbac.js | 6 +- ...nkedIntegrationRuntimeRbacAuthorization.js | 70 ++++ .../models/linkedIntegrationRuntimeRequest.js | 53 +++ .../models/linkedIntegrationRuntimeType.js | 58 ++++ .../lib/models/managedIntegrationRuntime.js | 2 +- .../models/selfHostedIntegrationRuntime.js | 15 + .../selfHostedIntegrationRuntimeStatus.js | 34 ++ .../lib/operations/index.d.ts | 76 +++++ .../lib/operations/integrationRuntimes.js | 303 ++++++++++++++++++ 16 files changed, 791 insertions(+), 12 deletions(-) create mode 100644 lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKeyAuthorization.js create mode 100644 lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbacAuthorization.js create mode 100644 lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRequest.js create mode 100644 lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeType.js diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 4ceca334e4..5c3079dab7 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -257,7 +257,7 @@ export interface IntegrationRuntimeReference { * integration runtime belong to. * @member {string} [state] The state of integration runtime. Possible values * include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - * 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' * @member {string} type Polymorphic Discriminator */ export interface IntegrationRuntimeStatus { @@ -283,7 +283,8 @@ export interface IntegrationRuntimeStatus { * the integration runtime belong to. * @member {string} [properties.state] The state of integration runtime. * Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', - * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + * 'AccessDenied' * @member {string} [properties.type] Polymorphic Discriminator */ export interface IntegrationRuntimeStatusResponse { @@ -339,6 +340,19 @@ export interface UpdateIntegrationRuntimeNodeRequest { concurrentJobsLimit?: number; } +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeRequest class. + * @constructor + * Data factory name for linked integration runtime request. + * + * @member {string} linkedFactoryName The data factory name for linked + * integration runtime. + */ +export interface LinkedIntegrationRuntimeRequest { + linkedFactoryName: string; +} + /** * @class * Initializes a new instance of the ParameterSpecification class. @@ -6615,6 +6629,30 @@ 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. @@ -6707,6 +6745,10 @@ 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 {array} [sharedWithFactories] The MSI-s of the data factories to + * which the integration runtime is shared. * @member {string} [pushedVersion] The version that the integration runtime is * going to update to. * @member {string} [latestVersion] The latest version on download center. @@ -6724,6 +6766,8 @@ export interface SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeSt readonly serviceUrls?: string[]; readonly autoUpdate?: string; readonly versionStatus?: string; + links?: LinkedIntegrationRuntime[]; + readonly sharedWithFactories?: string[]; readonly pushedVersion?: string; readonly latestVersion?: string; } @@ -6831,14 +6875,55 @@ export interface ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatu readonly lastOperation?: ManagedIntegrationRuntimeOperationResult; } +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeType class. + * @constructor + * The base definition of a linked integration runtime. + * + * @member {string} authorizationType Polymorphic Discriminator + */ +export interface LinkedIntegrationRuntimeType { + authorizationType: string; +} + +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeRbacAuthorization class. + * @constructor + * The role based access control (RBAC) authorization type integration runtime. + * + * @member {string} resourceId The resource identifier of the integration + * runtime to be shared. + */ +export interface LinkedIntegrationRuntimeRbacAuthorization extends LinkedIntegrationRuntimeType { + resourceId: string; +} + +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeKeyAuthorization class. + * @constructor + * The key authorization type integration runtime. + * + * @member {object} key The key used for authorization. + * @member {string} [key.value] Value of secure string. + */ +export interface LinkedIntegrationRuntimeKeyAuthorization extends LinkedIntegrationRuntimeType { + 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?: LinkedIntegrationRuntimeType; } /** @@ -6997,7 +7082,7 @@ export interface IntegrationRuntimeComputeProperties { * @member {string} [state] Integration runtime state, only valid for managed * dedicated integration runtime. Possible values include: 'Initial', * 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - * 'Limited', 'Offline' + * 'Limited', 'Offline', 'AccessDenied' * @member {object} [computeProperties] The compute resource for managed * integration runtime. * @member {string} [computeProperties.location] The location for managed diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 3b376c98a4..aeb926a6c2 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -36,6 +36,7 @@ exports.IntegrationRuntimeStatusResponse = require('./integrationRuntimeStatusRe exports.IntegrationRuntimeStatusListResponse = require('./integrationRuntimeStatusListResponse'); exports.UpdateIntegrationRuntimeRequest = require('./updateIntegrationRuntimeRequest'); exports.UpdateIntegrationRuntimeNodeRequest = require('./updateIntegrationRuntimeNodeRequest'); +exports.LinkedIntegrationRuntimeRequest = require('./linkedIntegrationRuntimeRequest'); exports.ParameterSpecification = require('./parameterSpecification'); exports.LinkedService = require('./linkedService'); exports.LinkedServiceResource = require('./linkedServiceResource'); @@ -323,12 +324,16 @@ 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.LinkedIntegrationRuntimeType = require('./linkedIntegrationRuntimeType'); +exports.LinkedIntegrationRuntimeRbacAuthorization = require('./linkedIntegrationRuntimeRbacAuthorization'); +exports.LinkedIntegrationRuntimeKeyAuthorization = require('./linkedIntegrationRuntimeKeyAuthorization'); exports.SelfHostedIntegrationRuntime = require('./selfHostedIntegrationRuntime'); exports.IntegrationRuntimeCustomSetupScriptProperties = require('./integrationRuntimeCustomSetupScriptProperties'); exports.IntegrationRuntimeSsisCatalogInfo = require('./integrationRuntimeSsisCatalogInfo'); @@ -599,6 +604,9 @@ exports.discriminators = { 'Activity.Container' : exports.ControlActivity, 'IntegrationRuntimeStatus.SelfHosted' : exports.SelfHostedIntegrationRuntimeStatus, 'IntegrationRuntimeStatus.Managed' : exports.ManagedIntegrationRuntimeStatus, + 'LinkedIntegrationRuntimeType.RBAC' : exports.LinkedIntegrationRuntimeRbacAuthorization, + 'LinkedIntegrationRuntimeType.Key' : exports.LinkedIntegrationRuntimeKeyAuthorization, + 'LinkedIntegrationRuntimeType' : exports.LinkedIntegrationRuntimeType, 'IntegrationRuntime.SelfHosted' : exports.SelfHostedIntegrationRuntime, 'IntegrationRuntime.Managed' : exports.ManagedIntegrationRuntime }; diff --git a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js index d6fa960a23..4a86511a30 100644 --- a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js +++ b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js @@ -21,7 +21,7 @@ class IntegrationRuntimeStatus { * integration runtime belong to. * @member {string} [state] The state of integration runtime. Possible values * include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - * 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' * @member {string} type Polymorphic Discriminator */ constructor() { diff --git a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js index f52765aefa..62527efd0e 100644 --- a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js +++ b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js @@ -25,7 +25,8 @@ class IntegrationRuntimeStatusResponse { * the integration runtime belong to. * @member {string} [properties.state] The state of integration runtime. * Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', - * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + * 'AccessDenied' * @member {string} [properties.type] Polymorphic Discriminator */ constructor() { diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js index 5d4e0ccce8..895c7503ae 100644 --- a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * The base definition of a secret type. + * The key authorization type. * * @extends models['LinkedIntegrationRuntimeProperties'] */ class LinkedIntegrationRuntimeKey extends models['LinkedIntegrationRuntimeProperties'] { /** * Create a LinkedIntegrationRuntimeKey. - * @member {object} key Type of the secret. + * @member {object} key The key used for authorization. * @member {string} [key.value] Value of secure string. */ constructor() { diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKeyAuthorization.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKeyAuthorization.js new file mode 100644 index 0000000000..362bdd9254 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKeyAuthorization.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The key authorization type integration runtime. + * + * @extends models['LinkedIntegrationRuntimeType'] + */ +class LinkedIntegrationRuntimeKeyAuthorization extends models['LinkedIntegrationRuntimeType'] { + /** + * Create a LinkedIntegrationRuntimeKeyAuthorization. + * @member {object} key The key used for authorization. + * @member {string} [key.value] Value of secure string. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeKeyAuthorization + * + * @returns {object} metadata of LinkedIntegrationRuntimeKeyAuthorization + * + */ + mapper() { + return { + required: false, + serializedName: 'Key', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeKeyAuthorization', + modelProperties: { + authorizationType: { + required: true, + serializedName: 'authorizationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + key: { + required: true, + serializedName: 'key', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'SecretBase', + className: 'SecureString' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeKeyAuthorization; diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js index 5e9d9d3444..b9cb6afc50 100644 --- a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js @@ -11,7 +11,7 @@ 'use strict'; /** - * The base definition of a secret type. + * The base definition of a linked integration runtime properties. * */ class LinkedIntegrationRuntimeProperties { diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js index 2393b48d1d..0bd6a452b6 100644 --- a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js @@ -13,15 +13,15 @@ const models = require('./index'); /** - * The base definition of a secret type. + * The role based access control (RBAC) authorization type. * * @extends models['LinkedIntegrationRuntimeProperties'] */ class LinkedIntegrationRuntimeRbac extends models['LinkedIntegrationRuntimeProperties'] { /** * Create a LinkedIntegrationRuntimeRbac. - * @member {string} resourceId The resource ID of the integration runtime to - * be shared. + * @member {string} resourceId The resource identifier of the integration + * runtime to be shared. */ constructor() { super(); diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbacAuthorization.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbacAuthorization.js new file mode 100644 index 0000000000..90fba529f6 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbacAuthorization.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The role based access control (RBAC) authorization type integration runtime. + * + * @extends models['LinkedIntegrationRuntimeType'] + */ +class LinkedIntegrationRuntimeRbacAuthorization extends models['LinkedIntegrationRuntimeType'] { + /** + * Create a LinkedIntegrationRuntimeRbacAuthorization. + * @member {string} resourceId The resource identifier of the integration + * runtime to be shared. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeRbacAuthorization + * + * @returns {object} metadata of LinkedIntegrationRuntimeRbacAuthorization + * + */ + mapper() { + return { + required: false, + serializedName: 'RBAC', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeRbacAuthorization', + modelProperties: { + authorizationType: { + required: true, + serializedName: 'authorizationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + resourceId: { + required: true, + serializedName: 'resourceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeRbacAuthorization; diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRequest.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRequest.js new file mode 100644 index 0000000000..fbb127a49e --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRequest.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'; + +/** + * Data factory name for linked integration runtime request. + * + */ +class LinkedIntegrationRuntimeRequest { + /** + * Create a LinkedIntegrationRuntimeRequest. + * @member {string} linkedFactoryName The data factory name for linked + * integration runtime. + */ + constructor() { + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeRequest + * + * @returns {object} metadata of LinkedIntegrationRuntimeRequest + * + */ + mapper() { + return { + required: false, + serializedName: 'LinkedIntegrationRuntimeRequest', + type: { + name: 'Composite', + className: 'LinkedIntegrationRuntimeRequest', + modelProperties: { + linkedFactoryName: { + required: true, + serializedName: 'factoryName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeRequest; diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeType.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeType.js new file mode 100644 index 0000000000..d17395999d --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeType.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The base definition of a linked integration runtime. + * + */ +class LinkedIntegrationRuntimeType { + /** + * Create a LinkedIntegrationRuntimeType. + * @member {string} authorizationType Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeType + * + * @returns {object} metadata of LinkedIntegrationRuntimeType + * + */ + mapper() { + return { + required: false, + serializedName: 'LinkedIntegrationRuntimeType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeType', + modelProperties: { + authorizationType: { + required: true, + serializedName: 'authorizationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeType; diff --git a/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js b/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js index 6ebe822d53..ab054421a2 100644 --- a/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js +++ b/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js @@ -24,7 +24,7 @@ class ManagedIntegrationRuntime extends models['IntegrationRuntime'] { * @member {string} [state] Integration runtime state, only valid for managed * dedicated integration runtime. Possible values include: 'Initial', * 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', - * 'Online', 'Limited', 'Offline' + * 'Online', 'Limited', 'Offline', 'AccessDenied' * @member {object} [computeProperties] The compute resource for managed * integration runtime. * @member {string} [computeProperties.location] The location for managed diff --git a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js index 8cf307e4d9..b3d67f9fd0 100644 --- a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js +++ b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js @@ -20,6 +20,8 @@ const models = require('./index'); class SelfHostedIntegrationRuntime extends models['IntegrationRuntime'] { /** * Create a SelfHostedIntegrationRuntime. + * @member {object} [linkedInfo] + * @member {string} [linkedInfo.authorizationType] Polymorphic Discriminator */ constructor() { super(); @@ -58,6 +60,19 @@ class SelfHostedIntegrationRuntime extends models['IntegrationRuntime'] { type: { name: 'String' } + }, + linkedInfo: { + required: false, + serializedName: 'typeProperties.linkedInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeType' + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js index c23c431044..ce2d5c9a20 100644 --- a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js +++ b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js @@ -44,6 +44,10 @@ 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 {array} [sharedWithFactories] The MSI-s of the data factories to + * which the integration runtime is shared. * @member {string} [pushedVersion] The version that the integration runtime * is going to update to. * @member {string} [latestVersion] The latest version on download center. @@ -224,6 +228,36 @@ class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatu name: 'String' } }, + links: { + required: false, + serializedName: 'typeProperties.links', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'LinkedIntegrationRuntimeElementType', + type: { + name: 'Composite', + className: 'LinkedIntegrationRuntime' + } + } + } + }, + sharedWithFactories: { + required: false, + readOnly: true, + serializedName: 'typeProperties.sharedWithFactories', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, pushedVersion: { required: false, readOnly: true, diff --git a/lib/services/datafactoryManagement/lib/operations/index.d.ts b/lib/services/datafactoryManagement/lib/operations/index.d.ts index c26a638686..948d9d23be 100644 --- a/lib/services/datafactoryManagement/lib/operations/index.d.ts +++ b/lib/services/datafactoryManagement/lib/operations/index.d.ts @@ -1757,6 +1757,82 @@ export interface IntegrationRuntimes { upgrade(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @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. + */ + removeLinksWithHttpOperationResponse(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @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. + */ + removeLinks(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + removeLinks(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, callback: ServiceCallback): void; + removeLinks(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Starts a ManagedReserved type integration runtime. * diff --git a/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js b/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js index 830d176ec2..b4ed1c3ab9 100644 --- a/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js +++ b/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js @@ -2519,6 +2519,205 @@ function _upgrade(resourceGroupName, factoryName, integrationRuntimeName, option }); } +/** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @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 _removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, 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 (linkedIntegrationRuntimeRequest === null || linkedIntegrationRuntimeRequest === undefined) { + throw new Error('linkedIntegrationRuntimeRequest 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}/removeLinks'; + 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 (linkedIntegrationRuntimeRequest !== null && linkedIntegrationRuntimeRequest !== undefined) { + let requestModelMapper = new client.models['LinkedIntegrationRuntimeRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, linkedIntegrationRuntimeRequest, 'linkedIntegrationRuntimeRequest'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(linkedIntegrationRuntimeRequest, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** * Starts a ManagedReserved type integration runtime. * @@ -3038,6 +3237,7 @@ class IntegrationRuntimes { this._syncCredentials = _syncCredentials; this._getMonitoringData = _getMonitoringData; this._upgrade = _upgrade; + this._removeLinks = _removeLinks; this._beginStart = _beginStart; this._beginStop = _beginStop; this._listByFactoryNext = _listByFactoryNext; @@ -4391,6 +4591,109 @@ class IntegrationRuntimes { } } + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @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. + */ + removeLinksWithHttpOperationResponse(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @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. + */ + removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, 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._removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, optionalCallback); + } + } + /** * Starts a ManagedReserved type integration runtime. * From 3fa54bf08a568c73c77824f3cfe5a5ef419d243e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 11 Jul 2018 11:31:11 -0700 Subject: [PATCH 08/13] Generated from 150ad35384422f89c66b0814294f439b35e2d2ed (#3153) Remove sharedWithFactories property from SelfHostedIntegrationRuntimeStatusTypeProperties --- .../datafactoryManagement/lib/models/index.d.ts | 3 --- .../selfHostedIntegrationRuntimeStatus.js | 17 ----------------- 2 files changed, 20 deletions(-) diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 5c3079dab7..4992fdc252 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -6747,8 +6747,6 @@ export interface SelfHostedIntegrationRuntimeNode { * @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 {array} [sharedWithFactories] The MSI-s of the data factories to - * which the integration runtime is shared. * @member {string} [pushedVersion] The version that the integration runtime is * going to update to. * @member {string} [latestVersion] The latest version on download center. @@ -6767,7 +6765,6 @@ export interface SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeSt readonly autoUpdate?: string; readonly versionStatus?: string; links?: LinkedIntegrationRuntime[]; - readonly sharedWithFactories?: string[]; readonly pushedVersion?: string; readonly latestVersion?: string; } diff --git a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js index ce2d5c9a20..e6c28cd409 100644 --- a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js +++ b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js @@ -46,8 +46,6 @@ class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatu * version. * @member {array} [links] The list of linked integration runtimes that are * created to share with this integration runtime. - * @member {array} [sharedWithFactories] The MSI-s of the data factories to - * which the integration runtime is shared. * @member {string} [pushedVersion] The version that the integration runtime * is going to update to. * @member {string} [latestVersion] The latest version on download center. @@ -243,21 +241,6 @@ class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatu } } }, - sharedWithFactories: { - required: false, - readOnly: true, - serializedName: 'typeProperties.sharedWithFactories', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, pushedVersion: { required: false, readOnly: true, From 0fed71e4bb2289103e4c886dc1df710005e6a024 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 11 Jul 2018 15:28:25 -0700 Subject: [PATCH 09/13] =?UTF-8?q?[AutoPR=20datafactory/resource-manager]?= =?UTF-8?q?=20[Datafactory]=20DatabricksSparkJarActivity,=20DatabricksSpar?= =?UTF-8?q?kPythonActivity=20and=20other=20D=E2=80=A6=20(#3154)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Generated from b8adcbf95165499712d30b78fa15d908ebf5e356 DatabricksSparkJarActivity, DatabricksSparkPythonActivity and other Databricks enhancements * Generated from b8adcbf95165499712d30b78fa15d908ebf5e356 DatabricksSparkJarActivity, DatabricksSparkPythonActivity and other Databricks enhancements --- .../models/azureDatabricksLinkedService.js | 16 ++ .../lib/models/databricksNotebookActivity.js | 23 +++ .../lib/models/databricksSparkJarActivity.js | 193 ++++++++++++++++++ .../models/databricksSparkPythonActivity.js | 193 ++++++++++++++++++ .../lib/models/index.d.ts | 45 ++++ .../datafactoryManagement/lib/models/index.js | 4 + 6 files changed, 474 insertions(+) create mode 100644 lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js create mode 100644 lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js diff --git a/lib/services/datafactoryManagement/lib/models/azureDatabricksLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureDatabricksLinkedService.js index 8f6d5a7670..35d2defeac 100644 --- a/lib/services/datafactoryManagement/lib/models/azureDatabricksLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/azureDatabricksLinkedService.js @@ -40,6 +40,8 @@ class AzureDatabricksLinkedService extends models['LinkedService'] { * string (or Expression with resultType string). * @member {object} [newClusterSparkConf] a set of optional, user-specified * Spark configuration key-value pairs. + * @member {object} [newClusterCustomTags] Additional tags for cluster + * resources. * @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). @@ -181,6 +183,20 @@ class AzureDatabricksLinkedService extends models['LinkedService'] { } } }, + newClusterCustomTags: { + required: false, + serializedName: 'typeProperties.newClusterCustomTags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, encryptedCredential: { required: false, serializedName: 'typeProperties.encryptedCredential', diff --git a/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js b/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js index db00000909..4ef64b5793 100644 --- a/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js +++ b/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js @@ -26,6 +26,8 @@ class DatabricksNotebookActivity extends models['ExecutionActivity'] { * @member {object} [baseParameters] Base parameters to be used for each run * of this job.If the notebook takes a parameter that is not specified, the * default value from the notebook will be used. + * @member {array} [libraries] A list of libraries to be installed on the + * cluster that will execute the job. */ constructor() { super(); @@ -161,6 +163,27 @@ class DatabricksNotebookActivity extends models['ExecutionActivity'] { } } } + }, + libraries: { + required: false, + serializedName: 'typeProperties.libraries', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + } + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js b/lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js new file mode 100644 index 0000000000..b3555ce6ec --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js @@ -0,0 +1,193 @@ +/* + * 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'); + +/** + * DatabricksSparkJar activity. + * + * @extends models['ExecutionActivity'] + */ +class DatabricksSparkJarActivity extends models['ExecutionActivity'] { + /** + * Create a DatabricksSparkJarActivity. + * @member {object} mainClassName The full name of the class containing the + * main method to be executed. This class must be contained in a JAR provided + * as a library. Type: string (or Expression with resultType string). + * @member {array} [parameters] Parameters that will be passed to the main + * method. + * @member {array} [libraries] A list of libraries to be installed on the + * cluster that will execute the job. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DatabricksSparkJarActivity + * + * @returns {object} metadata of DatabricksSparkJarActivity + * + */ + mapper() { + return { + required: false, + serializedName: 'DatabricksSparkJar', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'Activity', + className: 'DatabricksSparkJarActivity', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + dependsOn: { + required: false, + serializedName: 'dependsOn', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActivityDependencyElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'ActivityDependency' + } + } + } + }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + linkedServiceName: { + required: false, + serializedName: 'linkedServiceName', + type: { + name: 'Composite', + className: 'LinkedServiceReference' + } + }, + policy: { + required: false, + serializedName: 'policy', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'ActivityPolicy' + } + }, + mainClassName: { + required: true, + serializedName: 'typeProperties.mainClassName', + type: { + name: 'Object' + } + }, + parameters: { + required: false, + serializedName: 'typeProperties.parameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + libraries: { + required: false, + serializedName: 'typeProperties.libraries', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + } + } + } + } + } + }; + } +} + +module.exports = DatabricksSparkJarActivity; diff --git a/lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js b/lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js new file mode 100644 index 0000000000..959e329c1b --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js @@ -0,0 +1,193 @@ +/* + * 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'); + +/** + * DatabricksSparkPython activity. + * + * @extends models['ExecutionActivity'] + */ +class DatabricksSparkPythonActivity extends models['ExecutionActivity'] { + /** + * Create a DatabricksSparkPythonActivity. + * @member {object} pythonFile The URI of the Python file to be executed. + * DBFS paths are supported. Type: string (or Expression with resultType + * string). + * @member {array} [parameters] Command line parameters that will be passed + * to the Python file. + * @member {array} [libraries] A list of libraries to be installed on the + * cluster that will execute the job. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DatabricksSparkPythonActivity + * + * @returns {object} metadata of DatabricksSparkPythonActivity + * + */ + mapper() { + return { + required: false, + serializedName: 'DatabricksSparkPython', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'Activity', + className: 'DatabricksSparkPythonActivity', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + dependsOn: { + required: false, + serializedName: 'dependsOn', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ActivityDependencyElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'ActivityDependency' + } + } + } + }, + userProperties: { + required: false, + serializedName: 'userProperties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + linkedServiceName: { + required: false, + serializedName: 'linkedServiceName', + type: { + name: 'Composite', + className: 'LinkedServiceReference' + } + }, + policy: { + required: false, + serializedName: 'policy', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'ActivityPolicy' + } + }, + pythonFile: { + required: true, + serializedName: 'typeProperties.pythonFile', + type: { + name: 'Object' + } + }, + parameters: { + required: false, + serializedName: 'typeProperties.parameters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + libraries: { + required: false, + serializedName: 'typeProperties.libraries', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + } + } + } + } + } + }; + } +} + +module.exports = DatabricksSparkPythonActivity; diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 4992fdc252..5351944de1 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -1166,6 +1166,8 @@ export interface ResponsysLinkedService extends LinkedService { * string (or Expression with resultType string). * @member {object} [newClusterSparkConf] a set of optional, user-specified * Spark configuration key-value pairs. + * @member {object} [newClusterCustomTags] Additional tags for cluster + * resources. * @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). @@ -1178,6 +1180,7 @@ export interface AzureDatabricksLinkedService extends LinkedService { newClusterNumOfWorker?: any; newClusterNodeType?: any; newClusterSparkConf?: { [propertyName: string]: any }; + newClusterCustomTags?: { [propertyName: string]: any }; encryptedCredential?: any; } @@ -4653,6 +4656,45 @@ export interface ExecutionActivity extends Activity { policy?: ActivityPolicy; } +/** + * @class + * Initializes a new instance of the DatabricksSparkPythonActivity class. + * @constructor + * DatabricksSparkPython activity. + * + * @member {object} pythonFile The URI of the Python file to be executed. DBFS + * paths are supported. Type: string (or Expression with resultType string). + * @member {array} [parameters] Command line parameters that will be passed to + * the Python file. + * @member {array} [libraries] A list of libraries to be installed on the + * cluster that will execute the job. + */ +export interface DatabricksSparkPythonActivity extends ExecutionActivity { + pythonFile: any; + parameters?: any[]; + libraries?: { [propertyName: string]: any }[]; +} + +/** + * @class + * Initializes a new instance of the DatabricksSparkJarActivity class. + * @constructor + * DatabricksSparkJar activity. + * + * @member {object} mainClassName The full name of the class containing the + * main method to be executed. This class must be contained in a JAR provided + * as a library. Type: string (or Expression with resultType string). + * @member {array} [parameters] Parameters that will be passed to the main + * method. + * @member {array} [libraries] A list of libraries to be installed on the + * cluster that will execute the job. + */ +export interface DatabricksSparkJarActivity extends ExecutionActivity { + mainClassName: any; + parameters?: any[]; + libraries?: { [propertyName: string]: any }[]; +} + /** * @class * Initializes a new instance of the DatabricksNotebookActivity class. @@ -4665,10 +4707,13 @@ export interface ExecutionActivity extends Activity { * @member {object} [baseParameters] Base parameters to be used for each run of * this job.If the notebook takes a parameter that is not specified, the * default value from the notebook will be used. + * @member {array} [libraries] A list of libraries to be installed on the + * cluster that will execute the job. */ export interface DatabricksNotebookActivity extends ExecutionActivity { notebookPath: any; baseParameters?: { [propertyName: string]: any }; + libraries?: { [propertyName: string]: any }[]; } /** diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index aeb926a6c2..27d28e5eab 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -221,6 +221,8 @@ exports.ScheduleTriggerRecurrence = require('./scheduleTriggerRecurrence'); exports.ScheduleTrigger = require('./scheduleTrigger'); exports.ActivityPolicy = require('./activityPolicy'); exports.ExecutionActivity = require('./executionActivity'); +exports.DatabricksSparkPythonActivity = require('./databricksSparkPythonActivity'); +exports.DatabricksSparkJarActivity = require('./databricksSparkJarActivity'); exports.DatabricksNotebookActivity = require('./databricksNotebookActivity'); exports.DataLakeAnalyticsUSQLActivity = require('./dataLakeAnalyticsUSQLActivity'); exports.AzureMLUpdateResourceActivity = require('./azureMLUpdateResourceActivity'); @@ -510,6 +512,8 @@ exports.discriminators = { 'Trigger.BlobTrigger' : exports.BlobTrigger, 'Trigger.ScheduleTrigger' : exports.ScheduleTrigger, 'Trigger.MultiplePipelineTrigger' : exports.MultiplePipelineTrigger, + 'Activity.DatabricksSparkPython' : exports.DatabricksSparkPythonActivity, + 'Activity.DatabricksSparkJar' : exports.DatabricksSparkJarActivity, 'Activity.DatabricksNotebook' : exports.DatabricksNotebookActivity, 'Activity.DataLakeAnalyticsU-SQL' : exports.DataLakeAnalyticsUSQLActivity, 'Activity.AzureMLUpdateResource' : exports.AzureMLUpdateResourceActivity, From 0e76853b7f8f41de757fcb3a39020230e676167a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 24 Jul 2018 11:26:53 -0700 Subject: [PATCH 10/13] Generated from 3bcb5068dd38686779fe7f7aee5b11b6da83f680 (#3224) Updating User Properties --- .../lib/models/activity.js | 23 ++----- .../models/azureMLBatchExecutionActivity.js | 9 +-- .../models/azureMLUpdateResourceActivity.js | 9 +-- .../lib/models/controlActivity.js | 9 +-- .../lib/models/copyActivity.js | 9 +-- .../lib/models/customActivity.js | 9 +-- .../models/dataLakeAnalyticsUSQLActivity.js | 9 +-- .../lib/models/databricksNotebookActivity.js | 9 +-- .../lib/models/databricksSparkJarActivity.js | 9 +-- .../models/databricksSparkPythonActivity.js | 9 +-- .../lib/models/executePipelineActivity.js | 9 +-- .../lib/models/executeSSISPackageActivity.js | 9 +-- .../lib/models/executionActivity.js | 9 +-- .../lib/models/filterActivity.js | 9 +-- .../lib/models/forEachActivity.js | 21 ++----- .../lib/models/getMetadataActivity.js | 9 +-- .../lib/models/hDInsightHiveActivity.js | 9 +-- .../lib/models/hDInsightMapReduceActivity.js | 9 +-- .../lib/models/hDInsightPigActivity.js | 9 +-- .../lib/models/hDInsightSparkActivity.js | 9 +-- .../lib/models/hDInsightStreamingActivity.js | 9 +-- .../lib/models/ifConditionActivity.js | 33 ++-------- .../lib/models/index.d.ts | 24 +++++--- .../datafactoryManagement/lib/models/index.js | 1 + .../lib/models/lookupActivity.js | 9 +-- .../lib/models/pipelineResource.js | 12 ---- .../sqlServerStoredProcedureActivity.js | 9 +-- .../lib/models/untilActivity.js | 21 ++----- .../lib/models/userProperty.js | 61 +++++++++++++++++++ .../lib/models/waitActivity.js | 9 +-- .../lib/models/webActivity.js | 9 +-- 31 files changed, 215 insertions(+), 188 deletions(-) create mode 100644 lib/services/datafactoryManagement/lib/models/userProperty.js diff --git a/lib/services/datafactoryManagement/lib/models/activity.js b/lib/services/datafactoryManagement/lib/models/activity.js index 5a0172a104..4a2b487f62 100644 --- a/lib/services/datafactoryManagement/lib/models/activity.js +++ b/lib/services/datafactoryManagement/lib/models/activity.js @@ -22,7 +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 {array} [userProperties] Activity user properties. * @member {string} type Polymorphic Discriminator */ constructor() { @@ -40,18 +40,6 @@ class Activity { serializedName: 'Activity', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' @@ -104,12 +92,13 @@ class Activity { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js b/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js index d59fa946cb..a7a0e211b3 100644 --- a/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/azureMLBatchExecutionActivity.js @@ -102,12 +102,13 @@ class AzureMLBatchExecutionActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js b/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js index 2f9998e168..22b7afffaa 100644 --- a/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js +++ b/lib/services/datafactoryManagement/lib/models/azureMLUpdateResourceActivity.js @@ -103,12 +103,13 @@ class AzureMLUpdateResourceActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/controlActivity.js b/lib/services/datafactoryManagement/lib/models/controlActivity.js index 89b5f0b5bd..e169df9740 100644 --- a/lib/services/datafactoryManagement/lib/models/controlActivity.js +++ b/lib/services/datafactoryManagement/lib/models/controlActivity.js @@ -89,12 +89,13 @@ class ControlActivity extends models['Activity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/copyActivity.js b/lib/services/datafactoryManagement/lib/models/copyActivity.js index 590fdc477a..a6faf7bf67 100644 --- a/lib/services/datafactoryManagement/lib/models/copyActivity.js +++ b/lib/services/datafactoryManagement/lib/models/copyActivity.js @@ -148,12 +148,13 @@ class CopyActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/customActivity.js b/lib/services/datafactoryManagement/lib/models/customActivity.js index 76476f6995..a209ff81be 100644 --- a/lib/services/datafactoryManagement/lib/models/customActivity.js +++ b/lib/services/datafactoryManagement/lib/models/customActivity.js @@ -107,12 +107,13 @@ class CustomActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js b/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js index 99373c19f0..676f9c1f0e 100644 --- a/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js +++ b/lib/services/datafactoryManagement/lib/models/dataLakeAnalyticsUSQLActivity.js @@ -109,12 +109,13 @@ class DataLakeAnalyticsUSQLActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js b/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js index 4ef64b5793..e174a0a581 100644 --- a/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js +++ b/lib/services/datafactoryManagement/lib/models/databricksNotebookActivity.js @@ -97,12 +97,13 @@ class DatabricksNotebookActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js b/lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js index b3555ce6ec..8063762e8c 100644 --- a/lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js +++ b/lib/services/datafactoryManagement/lib/models/databricksSparkJarActivity.js @@ -96,12 +96,13 @@ class DatabricksSparkJarActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js b/lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js index 959e329c1b..ce5c6fd83f 100644 --- a/lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js +++ b/lib/services/datafactoryManagement/lib/models/databricksSparkPythonActivity.js @@ -96,12 +96,13 @@ class DatabricksSparkPythonActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js b/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js index 1d9452edc1..a7f683daa2 100644 --- a/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executePipelineActivity.js @@ -96,12 +96,13 @@ class ExecutePipelineActivity extends models['ControlActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js b/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js index 253142ffa7..bc961a82c9 100644 --- a/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executeSSISPackageActivity.js @@ -112,12 +112,13 @@ class ExecuteSSISPackageActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/executionActivity.js b/lib/services/datafactoryManagement/lib/models/executionActivity.js index d5e406f65e..a34a2d4d78 100644 --- a/lib/services/datafactoryManagement/lib/models/executionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/executionActivity.js @@ -105,12 +105,13 @@ class ExecutionActivity extends models['Activity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/filterActivity.js b/lib/services/datafactoryManagement/lib/models/filterActivity.js index 97fdeb8038..fecec0d9d0 100644 --- a/lib/services/datafactoryManagement/lib/models/filterActivity.js +++ b/lib/services/datafactoryManagement/lib/models/filterActivity.js @@ -93,12 +93,13 @@ class FilterActivity extends models['ControlActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/forEachActivity.js b/lib/services/datafactoryManagement/lib/models/forEachActivity.js index 775d78820e..6d047dc33c 100644 --- a/lib/services/datafactoryManagement/lib/models/forEachActivity.js +++ b/lib/services/datafactoryManagement/lib/models/forEachActivity.js @@ -97,12 +97,13 @@ class ForEachActivity extends models['ControlActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } @@ -151,18 +152,6 @@ class ForEachActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js b/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js index 040a0ce1d5..bae4fcffd2 100644 --- a/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js +++ b/lib/services/datafactoryManagement/lib/models/getMetadataActivity.js @@ -93,12 +93,13 @@ class GetMetadataActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js index 71f0ef26f3..53e88784c6 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightHiveActivity.js @@ -103,12 +103,13 @@ class HDInsightHiveActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js index 3308c8ec83..54fb8013a2 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightMapReduceActivity.js @@ -106,12 +106,13 @@ class HDInsightMapReduceActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js index 0ecf95c8bb..68be557a45 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightPigActivity.js @@ -103,12 +103,13 @@ class HDInsightPigActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js index a608fba330..446417f354 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightSparkActivity.js @@ -108,12 +108,13 @@ class HDInsightSparkActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js b/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js index 016023cdfd..7fe59e5af8 100644 --- a/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js +++ b/lib/services/datafactoryManagement/lib/models/hDInsightStreamingActivity.js @@ -115,12 +115,13 @@ class HDInsightStreamingActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js b/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js index bd5a8716d7..d89136e530 100644 --- a/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js @@ -101,12 +101,13 @@ class IfConditionActivity extends models['ControlActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } @@ -138,18 +139,6 @@ class IfConditionActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' @@ -170,18 +159,6 @@ class IfConditionActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 5351944de1..e869694748 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -499,6 +499,21 @@ export interface ActivityDependency { [property: string]: any; } +/** + * @class + * Initializes a new instance of the UserProperty class. + * @constructor + * User property. + * + * @member {string} name User proprety name. + * @member {object} value User proprety value. Type: string (or Expression with + * resultType string). + */ +export interface UserProperty { + name: string; + value: any; +} + /** * @class * Initializes a new instance of the Activity class. @@ -508,20 +523,15 @@ 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 {array} [userProperties] Activity user properties. * @member {string} type Polymorphic Discriminator */ export interface Activity { name: string; description?: string; dependsOn?: ActivityDependency[]; - userProperties?: { [propertyName: string]: string }; + userProperties?: UserProperty[]; type: string; - /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; } /** diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 27d28e5eab..2e5a964ac4 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -43,6 +43,7 @@ exports.LinkedServiceResource = require('./linkedServiceResource'); exports.Dataset = require('./dataset'); exports.DatasetResource = require('./datasetResource'); exports.ActivityDependency = require('./activityDependency'); +exports.UserProperty = require('./userProperty'); exports.Activity = require('./activity'); exports.PipelineResource = require('./pipelineResource'); exports.Trigger = require('./trigger'); diff --git a/lib/services/datafactoryManagement/lib/models/lookupActivity.js b/lib/services/datafactoryManagement/lib/models/lookupActivity.js index 9b5b1aac04..871e245727 100644 --- a/lib/services/datafactoryManagement/lib/models/lookupActivity.js +++ b/lib/services/datafactoryManagement/lib/models/lookupActivity.js @@ -103,12 +103,13 @@ class LookupActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/pipelineResource.js b/lib/services/datafactoryManagement/lib/models/pipelineResource.js index a2ac113838..b5b4865398 100644 --- a/lib/services/datafactoryManagement/lib/models/pipelineResource.js +++ b/lib/services/datafactoryManagement/lib/models/pipelineResource.js @@ -107,18 +107,6 @@ class PipelineResource extends models['SubResource'] { serializedName: 'ActivityElementType', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js b/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js index b25fd20924..b82aec1f1f 100644 --- a/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js +++ b/lib/services/datafactoryManagement/lib/models/sqlServerStoredProcedureActivity.js @@ -94,12 +94,13 @@ class SqlServerStoredProcedureActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/untilActivity.js b/lib/services/datafactoryManagement/lib/models/untilActivity.js index 6cd0145c57..a82d4b9439 100644 --- a/lib/services/datafactoryManagement/lib/models/untilActivity.js +++ b/lib/services/datafactoryManagement/lib/models/untilActivity.js @@ -100,12 +100,13 @@ class UntilActivity extends models['ControlActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } @@ -144,18 +145,6 @@ class UntilActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/userProperty.js b/lib/services/datafactoryManagement/lib/models/userProperty.js new file mode 100644 index 0000000000..b9344f64b5 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/userProperty.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'; + +/** + * User property. + * + */ +class UserProperty { + /** + * Create a UserProperty. + * @member {string} name User proprety name. + * @member {object} value User proprety value. Type: string (or Expression + * with resultType string). + */ + constructor() { + } + + /** + * Defines the metadata of UserProperty + * + * @returns {object} metadata of UserProperty + * + */ + mapper() { + return { + required: false, + serializedName: 'UserProperty', + type: { + name: 'Composite', + className: 'UserProperty', + modelProperties: { + name: { + required: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + value: { + required: true, + serializedName: 'value', + type: { + name: 'Object' + } + } + } + } + }; + } +} + +module.exports = UserProperty; diff --git a/lib/services/datafactoryManagement/lib/models/waitActivity.js b/lib/services/datafactoryManagement/lib/models/waitActivity.js index a4fa0e5071..4f8ea0ad89 100644 --- a/lib/services/datafactoryManagement/lib/models/waitActivity.js +++ b/lib/services/datafactoryManagement/lib/models/waitActivity.js @@ -90,12 +90,13 @@ class WaitActivity extends models['ControlActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } diff --git a/lib/services/datafactoryManagement/lib/models/webActivity.js b/lib/services/datafactoryManagement/lib/models/webActivity.js index 628589acff..602ac68fa7 100644 --- a/lib/services/datafactoryManagement/lib/models/webActivity.js +++ b/lib/services/datafactoryManagement/lib/models/webActivity.js @@ -117,12 +117,13 @@ class WebActivity extends models['ExecutionActivity'] { required: false, serializedName: 'userProperties', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'UserPropertyElementType', type: { - name: 'String' + name: 'Composite', + className: 'UserProperty' } } } From eb1af5b075a3bd3183aabb7c5a948a6f0342a7c8 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 24 Jul 2018 13:21:23 -0700 Subject: [PATCH 11/13] Generated from 04d330debfe9f9f86aece8489cb5758f4025c53a (#3231) [ADF] Bringing back additionalProperties in Activity removed by mistake --- .../lib/models/activity.js | 12 ++++++++++ .../lib/models/forEachActivity.js | 12 ++++++++++ .../lib/models/ifConditionActivity.js | 24 +++++++++++++++++++ .../lib/models/index.d.ts | 5 ++++ .../lib/models/pipelineResource.js | 12 ++++++++++ .../lib/models/untilActivity.js | 12 ++++++++++ 6 files changed, 77 insertions(+) diff --git a/lib/services/datafactoryManagement/lib/models/activity.js b/lib/services/datafactoryManagement/lib/models/activity.js index 4a2b487f62..bcaeef0394 100644 --- a/lib/services/datafactoryManagement/lib/models/activity.js +++ b/lib/services/datafactoryManagement/lib/models/activity.js @@ -40,6 +40,18 @@ class Activity { serializedName: 'Activity', type: { name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/forEachActivity.js b/lib/services/datafactoryManagement/lib/models/forEachActivity.js index 6d047dc33c..c876215d15 100644 --- a/lib/services/datafactoryManagement/lib/models/forEachActivity.js +++ b/lib/services/datafactoryManagement/lib/models/forEachActivity.js @@ -152,6 +152,18 @@ class ForEachActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js b/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js index d89136e530..0343ebc097 100644 --- a/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js +++ b/lib/services/datafactoryManagement/lib/models/ifConditionActivity.js @@ -139,6 +139,18 @@ class IfConditionActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' @@ -159,6 +171,18 @@ class IfConditionActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index e869694748..924add20c0 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -532,6 +532,11 @@ export interface Activity { dependsOn?: ActivityDependency[]; userProperties?: UserProperty[]; type: string; + /** + * @property Describes unknown properties. The value of an unknown property + * can be of "any" type. + */ + [property: string]: any; } /** diff --git a/lib/services/datafactoryManagement/lib/models/pipelineResource.js b/lib/services/datafactoryManagement/lib/models/pipelineResource.js index b5b4865398..a2ac113838 100644 --- a/lib/services/datafactoryManagement/lib/models/pipelineResource.js +++ b/lib/services/datafactoryManagement/lib/models/pipelineResource.js @@ -107,6 +107,18 @@ class PipelineResource extends models['SubResource'] { serializedName: 'ActivityElementType', type: { name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' diff --git a/lib/services/datafactoryManagement/lib/models/untilActivity.js b/lib/services/datafactoryManagement/lib/models/untilActivity.js index a82d4b9439..3f7bb59cbd 100644 --- a/lib/services/datafactoryManagement/lib/models/untilActivity.js +++ b/lib/services/datafactoryManagement/lib/models/untilActivity.js @@ -145,6 +145,18 @@ class UntilActivity extends models['ControlActivity'] { serializedName: 'ActivityElementType', type: { name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, polymorphicDiscriminator: { serializedName: 'type', clientName: 'type' From bd6cf464b5d111b87ae88f19114d83832fa9f247 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 1 Aug 2018 08:27:44 -0700 Subject: [PATCH 12/13] Generated from ac50a2da1ec162e8eb9e8f01f1bd1e9b110d24c0 (#3277) Remove readOnly flag on github hostName property --- .../lib/dataFactoryManagementClient.d.ts | 6 +++--- .../lib/dataFactoryManagementClient.js | 6 +++--- .../datafactoryManagement/lib/models/activityDependency.js | 2 +- .../datafactoryManagement/lib/models/blobEventsTrigger.js | 2 +- .../lib/models/factoryGitHubConfiguration.js | 4 ++-- lib/services/datafactoryManagement/lib/models/index.d.ts | 5 +++-- lib/services/datafactoryManagement/package.json | 4 ++-- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.d.ts b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.d.ts index 5080d48b13..23f1fb0fc1 100644 --- a/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.d.ts +++ b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.d.ts @@ -34,11 +34,11 @@ export default class DataFactoryManagementClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); diff --git a/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js index 176b094053..32720acde4 100644 --- a/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js +++ b/lib/services/datafactoryManagement/lib/dataFactoryManagementClient.js @@ -34,9 +34,9 @@ class DataFactoryManagementClient extends ServiceClient { * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { diff --git a/lib/services/datafactoryManagement/lib/models/activityDependency.js b/lib/services/datafactoryManagement/lib/models/activityDependency.js index 8058e27194..c8f54f0aba 100644 --- a/lib/services/datafactoryManagement/lib/models/activityDependency.js +++ b/lib/services/datafactoryManagement/lib/models/activityDependency.js @@ -63,7 +63,7 @@ class ActivityDependency { name: 'Sequence', element: { required: false, - serializedName: 'StringElementType', + serializedName: 'DependencyConditionElementType', type: { name: 'String' } diff --git a/lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js b/lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js index 17edbd6e65..ae4fb1319b 100644 --- a/lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js +++ b/lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js @@ -114,7 +114,7 @@ class BlobEventsTrigger extends models['MultiplePipelineTrigger'] { name: 'Sequence', element: { required: false, - serializedName: 'StringElementType', + serializedName: 'BlobEventTypesElementType', type: { name: 'String' } diff --git a/lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js b/lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js index 3329c6631b..1e685fbae8 100644 --- a/lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js +++ b/lib/services/datafactoryManagement/lib/models/factoryGitHubConfiguration.js @@ -20,7 +20,8 @@ const models = require('./index'); class FactoryGitHubConfiguration extends models['FactoryRepoConfiguration'] { /** * Create a FactoryGitHubConfiguration. - * @member {string} [hostName] GitHub repo host name. + * @member {string} [hostName] GitHub Enterprise host name. For example: + * https://github.mydomain.com */ constructor() { super(); @@ -90,7 +91,6 @@ class FactoryGitHubConfiguration extends models['FactoryRepoConfiguration'] { }, hostName: { required: false, - readOnly: true, serializedName: 'hostName', type: { name: 'String' diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 924add20c0..e9c563a284 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -639,10 +639,11 @@ export interface FactoryVSTSConfiguration extends FactoryRepoConfiguration { * @constructor * Factory's GitHub repo information. * - * @member {string} [hostName] GitHub repo host name. + * @member {string} [hostName] GitHub Enterprise host name. For example: + * https://github.mydomain.com */ export interface FactoryGitHubConfiguration extends FactoryRepoConfiguration { - readonly hostName?: string; + hostName?: string; } /** diff --git a/lib/services/datafactoryManagement/package.json b/lib/services/datafactoryManagement/package.json index 3de6e15545..31bc2db2fa 100644 --- a/lib/services/datafactoryManagement/package.json +++ b/lib/services/datafactoryManagement/package.json @@ -14,12 +14,12 @@ "license": "MIT", "main": "./lib/dataFactoryManagementClient.js", "types": "./lib/dataFactoryManagementClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } } From 667ff636a3dc6758d3da4060d6d1ba2acabaae6e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 1 Aug 2018 11:04:03 -0700 Subject: [PATCH 13/13] Generated from d1ad1388e3f654de7cea6f0f62b951174b2fc578 (#3279) change encryptedCredential type to string --- .../models/azureBlobStorageLinkedService.js | 187 ++++++++++++++++++ .../lib/models/azureStorageLinkedService.js | 4 +- .../models/azureTableStorageLinkedService.js | 141 +++++++++++++ .../lib/models/index.d.ts | 63 +++++- .../datafactoryManagement/lib/models/index.js | 4 + 5 files changed, 395 insertions(+), 4 deletions(-) create mode 100644 lib/services/datafactoryManagement/lib/models/azureBlobStorageLinkedService.js create mode 100644 lib/services/datafactoryManagement/lib/models/azureTableStorageLinkedService.js diff --git a/lib/services/datafactoryManagement/lib/models/azureBlobStorageLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureBlobStorageLinkedService.js new file mode 100644 index 0000000000..864eba8fa0 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/azureBlobStorageLinkedService.js @@ -0,0 +1,187 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The azure blob storage linked service. + * + * @extends models['LinkedService'] + */ +class AzureBlobStorageLinkedService extends models['LinkedService'] { + /** + * Create a AzureBlobStorageLinkedService. + * @member {object} [connectionString] The connection string. It is mutually + * exclusive with sasUri, serviceEndpoint property. Type: string, + * SecureString or AzureKeyVaultSecretReference. + * @member {object} [sasUri] SAS URI of the Azure Blob Storage resource. It + * is mutually exclusive with connectionString, serviceEndpoint property. + * @member {string} [sasUri.type] Polymorphic Discriminator + * @member {string} [serviceEndpoint] Blob service endpoint of the Azure Blob + * Storage resource. It is mutually exclusive with connectionString, sasUri + * property. + * @member {object} [servicePrincipalId] The ID of the service principal used + * to authenticate against Azure SQL Data Warehouse. Type: string (or + * Expression with resultType string). + * @member {object} [servicePrincipalKey] The key of the service principal + * used to authenticate against Azure SQL Data Warehouse. + * @member {string} [servicePrincipalKey.type] Polymorphic Discriminator + * @member {object} [tenant] The name or ID of the tenant to which the + * service principal belongs. Type: string (or Expression with resultType + * string). + * @member {string} [encryptedCredential] The encrypted credential used for + * authentication. Credentials are encrypted using the integration runtime + * credential manager. Type: string (or Expression with resultType string). + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AzureBlobStorageLinkedService + * + * @returns {object} metadata of AzureBlobStorageLinkedService + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureBlobStorage', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'LinkedService', + className: 'AzureBlobStorageLinkedService', + modelProperties: { + connectVia: { + required: false, + serializedName: 'connectVia', + type: { + name: 'Composite', + className: 'IntegrationRuntimeReference' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serializedName: 'parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ParameterSpecificationElementType', + type: { + name: 'Composite', + className: 'ParameterSpecification' + } + } + } + }, + annotations: { + required: false, + serializedName: 'annotations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + connectionString: { + required: false, + serializedName: 'typeProperties.connectionString', + type: { + name: 'Object' + } + }, + sasUri: { + required: false, + serializedName: 'typeProperties.sasUri', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'SecretBase', + className: 'SecretBase' + } + }, + serviceEndpoint: { + required: false, + serializedName: 'typeProperties.serviceEndpoint', + type: { + name: 'String' + } + }, + servicePrincipalId: { + required: false, + serializedName: 'typeProperties.servicePrincipalId', + type: { + name: 'Object' + } + }, + servicePrincipalKey: { + required: false, + serializedName: 'typeProperties.servicePrincipalKey', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'SecretBase', + className: 'SecretBase' + } + }, + tenant: { + required: false, + serializedName: 'typeProperties.tenant', + type: { + name: 'Object' + } + }, + encryptedCredential: { + required: false, + serializedName: 'typeProperties.encryptedCredential', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AzureBlobStorageLinkedService; diff --git a/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js index ba40fa2d6e..22f7b746f5 100644 --- a/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js +++ b/lib/services/datafactoryManagement/lib/models/azureStorageLinkedService.js @@ -26,7 +26,7 @@ class AzureStorageLinkedService extends models['LinkedService'] { * @member {object} [sasUri] SAS URI of the Azure Storage resource. It is * mutually exclusive with connectionString property. * @member {string} [sasUri.type] Polymorphic Discriminator - * @member {object} [encryptedCredential] The encrypted credential used for + * @member {string} [encryptedCredential] The encrypted credential used for * authentication. Credentials are encrypted using the integration runtime * credential manager. Type: string (or Expression with resultType string). */ @@ -129,7 +129,7 @@ class AzureStorageLinkedService extends models['LinkedService'] { required: false, serializedName: 'typeProperties.encryptedCredential', type: { - name: 'Object' + name: 'String' } } } diff --git a/lib/services/datafactoryManagement/lib/models/azureTableStorageLinkedService.js b/lib/services/datafactoryManagement/lib/models/azureTableStorageLinkedService.js new file mode 100644 index 0000000000..0f41c36d0f --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/azureTableStorageLinkedService.js @@ -0,0 +1,141 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The azure table storage linked service. + * + * @extends models['LinkedService'] + */ +class AzureTableStorageLinkedService extends models['LinkedService'] { + /** + * Create a AzureTableStorageLinkedService. + * @member {object} [connectionString] The connection string. It is mutually + * 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 + * @member {string} [encryptedCredential] The encrypted credential used for + * authentication. Credentials are encrypted using the integration runtime + * credential manager. Type: string (or Expression with resultType string). + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AzureTableStorageLinkedService + * + * @returns {object} metadata of AzureTableStorageLinkedService + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureTableStorage', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'LinkedService', + className: 'AzureTableStorageLinkedService', + modelProperties: { + connectVia: { + required: false, + serializedName: 'connectVia', + type: { + name: 'Composite', + className: 'IntegrationRuntimeReference' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + parameters: { + required: false, + serializedName: 'parameters', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ParameterSpecificationElementType', + type: { + name: 'Composite', + className: 'ParameterSpecification' + } + } + } + }, + annotations: { + required: false, + serializedName: 'annotations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + connectionString: { + required: false, + serializedName: 'typeProperties.connectionString', + type: { + name: 'Object' + } + }, + sasUri: { + required: false, + serializedName: 'typeProperties.sasUri', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'SecretBase', + className: 'SecretBase' + } + }, + encryptedCredential: { + required: false, + serializedName: 'typeProperties.encryptedCredential', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AzureTableStorageLinkedService; diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index e9c563a284..4f9f3f21f8 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -3471,6 +3471,65 @@ export interface AzureSqlDWLinkedService extends LinkedService { encryptedCredential?: any; } +/** + * @class + * Initializes a new instance of the AzureTableStorageLinkedService class. + * @constructor + * The azure table storage linked service. + * + * @member {object} [connectionString] The connection string. It is mutually + * 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 + * @member {string} [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 AzureTableStorageLinkedService extends LinkedService { + connectionString?: any; + sasUri?: SecretBase; + encryptedCredential?: string; +} + +/** + * @class + * Initializes a new instance of the AzureBlobStorageLinkedService class. + * @constructor + * The azure blob storage linked service. + * + * @member {object} [connectionString] The connection string. It is mutually + * exclusive with sasUri, serviceEndpoint property. Type: string, SecureString + * or AzureKeyVaultSecretReference. + * @member {object} [sasUri] SAS URI of the Azure Blob Storage resource. It is + * mutually exclusive with connectionString, serviceEndpoint property. + * @member {string} [sasUri.type] Polymorphic Discriminator + * @member {string} [serviceEndpoint] Blob service endpoint of the Azure Blob + * Storage resource. It is mutually exclusive with connectionString, sasUri + * property. + * @member {object} [servicePrincipalId] The ID of the service principal used + * to authenticate against Azure SQL Data Warehouse. Type: string (or + * Expression with resultType string). + * @member {object} [servicePrincipalKey] The key of the service principal used + * to authenticate against Azure SQL Data Warehouse. + * @member {string} [servicePrincipalKey.type] Polymorphic Discriminator + * @member {object} [tenant] The name or ID of the tenant to which the service + * principal belongs. Type: string (or Expression with resultType string). + * @member {string} [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 AzureBlobStorageLinkedService extends LinkedService { + connectionString?: any; + sasUri?: SecretBase; + serviceEndpoint?: string; + servicePrincipalId?: any; + servicePrincipalKey?: SecretBase; + tenant?: any; + encryptedCredential?: string; +} + /** * @class * Initializes a new instance of the AzureStorageLinkedService class. @@ -3483,14 +3542,14 @@ export interface AzureSqlDWLinkedService extends LinkedService { * @member {object} [sasUri] SAS URI of the Azure Storage resource. It is * mutually exclusive with connectionString property. * @member {string} [sasUri.type] Polymorphic Discriminator - * @member {object} [encryptedCredential] The encrypted credential used for + * @member {string} [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 AzureStorageLinkedService extends LinkedService { connectionString?: any; sasUri?: SecretBase; - encryptedCredential?: any; + encryptedCredential?: string; } /** diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 2e5a964ac4..dc0dc7ee2c 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -146,6 +146,8 @@ exports.AzureBatchLinkedService = require('./azureBatchLinkedService'); exports.AzureSqlDatabaseLinkedService = require('./azureSqlDatabaseLinkedService'); exports.SqlServerLinkedService = require('./sqlServerLinkedService'); exports.AzureSqlDWLinkedService = require('./azureSqlDWLinkedService'); +exports.AzureTableStorageLinkedService = require('./azureTableStorageLinkedService'); +exports.AzureBlobStorageLinkedService = require('./azureBlobStorageLinkedService'); exports.AzureStorageLinkedService = require('./azureStorageLinkedService'); exports.ResponsysObjectDataset = require('./responsysObjectDataset'); exports.SalesforceMarketingCloudObjectDataset = require('./salesforceMarketingCloudObjectDataset'); @@ -443,6 +445,8 @@ exports.discriminators = { 'LinkedService.AzureSqlDatabase' : exports.AzureSqlDatabaseLinkedService, 'LinkedService.SqlServer' : exports.SqlServerLinkedService, 'LinkedService.AzureSqlDW' : exports.AzureSqlDWLinkedService, + 'LinkedService.AzureTableStorage' : exports.AzureTableStorageLinkedService, + 'LinkedService.AzureBlobStorage' : exports.AzureBlobStorageLinkedService, 'LinkedService.AzureStorage' : exports.AzureStorageLinkedService, 'Dataset.ResponsysObject' : exports.ResponsysObjectDataset, 'Dataset.SalesforceMarketingCloudObject' : exports.SalesforceMarketingCloudObjectDataset,