Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR datafactory/resource-manager] Refactor delete activity payload #4328

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 56 additions & 3 deletions lib/services/datafactoryManagement/lib/models/deleteActivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@ const models = require('./index');
class DeleteActivity extends models['ExecutionActivity'] {
/**
* Create a DeleteActivity.
* @property {object} [recursive] If true, files under the folder path will
* be deleted recursively. Default is true. Type: boolean (or Expression with
* resultType boolean).
* @property {object} [recursive] If true, files or sub-folders under current
* folder path will be deleted recursively. Default is false. Type: boolean
* (or Expression with resultType boolean).
* @property {number} [maxConcurrentConnections] The max concurrent
* connections to connect data source at the same time.
* @property {object} [enableLogging] Whether to record detailed logs of
* delete-activity execution. Default value is false. Type: boolean (or
* Expression with resultType boolean).
* @property {object} [logStorageSettings] Log storage settings customer need
* to provide when enableLogging is true.
* @property {object} [logStorageSettings.linkedServiceName] Log storage
* linked service reference.
* @property {string} [logStorageSettings.linkedServiceName.referenceName]
* Reference LinkedService name.
* @property {object} [logStorageSettings.linkedServiceName.parameters]
* Arguments for LinkedService.
* @property {object} [logStorageSettings.path] The path to storage for
* storing detailed logs of activity execution. Type: string (or Expression
* with resultType string).
* @property {object} dataset Delete activity dataset reference.
* @property {string} [dataset.referenceName] Reference dataset name.
* @property {object} [dataset.parameters] Arguments for dataset.
Expand Down Expand Up @@ -149,6 +165,43 @@ class DeleteActivity extends models['ExecutionActivity'] {
name: 'Object'
}
},
maxConcurrentConnections: {
required: false,
serializedName: 'typeProperties.maxConcurrentConnections',
constraints: {
InclusiveMinimum: 1
},
type: {
name: 'Number'
}
},
enableLogging: {
required: false,
serializedName: 'typeProperties.enableLogging',
type: {
name: 'Object'
}
},
logStorageSettings: {
required: false,
serializedName: 'typeProperties.logStorageSettings',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'LogStorageSettings'
}
},
dataset: {
required: true,
serializedName: 'typeProperties.dataset',
Expand Down
36 changes: 34 additions & 2 deletions lib/services/datafactoryManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6102,15 +6102,47 @@ export interface LookupActivity extends ExecutionActivity {
firstRowOnly?: any;
}

/**
* Log storage settings.
*/
export interface LogStorageSettings {
/**
* Log storage linked service reference.
*/
linkedServiceName: LinkedServiceReference;
/**
* The path to storage for storing detailed logs of activity execution. Type: string (or
* Expression with resultType string).
*/
path?: any;
/**
* Describes unknown properties. The value of an unknown property can be of "any" type.
*/
[additionalPropertyName: string]: any;
}

/**
* Delete activity.
*/
export interface DeleteActivity extends ExecutionActivity {
/**
* If true, files under the folder path will be deleted recursively. Default is true. Type:
* boolean (or Expression with resultType boolean).
* If true, files or sub-folders under current folder path will be deleted recursively. Default
* is false. Type: boolean (or Expression with resultType boolean).
*/
recursive?: any;
/**
* The max concurrent connections to connect data source at the same time.
*/
maxConcurrentConnections?: number;
/**
* Whether to record detailed logs of delete-activity execution. Default value is false. Type:
* boolean (or Expression with resultType boolean).
*/
enableLogging?: any;
/**
* Log storage settings customer need to provide when enableLogging is true.
*/
logStorageSettings?: LogStorageSettings;
/**
* Delete activity dataset reference.
*/
Expand Down
1 change: 1 addition & 0 deletions lib/services/datafactoryManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ exports.DocumentDbCollectionSource = require('./documentDbCollectionSource');
exports.BlobSource = require('./blobSource');
exports.AzureTableSource = require('./azureTableSource');
exports.LookupActivity = require('./lookupActivity');
exports.LogStorageSettings = require('./logStorageSettings');
exports.DeleteActivity = require('./deleteActivity');
exports.SqlServerStoredProcedureActivity = require('./sqlServerStoredProcedureActivity');
exports.CustomActivityReferenceObject = require('./customActivityReferenceObject');
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

/**
* Log storage settings.
*
*/
class LogStorageSettings {
/**
* Create a LogStorageSettings.
* @property {object} linkedServiceName Log storage linked service reference.
* @property {string} [linkedServiceName.referenceName] Reference
* LinkedService name.
* @property {object} [linkedServiceName.parameters] Arguments for
* LinkedService.
* @property {object} [path] The path to storage for storing detailed logs of
* activity execution. Type: string (or Expression with resultType string).
*/
constructor() {
}

/**
* Defines the metadata of LogStorageSettings
*
* @returns {object} metadata of LogStorageSettings
*
*/
mapper() {
return {
required: false,
serializedName: 'LogStorageSettings',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'LogStorageSettings',
modelProperties: {
linkedServiceName: {
required: true,
serializedName: 'linkedServiceName',
defaultValue: {},
type: {
name: 'Composite',
className: 'LinkedServiceReference'
}
},
path: {
required: false,
serializedName: 'path',
type: {
name: 'Object'
}
}
}
}
};
}
}

module.exports = LogStorageSettings;