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

[AutoPR datafactory/resource-manager] [DataFactory] blob events trigger #2832

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
137 changes: 137 additions & 0 deletions lib/services/datafactoryManagement/lib/models/blobEventsTrigger.js
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
67 changes: 31 additions & 36 deletions lib/services/datafactoryManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -2941,7 +2939,6 @@ export interface AzureMLLinkedService extends LinkedService {
*/
export interface TeradataLinkedService extends LinkedService {
server: any;
schema?: any;
authenticationType?: string;
username?: any;
password?: SecretBase;
Expand All @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions lib/services/datafactoryManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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: {
Expand Down
Loading