diff --git a/sdk/datashare/arm-datashare/README.md b/sdk/datashare/arm-datashare/README.md index f3556daa99f2..23f73e434cb1 100644 --- a/sdk/datashare/arm-datashare/README.md +++ b/sdk/datashare/arm-datashare/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-datashare ### How to use -#### nodejs - Authentication, client creation and get accounts as an example written in TypeScript. +#### nodejs - Authentication, client creation and listBySubscription accounts as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -35,9 +35,8 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new DataShareManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const accountName = "testaccountName"; - client.accounts.get(resourceGroupName, accountName).then((result) => { + const skipToken = "testskipToken"; + client.accounts.listBySubscription(skipToken).then((result) => { console.log("The result is:"); console.log(result); }); @@ -46,7 +45,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and get accounts as an example written in JavaScript. +#### browser - Authentication, client creation and listBySubscription accounts as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth @@ -80,9 +79,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmDatashare.DataShareManagementClient(res.creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const accountName = "testaccountName"; - client.accounts.get(resourceGroupName, accountName).then((result) => { + const skipToken = "testskipToken"; + client.accounts.listBySubscription(skipToken).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/datashare/arm-datashare/src/models/index.ts b/sdk/datashare/arm-datashare/src/models/index.ts index e836a0b1c16b..c56f270c7738 100644 --- a/sdk/datashare/arm-datashare/src/models/index.ts +++ b/sdk/datashare/arm-datashare/src/models/index.ts @@ -123,16 +123,6 @@ export interface DataShareError { error: DataShareErrorInfo; } -/** - * Update parameters for accounts - */ -export interface AccountUpdateParameters { - /** - * Tags on the azure resource. - */ - tags?: { [propertyName: string]: string }; -} - /** * Response for long running operation */ @@ -156,6 +146,16 @@ export interface OperationResponse { status: Status; } +/** + * Update parameters for accounts + */ +export interface AccountUpdateParameters { + /** + * Tags on the azure resource. + */ + tags?: { [propertyName: string]: string }; +} + /** * Base data transfer object implementation for proxy resources. */ @@ -504,45 +504,6 @@ export interface OperationModel { serviceSpecification?: OperationMetaServiceSpecification; } -/** - * A share data transfer object. - */ -export interface Share extends ProxyDto { - /** - * Time at which the share was created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly createdAt?: Date; - /** - * Share description. - */ - description?: string; - /** - * Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', - * 'Deleting', 'Moving', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState; - /** - * Share kind. Possible values include: 'CopyBased', 'InPlace' - */ - shareKind?: ShareKind; - /** - * Share terms. - */ - terms?: string; - /** - * Email of the user who created the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly userEmail?: string; - /** - * Name of the user who created the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly userName?: string; -} - /** * A ShareSynchronization data transfer object. */ @@ -726,79 +687,82 @@ export interface ProviderShareSubscription extends ProxyDto { } /** - * A share subscription data transfer object. + * A share data transfer object. */ -export interface ShareSubscription extends ProxyDto { +export interface Share extends ProxyDto { /** - * Time at which the share subscription was created. + * Time at which the share was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly createdAt?: Date; /** - * The invitation id. + * Share description. */ - invitationId: string; + description?: string; /** - * Email of the provider who created the resource + * Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', + * 'Deleting', 'Moving', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly providerEmail?: string; + readonly provisioningState?: ProvisioningState; /** - * Name of the provider who created the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Share kind. Possible values include: 'CopyBased', 'InPlace' */ - readonly providerName?: string; + shareKind?: ShareKind; /** - * Tenant name of the provider who created the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Share terms. */ - readonly providerTenantName?: string; + terms?: string; /** - * Provisioning state of the share subscription. Possible values include: 'Succeeded', - * 'Creating', 'Deleting', 'Moving', 'Failed' + * Email of the user who created the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly provisioningState?: ProvisioningState; + readonly userEmail?: string; /** - * Description of share + * Name of the user who created the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly shareDescription?: string; + readonly userName?: string; +} + +/** + * A ShareSubscriptionSynchronization data transfer object. + */ +export interface ShareSubscriptionSynchronization { /** - * Kind of share. Possible values include: 'CopyBased', 'InPlace' + * Synchronization duration * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly shareKind?: ShareKind; + readonly durationMs?: number; /** - * Name of the share + * End time of synchronization * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly shareName?: string; + readonly endTime?: Date; /** - * Gets the current status of share subscription. Possible values include: 'Active', 'Revoked', - * 'SourceDeleted', 'Revoking' + * message of Synchronization * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly shareSubscriptionStatus?: ShareSubscriptionStatus; + readonly message?: string; /** - * Terms of a share + * start time of synchronization * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly shareTerms?: string; + readonly startTime?: Date; /** - * Source share location. + * Raw Status + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sourceShareLocation: string; + readonly status?: string; /** - * Email of the user who created the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Synchronization id */ - readonly userEmail?: string; + synchronizationId: string; /** - * Name of the user who created the resource + * Synchronization Mode. Possible values include: 'Incremental', 'FullSync' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly userName?: string; + readonly synchronizationMode?: SynchronizationMode; } /** @@ -850,54 +814,90 @@ export interface SourceShareSynchronizationSetting { } /** - * A ShareSubscriptionSynchronization data transfer object. + * Payload for the synchronizing the data. */ -export interface ShareSubscriptionSynchronization { +export interface Synchronize { /** - * Synchronization duration + * Mode of synchronization used in triggers and snapshot sync. Incremental by default. Possible + * values include: 'Incremental', 'FullSync' + */ + synchronizationMode?: SynchronizationMode; +} + +/** + * A share subscription data transfer object. + */ +export interface ShareSubscription extends ProxyDto { + /** + * Time at which the share subscription was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly durationMs?: number; + readonly createdAt?: Date; /** - * End time of synchronization + * The invitation id. + */ + invitationId: string; + /** + * Email of the provider who created the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly endTime?: Date; + readonly providerEmail?: string; /** - * message of Synchronization + * Name of the provider who created the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly message?: string; + readonly providerName?: string; /** - * start time of synchronization + * Tenant name of the provider who created the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly startTime?: Date; + readonly providerTenantName?: string; /** - * Raw Status + * Provisioning state of the share subscription. Possible values include: 'Succeeded', + * 'Creating', 'Deleting', 'Moving', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: string; + readonly provisioningState?: ProvisioningState; /** - * Synchronization id + * Description of share + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - synchronizationId: string; + readonly shareDescription?: string; /** - * Synchronization Mode. Possible values include: 'Incremental', 'FullSync' + * Kind of share. Possible values include: 'CopyBased', 'InPlace' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly synchronizationMode?: SynchronizationMode; -} - -/** - * Payload for the synchronizing the data. - */ -export interface Synchronize { + readonly shareKind?: ShareKind; /** - * Mode of synchronization used in triggers and snapshot sync. Incremental by default. Possible - * values include: 'Incremental', 'FullSync' + * Name of the share + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - synchronizationMode?: SynchronizationMode; + readonly shareName?: string; + /** + * Gets the current status of share subscription. Possible values include: 'Active', 'Revoked', + * 'SourceDeleted', 'Revoking' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly shareSubscriptionStatus?: ShareSubscriptionStatus; + /** + * Terms of a share + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly shareTerms?: string; + /** + * Source share location. + */ + sourceShareLocation: string; + /** + * Email of the user who created the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userEmail?: string; + /** + * Name of the user who created the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userName?: string; } /** @@ -2313,9 +2313,9 @@ export interface InvitationsListByShareOptionalParams extends msRest.RequestOpti /** * Optional Parameters. */ -export interface SharesListByAccountOptionalParams extends msRest.RequestOptionsBase { +export interface SharesListSynchronizationDetailsOptionalParams extends msRest.RequestOptionsBase { /** - * Continuation Token + * Continuation token */ skipToken?: string; /** @@ -2349,9 +2349,9 @@ export interface SharesListSynchronizationsOptionalParams extends msRest.Request /** * Optional Parameters. */ -export interface SharesListSynchronizationDetailsOptionalParams extends msRest.RequestOptionsBase { +export interface SharesListByAccountOptionalParams extends msRest.RequestOptionsBase { /** - * Continuation token + * Continuation Token */ skipToken?: string; /** @@ -2377,29 +2377,29 @@ export interface ProviderShareSubscriptionsListByShareOptionalParams extends msR /** * Optional Parameters. */ -export interface ShareSubscriptionsListByAccountOptionalParams extends msRest.RequestOptionsBase { +export interface ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams extends msRest.RequestOptionsBase { /** - * Continuation Token + * Continuation token */ skipToken?: string; - /** - * Filters the results using OData syntax. - */ - filter?: string; - /** - * Sorts the results using OData syntax. - */ - orderby?: string; } /** * Optional Parameters. */ -export interface ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams extends msRest.RequestOptionsBase { +export interface ShareSubscriptionsListSynchronizationDetailsOptionalParams extends msRest.RequestOptionsBase { /** * Continuation token */ skipToken?: string; + /** + * Filters the results using OData syntax. + */ + filter?: string; + /** + * Sorts the results using OData syntax. + */ + orderby?: string; } /** @@ -2423,9 +2423,9 @@ export interface ShareSubscriptionsListSynchronizationsOptionalParams extends ms /** * Optional Parameters. */ -export interface ShareSubscriptionsListSynchronizationDetailsOptionalParams extends msRest.RequestOptionsBase { +export interface ShareSubscriptionsListByAccountOptionalParams extends msRest.RequestOptionsBase { /** - * Continuation token + * Continuation Token */ skipToken?: string; /** @@ -2549,10 +2549,10 @@ export interface OperationList extends Array { /** * @interface - * List response for get Shares. - * @extends Array + * details of synchronization + * @extends Array */ -export interface ShareList extends Array { +export interface SynchronizationDetailsList extends Array { /** * The Url of next result page. */ @@ -2573,10 +2573,10 @@ export interface ShareSynchronizationList extends Array { /** * @interface - * details of synchronization - * @extends Array + * List response for get Shares. + * @extends Array */ -export interface SynchronizationDetailsList extends Array { +export interface ShareList extends Array { /** * The Url of next result page. */ @@ -2597,10 +2597,10 @@ export interface ProviderShareSubscriptionList extends Array + * List response for get source share Synchronization settings + * @extends Array */ -export interface ShareSubscriptionList extends Array { +export interface SourceShareSynchronizationSettingList extends Array { /** * The Url of next result page. */ @@ -2609,10 +2609,10 @@ export interface ShareSubscriptionList extends Array { /** * @interface - * List response for get source share Synchronization settings - * @extends Array + * A consumer side list of share subscription synchronizations + * @extends Array */ -export interface SourceShareSynchronizationSettingList extends Array { +export interface ShareSubscriptionSynchronizationList extends Array { /** * The Url of next result page. */ @@ -2621,10 +2621,10 @@ export interface SourceShareSynchronizationSettingList extends Array + * List response for get ShareSubscription. + * @extends Array */ -export interface ShareSubscriptionSynchronizationList extends Array { +export interface ShareSubscriptionList extends Array { /** * The Url of next result page. */ @@ -2700,14 +2700,6 @@ export type Status = 'Accepted' | 'InProgress' | 'TransientFailure' | 'Succeeded */ export type InvitationStatus = 'Pending' | 'Accepted' | 'Rejected' | 'Withdrawn'; -/** - * Defines values for ShareKind. - * Possible values include: 'CopyBased', 'InPlace' - * @readonly - * @enum {string} - */ -export type ShareKind = 'CopyBased' | 'InPlace'; - /** * Defines values for SynchronizationMode. * Possible values include: 'Incremental', 'FullSync' @@ -2734,6 +2726,14 @@ export type DataSetType = 'Blob' | 'Container' | 'BlobFolder' | 'AdlsGen2FileSys */ export type ShareSubscriptionStatus = 'Active' | 'Revoked' | 'SourceDeleted' | 'Revoking'; +/** + * Defines values for ShareKind. + * Possible values include: 'CopyBased', 'InPlace' + * @readonly + * @enum {string} + */ +export type ShareKind = 'CopyBased' | 'InPlace'; + /** * Defines values for RecurrenceInterval. * Possible values include: 'Hour', 'Day' @@ -2767,9 +2767,9 @@ export type DataSetMappingStatus = 'Ok' | 'Broken'; export type OutputType = 'Csv' | 'Parquet'; /** - * Contains response data for the get operation. + * Contains response data for the listBySubscription operation. */ -export type AccountsGetResponse = Account & { +export type AccountsListBySubscriptionResponse = AccountList & { /** * The underlying HTTP response. */ @@ -2782,14 +2782,14 @@ export type AccountsGetResponse = Account & { /** * The response body as parsed JSON or XML */ - parsedBody: Account; + parsedBody: AccountList; }; }; /** - * Contains response data for the create operation. + * Contains response data for the get operation. */ -export type AccountsCreateResponse = Account & { +export type AccountsGetResponse = Account & { /** * The underlying HTTP response. */ @@ -2807,9 +2807,9 @@ export type AccountsCreateResponse = Account & { }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the create operation. */ -export type AccountsDeleteMethodResponse = OperationResponse & { +export type AccountsCreateResponse = Account & { /** * The underlying HTTP response. */ @@ -2822,14 +2822,14 @@ export type AccountsDeleteMethodResponse = OperationResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationResponse; + parsedBody: Account; }; }; /** - * Contains response data for the update operation. + * Contains response data for the deleteMethod operation. */ -export type AccountsUpdateResponse = Account & { +export type AccountsDeleteMethodResponse = OperationResponse & { /** * The underlying HTTP response. */ @@ -2842,14 +2842,14 @@ export type AccountsUpdateResponse = Account & { /** * The response body as parsed JSON or XML */ - parsedBody: Account; + parsedBody: OperationResponse; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the update operation. */ -export type AccountsListBySubscriptionResponse = AccountList & { +export type AccountsUpdateResponse = Account & { /** * The underlying HTTP response. */ @@ -2862,7 +2862,7 @@ export type AccountsListBySubscriptionResponse = AccountList & { /** * The response body as parsed JSON or XML */ - parsedBody: AccountList; + parsedBody: Account; }; }; @@ -2967,9 +2967,9 @@ export type AccountsListByResourceGroupNextResponse = AccountList & { }; /** - * Contains response data for the rejectInvitation operation. + * Contains response data for the listInvitations operation. */ -export type ConsumerInvitationsRejectInvitationResponse = ConsumerInvitation & { +export type ConsumerInvitationsListInvitationsResponse = ConsumerInvitationList & { /** * The underlying HTTP response. */ @@ -2982,7 +2982,7 @@ export type ConsumerInvitationsRejectInvitationResponse = ConsumerInvitation & { /** * The response body as parsed JSON or XML */ - parsedBody: ConsumerInvitation; + parsedBody: ConsumerInvitationList; }; }; @@ -3007,9 +3007,9 @@ export type ConsumerInvitationsGetResponse = ConsumerInvitation & { }; /** - * Contains response data for the listInvitations operation. + * Contains response data for the rejectInvitation operation. */ -export type ConsumerInvitationsListInvitationsResponse = ConsumerInvitationList & { +export type ConsumerInvitationsRejectInvitationResponse = ConsumerInvitation & { /** * The underlying HTTP response. */ @@ -3022,7 +3022,7 @@ export type ConsumerInvitationsListInvitationsResponse = ConsumerInvitationList /** * The response body as parsed JSON or XML */ - parsedBody: ConsumerInvitationList; + parsedBody: ConsumerInvitation; }; }; @@ -3327,9 +3327,9 @@ export type OperationsListNextResponse = OperationList & { }; /** - * Contains response data for the get operation. + * Contains response data for the listSynchronizationDetails operation. */ -export type SharesGetResponse = Share & { +export type SharesListSynchronizationDetailsResponse = SynchronizationDetailsList & { /** * The underlying HTTP response. */ @@ -3342,14 +3342,14 @@ export type SharesGetResponse = Share & { /** * The response body as parsed JSON or XML */ - parsedBody: Share; + parsedBody: SynchronizationDetailsList; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listSynchronizations operation. */ -export type SharesCreateResponse = Share & { +export type SharesListSynchronizationsResponse = ShareSynchronizationList & { /** * The underlying HTTP response. */ @@ -3362,14 +3362,14 @@ export type SharesCreateResponse = Share & { /** * The response body as parsed JSON or XML */ - parsedBody: Share; + parsedBody: ShareSynchronizationList; }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the get operation. */ -export type SharesDeleteMethodResponse = OperationResponse & { +export type SharesGetResponse = Share & { /** * The underlying HTTP response. */ @@ -3382,14 +3382,14 @@ export type SharesDeleteMethodResponse = OperationResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationResponse; + parsedBody: Share; }; }; /** - * Contains response data for the listByAccount operation. + * Contains response data for the create operation. */ -export type SharesListByAccountResponse = ShareList & { +export type SharesCreateResponse = Share & { /** * The underlying HTTP response. */ @@ -3402,14 +3402,14 @@ export type SharesListByAccountResponse = ShareList & { /** * The response body as parsed JSON or XML */ - parsedBody: ShareList; + parsedBody: Share; }; }; /** - * Contains response data for the listSynchronizations operation. + * Contains response data for the deleteMethod operation. */ -export type SharesListSynchronizationsResponse = ShareSynchronizationList & { +export type SharesDeleteMethodResponse = OperationResponse & { /** * The underlying HTTP response. */ @@ -3422,14 +3422,14 @@ export type SharesListSynchronizationsResponse = ShareSynchronizationList & { /** * The response body as parsed JSON or XML */ - parsedBody: ShareSynchronizationList; + parsedBody: OperationResponse; }; }; /** - * Contains response data for the listSynchronizationDetails operation. + * Contains response data for the listByAccount operation. */ -export type SharesListSynchronizationDetailsResponse = SynchronizationDetailsList & { +export type SharesListByAccountResponse = ShareList & { /** * The underlying HTTP response. */ @@ -3442,7 +3442,7 @@ export type SharesListSynchronizationDetailsResponse = SynchronizationDetailsLis /** * The response body as parsed JSON or XML */ - parsedBody: SynchronizationDetailsList; + parsedBody: ShareList; }; }; @@ -3467,9 +3467,9 @@ export type SharesBeginDeleteMethodResponse = OperationResponse & { }; /** - * Contains response data for the listByAccountNext operation. + * Contains response data for the listSynchronizationDetailsNext operation. */ -export type SharesListByAccountNextResponse = ShareList & { +export type SharesListSynchronizationDetailsNextResponse = SynchronizationDetailsList & { /** * The underlying HTTP response. */ @@ -3482,7 +3482,7 @@ export type SharesListByAccountNextResponse = ShareList & { /** * The response body as parsed JSON or XML */ - parsedBody: ShareList; + parsedBody: SynchronizationDetailsList; }; }; @@ -3507,9 +3507,9 @@ export type SharesListSynchronizationsNextResponse = ShareSynchronizationList & }; /** - * Contains response data for the listSynchronizationDetailsNext operation. + * Contains response data for the listByAccountNext operation. */ -export type SharesListSynchronizationDetailsNextResponse = SynchronizationDetailsList & { +export type SharesListByAccountNextResponse = ShareList & { /** * The underlying HTTP response. */ @@ -3522,14 +3522,14 @@ export type SharesListSynchronizationDetailsNextResponse = SynchronizationDetail /** * The response body as parsed JSON or XML */ - parsedBody: SynchronizationDetailsList; + parsedBody: ShareList; }; }; /** - * Contains response data for the getByShare operation. + * Contains response data for the reinstate operation. */ -export type ProviderShareSubscriptionsGetByShareResponse = ProviderShareSubscription & { +export type ProviderShareSubscriptionsReinstateResponse = ProviderShareSubscription & { /** * The underlying HTTP response. */ @@ -3547,9 +3547,9 @@ export type ProviderShareSubscriptionsGetByShareResponse = ProviderShareSubscrip }; /** - * Contains response data for the listByShare operation. + * Contains response data for the revoke operation. */ -export type ProviderShareSubscriptionsListByShareResponse = ProviderShareSubscriptionList & { +export type ProviderShareSubscriptionsRevokeResponse = ProviderShareSubscription & { /** * The underlying HTTP response. */ @@ -3562,14 +3562,14 @@ export type ProviderShareSubscriptionsListByShareResponse = ProviderShareSubscri /** * The response body as parsed JSON or XML */ - parsedBody: ProviderShareSubscriptionList; + parsedBody: ProviderShareSubscription; }; }; /** - * Contains response data for the revoke operation. + * Contains response data for the getByShare operation. */ -export type ProviderShareSubscriptionsRevokeResponse = ProviderShareSubscription & { +export type ProviderShareSubscriptionsGetByShareResponse = ProviderShareSubscription & { /** * The underlying HTTP response. */ @@ -3587,9 +3587,9 @@ export type ProviderShareSubscriptionsRevokeResponse = ProviderShareSubscription }; /** - * Contains response data for the reinstate operation. + * Contains response data for the listByShare operation. */ -export type ProviderShareSubscriptionsReinstateResponse = ProviderShareSubscription & { +export type ProviderShareSubscriptionsListByShareResponse = ProviderShareSubscriptionList & { /** * The underlying HTTP response. */ @@ -3602,7 +3602,7 @@ export type ProviderShareSubscriptionsReinstateResponse = ProviderShareSubscript /** * The response body as parsed JSON or XML */ - parsedBody: ProviderShareSubscription; + parsedBody: ProviderShareSubscriptionList; }; }; @@ -3647,9 +3647,9 @@ export type ProviderShareSubscriptionsListByShareNextResponse = ProviderShareSub }; /** - * Contains response data for the get operation. + * Contains response data for the cancelSynchronization operation. */ -export type ShareSubscriptionsGetResponse = ShareSubscription & { +export type ShareSubscriptionsCancelSynchronizationResponse = ShareSubscriptionSynchronization & { /** * The underlying HTTP response. */ @@ -3662,14 +3662,14 @@ export type ShareSubscriptionsGetResponse = ShareSubscription & { /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscription; + parsedBody: ShareSubscriptionSynchronization; }; }; /** - * Contains response data for the create operation. + * Contains response data for the listSourceShareSynchronizationSettings operation. */ -export type ShareSubscriptionsCreateResponse = ShareSubscription & { +export type ShareSubscriptionsListSourceShareSynchronizationSettingsResponse = SourceShareSynchronizationSettingList & { /** * The underlying HTTP response. */ @@ -3682,14 +3682,14 @@ export type ShareSubscriptionsCreateResponse = ShareSubscription & { /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscription; + parsedBody: SourceShareSynchronizationSettingList; }; }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the listSynchronizationDetails operation. */ -export type ShareSubscriptionsDeleteMethodResponse = OperationResponse & { +export type ShareSubscriptionsListSynchronizationDetailsResponse = SynchronizationDetailsList & { /** * The underlying HTTP response. */ @@ -3702,14 +3702,14 @@ export type ShareSubscriptionsDeleteMethodResponse = OperationResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationResponse; + parsedBody: SynchronizationDetailsList; }; }; /** - * Contains response data for the listByAccount operation. + * Contains response data for the listSynchronizations operation. */ -export type ShareSubscriptionsListByAccountResponse = ShareSubscriptionList & { +export type ShareSubscriptionsListSynchronizationsResponse = ShareSubscriptionSynchronizationList & { /** * The underlying HTTP response. */ @@ -3722,14 +3722,14 @@ export type ShareSubscriptionsListByAccountResponse = ShareSubscriptionList & { /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscriptionList; + parsedBody: ShareSubscriptionSynchronizationList; }; }; /** - * Contains response data for the listSourceShareSynchronizationSettings operation. + * Contains response data for the synchronizeMethod operation. */ -export type ShareSubscriptionsListSourceShareSynchronizationSettingsResponse = SourceShareSynchronizationSettingList & { +export type ShareSubscriptionsSynchronizeMethodResponse = ShareSubscriptionSynchronization & { /** * The underlying HTTP response. */ @@ -3742,14 +3742,14 @@ export type ShareSubscriptionsListSourceShareSynchronizationSettingsResponse = S /** * The response body as parsed JSON or XML */ - parsedBody: SourceShareSynchronizationSettingList; + parsedBody: ShareSubscriptionSynchronization; }; }; /** - * Contains response data for the listSynchronizations operation. + * Contains response data for the get operation. */ -export type ShareSubscriptionsListSynchronizationsResponse = ShareSubscriptionSynchronizationList & { +export type ShareSubscriptionsGetResponse = ShareSubscription & { /** * The underlying HTTP response. */ @@ -3762,14 +3762,14 @@ export type ShareSubscriptionsListSynchronizationsResponse = ShareSubscriptionSy /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscriptionSynchronizationList; + parsedBody: ShareSubscription; }; }; /** - * Contains response data for the listSynchronizationDetails operation. + * Contains response data for the create operation. */ -export type ShareSubscriptionsListSynchronizationDetailsResponse = SynchronizationDetailsList & { +export type ShareSubscriptionsCreateResponse = ShareSubscription & { /** * The underlying HTTP response. */ @@ -3782,14 +3782,14 @@ export type ShareSubscriptionsListSynchronizationDetailsResponse = Synchronizati /** * The response body as parsed JSON or XML */ - parsedBody: SynchronizationDetailsList; + parsedBody: ShareSubscription; }; }; /** - * Contains response data for the synchronizeMethod operation. + * Contains response data for the deleteMethod operation. */ -export type ShareSubscriptionsSynchronizeMethodResponse = ShareSubscriptionSynchronization & { +export type ShareSubscriptionsDeleteMethodResponse = OperationResponse & { /** * The underlying HTTP response. */ @@ -3802,14 +3802,14 @@ export type ShareSubscriptionsSynchronizeMethodResponse = ShareSubscriptionSynch /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscriptionSynchronization; + parsedBody: OperationResponse; }; }; /** - * Contains response data for the cancelSynchronization operation. + * Contains response data for the listByAccount operation. */ -export type ShareSubscriptionsCancelSynchronizationResponse = ShareSubscriptionSynchronization & { +export type ShareSubscriptionsListByAccountResponse = ShareSubscriptionList & { /** * The underlying HTTP response. */ @@ -3822,14 +3822,14 @@ export type ShareSubscriptionsCancelSynchronizationResponse = ShareSubscriptionS /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscriptionSynchronization; + parsedBody: ShareSubscriptionList; }; }; /** - * Contains response data for the beginDeleteMethod operation. + * Contains response data for the beginCancelSynchronization operation. */ -export type ShareSubscriptionsBeginDeleteMethodResponse = OperationResponse & { +export type ShareSubscriptionsBeginCancelSynchronizationResponse = ShareSubscriptionSynchronization & { /** * The underlying HTTP response. */ @@ -3842,7 +3842,7 @@ export type ShareSubscriptionsBeginDeleteMethodResponse = OperationResponse & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationResponse; + parsedBody: ShareSubscriptionSynchronization; }; }; @@ -3867,9 +3867,9 @@ export type ShareSubscriptionsBeginSynchronizeMethodResponse = ShareSubscription }; /** - * Contains response data for the beginCancelSynchronization operation. + * Contains response data for the beginDeleteMethod operation. */ -export type ShareSubscriptionsBeginCancelSynchronizationResponse = ShareSubscriptionSynchronization & { +export type ShareSubscriptionsBeginDeleteMethodResponse = OperationResponse & { /** * The underlying HTTP response. */ @@ -3882,14 +3882,14 @@ export type ShareSubscriptionsBeginCancelSynchronizationResponse = ShareSubscrip /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscriptionSynchronization; + parsedBody: OperationResponse; }; }; /** - * Contains response data for the listByAccountNext operation. + * Contains response data for the listSourceShareSynchronizationSettingsNext operation. */ -export type ShareSubscriptionsListByAccountNextResponse = ShareSubscriptionList & { +export type ShareSubscriptionsListSourceShareSynchronizationSettingsNextResponse = SourceShareSynchronizationSettingList & { /** * The underlying HTTP response. */ @@ -3902,14 +3902,14 @@ export type ShareSubscriptionsListByAccountNextResponse = ShareSubscriptionList /** * The response body as parsed JSON or XML */ - parsedBody: ShareSubscriptionList; + parsedBody: SourceShareSynchronizationSettingList; }; }; /** - * Contains response data for the listSourceShareSynchronizationSettingsNext operation. + * Contains response data for the listSynchronizationDetailsNext operation. */ -export type ShareSubscriptionsListSourceShareSynchronizationSettingsNextResponse = SourceShareSynchronizationSettingList & { +export type ShareSubscriptionsListSynchronizationDetailsNextResponse = SynchronizationDetailsList & { /** * The underlying HTTP response. */ @@ -3922,7 +3922,7 @@ export type ShareSubscriptionsListSourceShareSynchronizationSettingsNextResponse /** * The response body as parsed JSON or XML */ - parsedBody: SourceShareSynchronizationSettingList; + parsedBody: SynchronizationDetailsList; }; }; @@ -3947,9 +3947,9 @@ export type ShareSubscriptionsListSynchronizationsNextResponse = ShareSubscripti }; /** - * Contains response data for the listSynchronizationDetailsNext operation. + * Contains response data for the listByAccountNext operation. */ -export type ShareSubscriptionsListSynchronizationDetailsNextResponse = SynchronizationDetailsList & { +export type ShareSubscriptionsListByAccountNextResponse = ShareSubscriptionList & { /** * The underlying HTTP response. */ @@ -3962,7 +3962,7 @@ export type ShareSubscriptionsListSynchronizationDetailsNextResponse = Synchroni /** * The response body as parsed JSON or XML */ - parsedBody: SynchronizationDetailsList; + parsedBody: ShareSubscriptionList; }; }; diff --git a/sdk/datashare/arm-datashare/src/models/mappers.ts b/sdk/datashare/arm-datashare/src/models/mappers.ts index 44e3618c6885..19a0bd68bd72 100644 --- a/sdk/datashare/arm-datashare/src/models/mappers.ts +++ b/sdk/datashare/arm-datashare/src/models/mappers.ts @@ -197,27 +197,6 @@ export const DataShareError: msRest.CompositeMapper = { } }; -export const AccountUpdateParameters: msRest.CompositeMapper = { - serializedName: "AccountUpdateParameters", - type: { - name: "Composite", - className: "AccountUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - export const OperationResponse: msRest.CompositeMapper = { serializedName: "OperationResponse", type: { @@ -254,6 +233,27 @@ export const OperationResponse: msRest.CompositeMapper = { } }; +export const AccountUpdateParameters: msRest.CompositeMapper = { + serializedName: "AccountUpdateParameters", + type: { + name: "Composite", + className: "AccountUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const ProxyDto: msRest.CompositeMapper = { serializedName: "ProxyDto", type: { @@ -757,63 +757,6 @@ export const OperationModel: msRest.CompositeMapper = { } }; -export const Share: msRest.CompositeMapper = { - serializedName: "Share", - type: { - name: "Composite", - className: "Share", - modelProperties: { - ...ProxyDto.type.modelProperties, - createdAt: { - readOnly: true, - serializedName: "properties.createdAt", - type: { - name: "DateTime" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - shareKind: { - serializedName: "properties.shareKind", - type: { - name: "String" - } - }, - terms: { - serializedName: "properties.terms", - type: { - name: "String" - } - }, - userEmail: { - readOnly: true, - serializedName: "properties.userEmail", - type: { - name: "String" - } - }, - userName: { - readOnly: true, - serializedName: "properties.userName", - type: { - name: "String" - } - } - } - } -}; - export const ShareSynchronization: msRest.CompositeMapper = { serializedName: "ShareSynchronization", type: { @@ -1074,11 +1017,11 @@ export const ProviderShareSubscription: msRest.CompositeMapper = { } }; -export const ShareSubscription: msRest.CompositeMapper = { - serializedName: "ShareSubscription", +export const Share: msRest.CompositeMapper = { + serializedName: "Share", type: { name: "Composite", - className: "ShareSubscription", + className: "Share", modelProperties: { ...ProxyDto.type.modelProperties, createdAt: { @@ -1088,93 +1031,100 @@ export const ShareSubscription: msRest.CompositeMapper = { name: "DateTime" } }, - invitationId: { - required: true, - serializedName: "properties.invitationId", + description: { + serializedName: "properties.description", type: { name: "String" } }, - providerEmail: { + provisioningState: { readOnly: true, - serializedName: "properties.providerEmail", + serializedName: "properties.provisioningState", type: { name: "String" } }, - providerName: { - readOnly: true, - serializedName: "properties.providerName", + shareKind: { + serializedName: "properties.shareKind", type: { name: "String" } }, - providerTenantName: { - readOnly: true, - serializedName: "properties.providerTenantName", + terms: { + serializedName: "properties.terms", type: { name: "String" } }, - provisioningState: { + userEmail: { readOnly: true, - serializedName: "properties.provisioningState", + serializedName: "properties.userEmail", type: { name: "String" } }, - shareDescription: { + userName: { readOnly: true, - serializedName: "properties.shareDescription", + serializedName: "properties.userName", type: { name: "String" } - }, - shareKind: { + } + } + } +}; + +export const ShareSubscriptionSynchronization: msRest.CompositeMapper = { + serializedName: "ShareSubscriptionSynchronization", + type: { + name: "Composite", + className: "ShareSubscriptionSynchronization", + modelProperties: { + durationMs: { readOnly: true, - serializedName: "properties.shareKind", + serializedName: "durationMs", type: { - name: "String" + name: "Number" } }, - shareName: { + endTime: { readOnly: true, - serializedName: "properties.shareName", + serializedName: "endTime", type: { - name: "String" + name: "DateTime" } }, - shareSubscriptionStatus: { + message: { readOnly: true, - serializedName: "properties.shareSubscriptionStatus", + serializedName: "message", type: { name: "String" } }, - shareTerms: { + startTime: { readOnly: true, - serializedName: "properties.shareTerms", + serializedName: "startTime", type: { - name: "String" + name: "DateTime" } }, - sourceShareLocation: { - required: true, - serializedName: "properties.sourceShareLocation", + status: { + readOnly: true, + serializedName: "status", type: { name: "String" } }, - userEmail: { - readOnly: true, - serializedName: "properties.userEmail", + synchronizationId: { + required: true, + serializedName: "synchronizationId", type: { name: "String" } }, - userName: { + synchronizationMode: { readOnly: true, - serializedName: "properties.userName", + serializedName: "synchronizationMode", type: { name: "String" } @@ -1251,73 +1201,123 @@ export const SourceShareSynchronizationSetting: msRest.CompositeMapper = { } }; -export const ShareSubscriptionSynchronization: msRest.CompositeMapper = { - serializedName: "ShareSubscriptionSynchronization", +export const Synchronize: msRest.CompositeMapper = { + serializedName: "Synchronize", type: { name: "Composite", - className: "ShareSubscriptionSynchronization", + className: "Synchronize", modelProperties: { - durationMs: { + synchronizationMode: { + serializedName: "synchronizationMode", + type: { + name: "String" + } + } + } + } +}; + +export const ShareSubscription: msRest.CompositeMapper = { + serializedName: "ShareSubscription", + type: { + name: "Composite", + className: "ShareSubscription", + modelProperties: { + ...ProxyDto.type.modelProperties, + createdAt: { readOnly: true, - serializedName: "durationMs", + serializedName: "properties.createdAt", type: { - name: "Number" + name: "DateTime" } }, - endTime: { + invitationId: { + required: true, + serializedName: "properties.invitationId", + type: { + name: "String" + } + }, + providerEmail: { readOnly: true, - serializedName: "endTime", + serializedName: "properties.providerEmail", type: { - name: "DateTime" + name: "String" } }, - message: { + providerName: { readOnly: true, - serializedName: "message", + serializedName: "properties.providerName", type: { name: "String" } }, - startTime: { + providerTenantName: { readOnly: true, - serializedName: "startTime", + serializedName: "properties.providerTenantName", type: { - name: "DateTime" + name: "String" } }, - status: { + provisioningState: { readOnly: true, - serializedName: "status", + serializedName: "properties.provisioningState", type: { name: "String" } }, - synchronizationId: { + shareDescription: { + readOnly: true, + serializedName: "properties.shareDescription", + type: { + name: "String" + } + }, + shareKind: { + readOnly: true, + serializedName: "properties.shareKind", + type: { + name: "String" + } + }, + shareName: { + readOnly: true, + serializedName: "properties.shareName", + type: { + name: "String" + } + }, + shareSubscriptionStatus: { + readOnly: true, + serializedName: "properties.shareSubscriptionStatus", + type: { + name: "String" + } + }, + shareTerms: { + readOnly: true, + serializedName: "properties.shareTerms", + type: { + name: "String" + } + }, + sourceShareLocation: { required: true, - serializedName: "synchronizationId", + serializedName: "properties.sourceShareLocation", type: { name: "String" } }, - synchronizationMode: { + userEmail: { readOnly: true, - serializedName: "synchronizationMode", + serializedName: "properties.userEmail", type: { name: "String" } - } - } - } -}; - -export const Synchronize: msRest.CompositeMapper = { - serializedName: "Synchronize", - type: { - name: "Composite", - className: "Synchronize", - modelProperties: { - synchronizationMode: { - serializedName: "synchronizationMode", + }, + userName: { + readOnly: true, + serializedName: "properties.userName", type: { name: "String" } @@ -2909,11 +2909,11 @@ export const OperationList: msRest.CompositeMapper = { } }; -export const ShareList: msRest.CompositeMapper = { - serializedName: "ShareList", +export const SynchronizationDetailsList: msRest.CompositeMapper = { + serializedName: "SynchronizationDetailsList", type: { name: "Composite", - className: "ShareList", + className: "SynchronizationDetailsList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -2929,7 +2929,7 @@ export const ShareList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Share" + className: "SynchronizationDetails" } } } @@ -2967,11 +2967,11 @@ export const ShareSynchronizationList: msRest.CompositeMapper = { } }; -export const SynchronizationDetailsList: msRest.CompositeMapper = { - serializedName: "SynchronizationDetailsList", +export const ShareList: msRest.CompositeMapper = { + serializedName: "ShareList", type: { name: "Composite", - className: "SynchronizationDetailsList", + className: "ShareList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -2987,7 +2987,7 @@ export const SynchronizationDetailsList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "SynchronizationDetails" + className: "Share" } } } @@ -3025,11 +3025,11 @@ export const ProviderShareSubscriptionList: msRest.CompositeMapper = { } }; -export const ShareSubscriptionList: msRest.CompositeMapper = { - serializedName: "ShareSubscriptionList", +export const SourceShareSynchronizationSettingList: msRest.CompositeMapper = { + serializedName: "SourceShareSynchronizationSettingList", type: { name: "Composite", - className: "ShareSubscriptionList", + className: "SourceShareSynchronizationSettingList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -3045,7 +3045,7 @@ export const ShareSubscriptionList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ShareSubscription" + className: "SourceShareSynchronizationSetting" } } } @@ -3054,11 +3054,11 @@ export const ShareSubscriptionList: msRest.CompositeMapper = { } }; -export const SourceShareSynchronizationSettingList: msRest.CompositeMapper = { - serializedName: "SourceShareSynchronizationSettingList", +export const ShareSubscriptionSynchronizationList: msRest.CompositeMapper = { + serializedName: "ShareSubscriptionSynchronizationList", type: { name: "Composite", - className: "SourceShareSynchronizationSettingList", + className: "ShareSubscriptionSynchronizationList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -3074,7 +3074,7 @@ export const SourceShareSynchronizationSettingList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "SourceShareSynchronizationSetting" + className: "ShareSubscriptionSynchronization" } } } @@ -3083,11 +3083,11 @@ export const SourceShareSynchronizationSettingList: msRest.CompositeMapper = { } }; -export const ShareSubscriptionSynchronizationList: msRest.CompositeMapper = { - serializedName: "ShareSubscriptionSynchronizationList", +export const ShareSubscriptionList: msRest.CompositeMapper = { + serializedName: "ShareSubscriptionList", type: { name: "Composite", - className: "ShareSubscriptionSynchronizationList", + className: "ShareSubscriptionList", modelProperties: { nextLink: { serializedName: "nextLink", @@ -3103,7 +3103,7 @@ export const ShareSubscriptionSynchronizationList: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ShareSubscriptionSynchronization" + className: "ShareSubscription" } } } diff --git a/sdk/datashare/arm-datashare/src/operations/accounts.ts b/sdk/datashare/arm-datashare/src/operations/accounts.ts index d97034a83c4c..f8299e80c5fb 100644 --- a/sdk/datashare/arm-datashare/src/operations/accounts.ts +++ b/sdk/datashare/arm-datashare/src/operations/accounts.ts @@ -27,6 +27,31 @@ export class Accounts { this.client = client; } + /** + * List Accounts in Subscription + * @summary List Accounts in a subscription + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.AccountsListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.AccountsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.AccountsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + /** * Get an account * @summary Get an account under a resource group @@ -124,31 +149,6 @@ export class Accounts { callback) as Promise; } - /** - * List Accounts in Subscription - * @summary List Accounts in a subscription - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.AccountsListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.AccountsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.AccountsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - /** * List Accounts in ResourceGroup * @summary List Accounts in a resource group @@ -279,23 +279,22 @@ export class Accounts { // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts", urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName + Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skipToken ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.Account + bodyMapper: Mappers.AccountList }, default: { bodyMapper: Mappers.DataShareError @@ -304,8 +303,8 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}", urlParameters: [ Parameters.subscriptionId, @@ -318,13 +317,6 @@ const updateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "accountUpdateParameters", - mapper: { - ...Mappers.AccountUpdateParameters, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.Account @@ -336,22 +328,30 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts", +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}", urlParameters: [ - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName ], queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "accountUpdateParameters", + mapper: { + ...Mappers.AccountUpdateParameters, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.AccountList + bodyMapper: Mappers.Account }, default: { bodyMapper: Mappers.DataShareError diff --git a/sdk/datashare/arm-datashare/src/operations/consumerInvitations.ts b/sdk/datashare/arm-datashare/src/operations/consumerInvitations.ts index 31db05bdd029..48f6322f0cc6 100644 --- a/sdk/datashare/arm-datashare/src/operations/consumerInvitations.ts +++ b/sdk/datashare/arm-datashare/src/operations/consumerInvitations.ts @@ -27,36 +27,28 @@ export class ConsumerInvitations { } /** - * Reject an invitation - * @summary Rejects the invitation identified by invitationId - * @param location Location of the invitation - * @param invitation An invitation payload + * Lists invitations + * @summary List the invitations * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - rejectInvitation(location: string, invitation: Models.ConsumerInvitation, options?: msRest.RequestOptionsBase): Promise; + listInvitations(options?: Models.ConsumerInvitationsListInvitationsOptionalParams): Promise; /** - * @param location Location of the invitation - * @param invitation An invitation payload * @param callback The callback */ - rejectInvitation(location: string, invitation: Models.ConsumerInvitation, callback: msRest.ServiceCallback): void; + listInvitations(callback: msRest.ServiceCallback): void; /** - * @param location Location of the invitation - * @param invitation An invitation payload * @param options The optional parameters * @param callback The callback */ - rejectInvitation(location: string, invitation: Models.ConsumerInvitation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - rejectInvitation(location: string, invitation: Models.ConsumerInvitation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listInvitations(options: Models.ConsumerInvitationsListInvitationsOptionalParams, callback: msRest.ServiceCallback): void; + listInvitations(options?: Models.ConsumerInvitationsListInvitationsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - location, - invitation, options }, - rejectInvitationOperationSpec, - callback) as Promise; + listInvitationsOperationSpec, + callback) as Promise; } /** @@ -93,28 +85,36 @@ export class ConsumerInvitations { } /** - * Lists invitations - * @summary List the invitations + * Reject an invitation + * @summary Rejects the invitation identified by invitationId + * @param location Location of the invitation + * @param invitation An invitation payload * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listInvitations(options?: Models.ConsumerInvitationsListInvitationsOptionalParams): Promise; + rejectInvitation(location: string, invitation: Models.ConsumerInvitation, options?: msRest.RequestOptionsBase): Promise; /** + * @param location Location of the invitation + * @param invitation An invitation payload * @param callback The callback */ - listInvitations(callback: msRest.ServiceCallback): void; + rejectInvitation(location: string, invitation: Models.ConsumerInvitation, callback: msRest.ServiceCallback): void; /** + * @param location Location of the invitation + * @param invitation An invitation payload * @param options The optional parameters * @param callback The callback */ - listInvitations(options: Models.ConsumerInvitationsListInvitationsOptionalParams, callback: msRest.ServiceCallback): void; - listInvitations(options?: Models.ConsumerInvitationsListInvitationsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + rejectInvitation(location: string, invitation: Models.ConsumerInvitation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + rejectInvitation(location: string, invitation: Models.ConsumerInvitation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + location, + invitation, options }, - listInvitationsOperationSpec, - callback) as Promise; + rejectInvitationOperationSpec, + callback) as Promise; } /** @@ -149,28 +149,19 @@ export class ConsumerInvitations { // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const rejectInvitationOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.DataShare/locations/{location}/RejectInvitation", - urlParameters: [ - Parameters.location - ], +const listInvitationsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.DataShare/ListInvitations", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skipToken ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "invitation", - mapper: { - ...Mappers.ConsumerInvitation, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.ConsumerInvitation + bodyMapper: Mappers.ConsumerInvitationList }, default: { bodyMapper: Mappers.DataShareError @@ -203,19 +194,28 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listInvitationsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.DataShare/ListInvitations", +const rejectInvitationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.DataShare/locations/{location}/RejectInvitation", + urlParameters: [ + Parameters.location + ], queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "invitation", + mapper: { + ...Mappers.ConsumerInvitation, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.ConsumerInvitationList + bodyMapper: Mappers.ConsumerInvitation }, default: { bodyMapper: Mappers.DataShareError diff --git a/sdk/datashare/arm-datashare/src/operations/providerShareSubscriptions.ts b/sdk/datashare/arm-datashare/src/operations/providerShareSubscriptions.ts index f4ce122e264f..990f44262932 100644 --- a/sdk/datashare/arm-datashare/src/operations/providerShareSubscriptions.ts +++ b/sdk/datashare/arm-datashare/src/operations/providerShareSubscriptions.ts @@ -28,16 +28,16 @@ export class ProviderShareSubscriptions { } /** - * Get share subscription in a provider share - * @summary Get share subscription in a provider share. + * Reinstate share subscription in a provider share + * @summary Reinstate share subscription in a provider share. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. * @param providerShareSubscriptionId To locate shareSubscription * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase): Promise; + reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. @@ -45,7 +45,7 @@ export class ProviderShareSubscriptions { * @param providerShareSubscriptionId To locate shareSubscription * @param callback The callback */ - getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, callback: msRest.ServiceCallback): void; + reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. @@ -54,8 +54,8 @@ export class ProviderShareSubscriptions { * @param options The optional parameters * @param callback The callback */ - getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -64,101 +64,101 @@ export class ProviderShareSubscriptions { providerShareSubscriptionId, options }, - getByShareOperationSpec, - callback) as Promise; + reinstateOperationSpec, + callback) as Promise; } /** - * List share subscriptions in a provider share - * @summary List of available share subscriptions to a provider share. + * Revoke share subscription in a provider share + * @summary Revoke share subscription in a provider share. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. + * @param providerShareSubscriptionId To locate shareSubscription * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByShare(resourceGroupName: string, accountName: string, shareName: string, options?: Models.ProviderShareSubscriptionsListByShareOptionalParams): Promise; + revoke(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRevoke(resourceGroupName,accountName,shareName,providerShareSubscriptionId,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get share subscription in a provider share + * @summary Get share subscription in a provider share. + * @param resourceGroupName The resource group name. + * @param accountName The name of the share account. + * @param shareName The name of the share. + * @param providerShareSubscriptionId To locate shareSubscription + * @param [options] The optional parameters + * @returns Promise + */ + getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. + * @param providerShareSubscriptionId To locate shareSubscription * @param callback The callback */ - listByShare(resourceGroupName: string, accountName: string, shareName: string, callback: msRest.ServiceCallback): void; + getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. + * @param providerShareSubscriptionId To locate shareSubscription * @param options The optional parameters * @param callback The callback */ - listByShare(resourceGroupName: string, accountName: string, shareName: string, options: Models.ProviderShareSubscriptionsListByShareOptionalParams, callback: msRest.ServiceCallback): void; - listByShare(resourceGroupName: string, accountName: string, shareName: string, options?: Models.ProviderShareSubscriptionsListByShareOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getByShare(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, shareName, + providerShareSubscriptionId, options }, - listByShareOperationSpec, - callback) as Promise; - } - - /** - * Revoke share subscription in a provider share - * @summary Revoke share subscription in a provider share. - * @param resourceGroupName The resource group name. - * @param accountName The name of the share account. - * @param shareName The name of the share. - * @param providerShareSubscriptionId To locate shareSubscription - * @param [options] The optional parameters - * @returns Promise - */ - revoke(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginRevoke(resourceGroupName,accountName,shareName,providerShareSubscriptionId,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + getByShareOperationSpec, + callback) as Promise; } /** - * Reinstate share subscription in a provider share - * @summary Reinstate share subscription in a provider share. + * List share subscriptions in a provider share + * @summary List of available share subscriptions to a provider share. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. - * @param providerShareSubscriptionId To locate shareSubscription * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase): Promise; + listByShare(resourceGroupName: string, accountName: string, shareName: string, options?: Models.ProviderShareSubscriptionsListByShareOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. - * @param providerShareSubscriptionId To locate shareSubscription * @param callback The callback */ - reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, callback: msRest.ServiceCallback): void; + listByShare(resourceGroupName: string, accountName: string, shareName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. - * @param providerShareSubscriptionId To locate shareSubscription * @param options The optional parameters * @param callback The callback */ - reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - reinstate(resourceGroupName: string, accountName: string, shareName: string, providerShareSubscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByShare(resourceGroupName: string, accountName: string, shareName: string, options: Models.ProviderShareSubscriptionsListByShareOptionalParams, callback: msRest.ServiceCallback): void; + listByShare(resourceGroupName: string, accountName: string, shareName: string, options?: Models.ProviderShareSubscriptionsListByShareOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, shareName, - providerShareSubscriptionId, options }, - reinstateOperationSpec, - callback) as Promise; + listByShareOperationSpec, + callback) as Promise; } /** @@ -216,9 +216,9 @@ export class ProviderShareSubscriptions { // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const getByShareOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}", +const reinstateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -243,25 +243,25 @@ const getByShareOperationSpec: msRest.OperationSpec = { serializer }; -const listByShareOperationSpec: msRest.OperationSpec = { +const getByShareOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.shareName + Parameters.shareName, + Parameters.providerShareSubscriptionId ], queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ProviderShareSubscriptionList + bodyMapper: Mappers.ProviderShareSubscription }, default: { bodyMapper: Mappers.DataShareError @@ -270,25 +270,25 @@ const listByShareOperationSpec: msRest.OperationSpec = { serializer }; -const reinstateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate", +const listByShareOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.shareName, - Parameters.providerShareSubscriptionId + Parameters.shareName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skipToken ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ProviderShareSubscription + bodyMapper: Mappers.ProviderShareSubscriptionList }, default: { bodyMapper: Mappers.DataShareError diff --git a/sdk/datashare/arm-datashare/src/operations/shareSubscriptions.ts b/sdk/datashare/arm-datashare/src/operations/shareSubscriptions.ts index 57bd91df8775..9420b91d5163 100644 --- a/sdk/datashare/arm-datashare/src/operations/shareSubscriptions.ts +++ b/sdk/datashare/arm-datashare/src/operations/shareSubscriptions.ts @@ -28,22 +28,37 @@ export class ShareSubscriptions { } /** - * Get a shareSubscription in an account - * @summary Get shareSubscription in an account. + * Request to cancel a synchronization. + * @summary Request cancellation of a data share snapshot * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareSubscriptionName The name of the shareSubscription. + * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; + cancelSynchronization(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: msRest.RequestOptionsBase): Promise { + return this.beginCancelSynchronization(resourceGroupName,accountName,shareSubscriptionName,shareSubscriptionSynchronization,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get synchronization settings set on a share + * @summary Get source share synchronization settings for a shareSubscription. + * @param resourceGroupName The resource group name. + * @param accountName The name of the share account. + * @param shareSubscriptionName The name of the shareSubscription. + * @param [options] The optional parameters + * @returns Promise + */ + listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareSubscriptionName The name of the shareSubscription. * @param callback The callback */ - get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, callback: msRest.ServiceCallback): void; + listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. @@ -51,8 +66,8 @@ export class ShareSubscriptions { * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options: Models.ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams, callback: msRest.ServiceCallback): void; + listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -60,115 +75,120 @@ export class ShareSubscriptions { shareSubscriptionName, options }, - getOperationSpec, - callback) as Promise; + listSourceShareSynchronizationSettingsOperationSpec, + callback) as Promise; } /** - * Create a shareSubscription in an account - * @summary Create shareSubscription in an account. + * List synchronization details + * @summary List data set level details for a share subscription synchronization * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the shareSubscription. - * @param shareSubscription create parameters for shareSubscription + * @param shareSubscriptionName The name of the share subscription. + * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, options?: msRest.RequestOptionsBase): Promise; + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: Models.ShareSubscriptionsListSynchronizationDetailsOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the shareSubscription. - * @param shareSubscription create parameters for shareSubscription + * @param shareSubscriptionName The name of the share subscription. + * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param callback The callback */ - create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, callback: msRest.ServiceCallback): void; + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the shareSubscription. - * @param shareSubscription create parameters for shareSubscription + * @param shareSubscriptionName The name of the share subscription. + * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param options The optional parameters * @param callback The callback */ - create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options: Models.ShareSubscriptionsListSynchronizationDetailsOptionalParams, callback: msRest.ServiceCallback): void; + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: Models.ShareSubscriptionsListSynchronizationDetailsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, shareSubscriptionName, - shareSubscription, + shareSubscriptionSynchronization, options }, - createOperationSpec, - callback) as Promise; - } - - /** - * Delete a shareSubscription in an account - * @summary Delete shareSubscription in an account. - * @param resourceGroupName The resource group name. - * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the shareSubscription. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,shareSubscriptionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + listSynchronizationDetailsOperationSpec, + callback) as Promise; } /** - * List share subscriptions in an account - * @summary List of available share subscriptions under an account. + * List synchronizations of a share subscription + * @summary List Synchronizations in a share subscription. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. + * @param shareSubscriptionName The name of the share subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByAccount(resourceGroupName: string, accountName: string, options?: Models.ShareSubscriptionsListByAccountOptionalParams): Promise; + listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSynchronizationsOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. + * @param shareSubscriptionName The name of the share subscription. * @param callback The callback */ - listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. + * @param shareSubscriptionName The name of the share subscription. * @param options The optional parameters * @param callback The callback */ - listByAccount(resourceGroupName: string, accountName: string, options: Models.ShareSubscriptionsListByAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByAccount(resourceGroupName: string, accountName: string, options?: Models.ShareSubscriptionsListByAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options: Models.ShareSubscriptionsListSynchronizationsOptionalParams, callback: msRest.ServiceCallback): void; + listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSynchronizationsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, + shareSubscriptionName, options }, - listByAccountOperationSpec, - callback) as Promise; + listSynchronizationsOperationSpec, + callback) as Promise; } /** - * Get synchronization settings set on a share - * @summary Get source share synchronization settings for a shareSubscription. + * Initiate a copy + * @summary Initiate an asynchronous data share job + * @param resourceGroupName The resource group name. + * @param accountName The name of the share account. + * @param shareSubscriptionName The name of share subscription + * @param synchronize Synchronize payload + * @param [options] The optional parameters + * @returns Promise + */ + synchronizeMethod(resourceGroupName: string, accountName: string, shareSubscriptionName: string, synchronize: Models.Synchronize, options?: msRest.RequestOptionsBase): Promise { + return this.beginSynchronizeMethod(resourceGroupName,accountName,shareSubscriptionName,synchronize,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get a shareSubscription in an account + * @summary Get shareSubscription in an account. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareSubscriptionName The name of the shareSubscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareSubscriptionName The name of the shareSubscription. * @param callback The callback */ - listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. @@ -176,8 +196,8 @@ export class ShareSubscriptions { * @param options The optional parameters * @param callback The callback */ - listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options: Models.ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams, callback: msRest.ServiceCallback): void; - listSourceShareSynchronizationSettings(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSourceShareSynchronizationSettingsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -185,101 +205,96 @@ export class ShareSubscriptions { shareSubscriptionName, options }, - listSourceShareSynchronizationSettingsOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } /** - * List synchronizations of a share subscription - * @summary List Synchronizations in a share subscription. + * Create a shareSubscription in an account + * @summary Create shareSubscription in an account. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the share subscription. + * @param shareSubscriptionName The name of the shareSubscription. + * @param shareSubscription create parameters for shareSubscription * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSynchronizationsOptionalParams): Promise; + create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the share subscription. + * @param shareSubscriptionName The name of the shareSubscription. + * @param shareSubscription create parameters for shareSubscription * @param callback The callback */ - listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the share subscription. + * @param shareSubscriptionName The name of the shareSubscription. + * @param shareSubscription create parameters for shareSubscription * @param options The optional parameters * @param callback The callback */ - listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options: Models.ShareSubscriptionsListSynchronizationsOptionalParams, callback: msRest.ServiceCallback): void; - listSynchronizations(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: Models.ShareSubscriptionsListSynchronizationsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscription: Models.ShareSubscription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, shareSubscriptionName, + shareSubscription, options }, - listSynchronizationsOperationSpec, - callback) as Promise; + createOperationSpec, + callback) as Promise; } /** - * List synchronization details - * @summary List data set level details for a share subscription synchronization + * Delete a shareSubscription in an account + * @summary Delete shareSubscription in an account. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the share subscription. - * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. + * @param shareSubscriptionName The name of the shareSubscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: Models.ShareSubscriptionsListSynchronizationDetailsOptionalParams): Promise; + deleteMethod(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,shareSubscriptionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * List share subscriptions in an account + * @summary List of available share subscriptions under an account. + * @param resourceGroupName The resource group name. + * @param accountName The name of the share account. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccount(resourceGroupName: string, accountName: string, options?: Models.ShareSubscriptionsListByAccountOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the share subscription. - * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param callback The callback */ - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the share subscription. - * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param options The optional parameters * @param callback The callback */ - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options: Models.ShareSubscriptionsListSynchronizationDetailsOptionalParams, callback: msRest.ServiceCallback): void; - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: Models.ShareSubscriptionsListSynchronizationDetailsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByAccount(resourceGroupName: string, accountName: string, options: Models.ShareSubscriptionsListByAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: Models.ShareSubscriptionsListByAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - shareSubscriptionName, - shareSubscriptionSynchronization, options }, - listSynchronizationDetailsOperationSpec, - callback) as Promise; - } - - /** - * Initiate a copy - * @summary Initiate an asynchronous data share job - * @param resourceGroupName The resource group name. - * @param accountName The name of the share account. - * @param shareSubscriptionName The name of share subscription - * @param synchronize Synchronize payload - * @param [options] The optional parameters - * @returns Promise - */ - synchronizeMethod(resourceGroupName: string, accountName: string, shareSubscriptionName: string, synchronize: Models.Synchronize, options?: msRest.RequestOptionsBase): Promise { - return this.beginSynchronizeMethod(resourceGroupName,accountName,shareSubscriptionName,synchronize,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + listByAccountOperationSpec, + callback) as Promise; } /** @@ -290,31 +305,18 @@ export class ShareSubscriptions { * @param shareSubscriptionName The name of the shareSubscription. * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param [options] The optional parameters - * @returns Promise - */ - cancelSynchronization(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: msRest.RequestOptionsBase): Promise { - return this.beginCancelSynchronization(resourceGroupName,accountName,shareSubscriptionName,shareSubscriptionSynchronization,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete a shareSubscription in an account - * @summary Delete shareSubscription in an account. - * @param resourceGroupName The resource group name. - * @param accountName The name of the share account. - * @param shareSubscriptionName The name of the shareSubscription. - * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { + beginCancelSynchronization(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, accountName, shareSubscriptionName, + shareSubscriptionSynchronization, options }, - beginDeleteMethodOperationSpec, + beginCancelSynchronizationOperationSpec, options); } @@ -342,84 +344,82 @@ export class ShareSubscriptions { } /** - * Request to cancel a synchronization. - * @summary Request cancellation of a data share snapshot + * Delete a shareSubscription in an account + * @summary Delete shareSubscription in an account. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareSubscriptionName The name of the shareSubscription. - * @param shareSubscriptionSynchronization Share Subscription Synchronization payload. * @param [options] The optional parameters * @returns Promise */ - beginCancelSynchronization(resourceGroupName: string, accountName: string, shareSubscriptionName: string, shareSubscriptionSynchronization: Models.ShareSubscriptionSynchronization, options?: msRest.RequestOptionsBase): Promise { + beginDeleteMethod(resourceGroupName: string, accountName: string, shareSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, accountName, shareSubscriptionName, - shareSubscriptionSynchronization, options }, - beginCancelSynchronizationOperationSpec, + beginDeleteMethodOperationSpec, options); } /** - * List share subscriptions in an account - * @summary List of available share subscriptions under an account. + * Get synchronization settings set on a share + * @summary Get source share synchronization settings for a shareSubscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listSourceShareSynchronizationSettingsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listSourceShareSynchronizationSettingsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSourceShareSynchronizationSettingsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSourceShareSynchronizationSettingsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listByAccountNextOperationSpec, - callback) as Promise; + listSourceShareSynchronizationSettingsNextOperationSpec, + callback) as Promise; } /** - * Get synchronization settings set on a share - * @summary Get source share synchronization settings for a shareSubscription. + * List synchronization details + * @summary List data set level details for a share subscription synchronization * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSourceShareSynchronizationSettingsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listSourceShareSynchronizationSettingsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listSynchronizationDetailsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listSourceShareSynchronizationSettingsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSourceShareSynchronizationSettingsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSynchronizationDetailsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listSourceShareSynchronizationSettingsNextOperationSpec, - callback) as Promise; + listSynchronizationDetailsNextOperationSpec, + callback) as Promise; } /** @@ -452,40 +452,40 @@ export class ShareSubscriptions { } /** - * List synchronization details - * @summary List data set level details for a share subscription synchronization + * List share subscriptions in an account + * @summary List of available share subscriptions under an account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listSynchronizationDetailsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listSynchronizationDetailsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listSynchronizationDetailsNextOperationSpec, - callback) as Promise; + listByAccountNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}", +const listSourceShareSynchronizationSettingsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -493,14 +493,15 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.shareSubscriptionName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skipToken ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ShareSubscription + bodyMapper: Mappers.SourceShareSynchronizationSettingList }, default: { bodyMapper: Mappers.DataShareError @@ -509,9 +510,9 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}", +const listSynchronizationDetailsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -519,24 +520,24 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.shareSubscriptionName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skipToken, + Parameters.filter, + Parameters.orderby ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { - parameterPath: "shareSubscription", + parameterPath: "shareSubscriptionSynchronization", mapper: { - ...Mappers.ShareSubscription, + ...Mappers.ShareSubscriptionSynchronization, required: true } }, responses: { 200: { - bodyMapper: Mappers.ShareSubscription - }, - 201: { - bodyMapper: Mappers.ShareSubscription + bodyMapper: Mappers.SynchronizationDetailsList }, default: { bodyMapper: Mappers.DataShareError @@ -545,13 +546,14 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const listByAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions", +const listSynchronizationsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.shareSubscriptionName ], queryParameters: [ Parameters.apiVersion, @@ -564,7 +566,7 @@ const listByAccountOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ShareSubscriptionList + bodyMapper: Mappers.ShareSubscriptionSynchronizationList }, default: { bodyMapper: Mappers.DataShareError @@ -573,9 +575,9 @@ const listByAccountOperationSpec: msRest.OperationSpec = { serializer }; -const listSourceShareSynchronizationSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -583,15 +585,14 @@ const listSourceShareSynchronizationSettingsOperationSpec: msRest.OperationSpec Parameters.shareSubscriptionName ], queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.SourceShareSynchronizationSettingList + bodyMapper: Mappers.ShareSubscription }, default: { bodyMapper: Mappers.DataShareError @@ -600,9 +601,9 @@ const listSourceShareSynchronizationSettingsOperationSpec: msRest.OperationSpec serializer }; -const listSynchronizationsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations", +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -610,17 +611,24 @@ const listSynchronizationsOperationSpec: msRest.OperationSpec = { Parameters.shareSubscriptionName ], queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.filter, - Parameters.orderby + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "shareSubscription", + mapper: { + ...Mappers.ShareSubscription, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.ShareSubscriptionSynchronizationList + bodyMapper: Mappers.ShareSubscription + }, + 201: { + bodyMapper: Mappers.ShareSubscription }, default: { bodyMapper: Mappers.DataShareError @@ -629,14 +637,13 @@ const listSynchronizationsOperationSpec: msRest.OperationSpec = { serializer }; -const listSynchronizationDetailsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails", +const listByAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName, - Parameters.shareSubscriptionName + Parameters.accountName ], queryParameters: [ Parameters.apiVersion, @@ -647,16 +654,9 @@ const listSynchronizationDetailsOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "shareSubscriptionSynchronization", - mapper: { - ...Mappers.ShareSubscriptionSynchronization, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.SynchronizationDetailsList + bodyMapper: Mappers.ShareSubscriptionList }, default: { bodyMapper: Mappers.DataShareError @@ -665,9 +665,9 @@ const listSynchronizationDetailsOperationSpec: msRest.OperationSpec = { serializer }; -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}", +const beginCancelSynchronizationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -680,12 +680,20 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "shareSubscriptionSynchronization", + mapper: { + ...Mappers.ShareSubscriptionSynchronization, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.OperationResponse + bodyMapper: Mappers.ShareSubscriptionSynchronization + }, + 202: { + bodyMapper: Mappers.ShareSubscriptionSynchronization }, - 202: {}, - 204: {}, default: { bodyMapper: Mappers.DataShareError } @@ -729,9 +737,9 @@ const beginSynchronizeMethodOperationSpec: msRest.OperationSpec = { serializer }; -const beginCancelSynchronizationOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -744,20 +752,12 @@ const beginCancelSynchronizationOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "shareSubscriptionSynchronization", - mapper: { - ...Mappers.ShareSubscriptionSynchronization, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.ShareSubscriptionSynchronization - }, - 202: { - bodyMapper: Mappers.ShareSubscriptionSynchronization + bodyMapper: Mappers.OperationResponse }, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.DataShareError } @@ -765,8 +765,8 @@ const beginCancelSynchronizationOperationSpec: msRest.OperationSpec = { serializer }; -const listByAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const listSourceShareSynchronizationSettingsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ @@ -777,7 +777,7 @@ const listByAccountNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ShareSubscriptionList + bodyMapper: Mappers.SourceShareSynchronizationSettingList }, default: { bodyMapper: Mappers.DataShareError @@ -786,7 +786,7 @@ const listByAccountNextOperationSpec: msRest.OperationSpec = { serializer }; -const listSourceShareSynchronizationSettingsNextOperationSpec: msRest.OperationSpec = { +const listSynchronizationDetailsNextOperationSpec: msRest.OperationSpec = { httpMethod: "POST", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -798,7 +798,7 @@ const listSourceShareSynchronizationSettingsNextOperationSpec: msRest.OperationS ], responses: { 200: { - bodyMapper: Mappers.SourceShareSynchronizationSettingList + bodyMapper: Mappers.SynchronizationDetailsList }, default: { bodyMapper: Mappers.DataShareError @@ -828,8 +828,8 @@ const listSynchronizationsNextOperationSpec: msRest.OperationSpec = { serializer }; -const listSynchronizationDetailsNextOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const listByAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ @@ -840,7 +840,7 @@ const listSynchronizationDetailsNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.SynchronizationDetailsList + bodyMapper: Mappers.ShareSubscriptionList }, default: { bodyMapper: Mappers.DataShareError diff --git a/sdk/datashare/arm-datashare/src/operations/shares.ts b/sdk/datashare/arm-datashare/src/operations/shares.ts index 45e8f0595f7b..cbb919714593 100644 --- a/sdk/datashare/arm-datashare/src/operations/shares.ts +++ b/sdk/datashare/arm-datashare/src/operations/shares.ts @@ -28,206 +28,206 @@ export class Shares { } /** - * Get a share - * @summary Get a specified share + * List synchronization details + * @summary List data set level details for a share synchronization * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareName The name of the share to retrieve. + * @param shareName The name of the share. + * @param shareSynchronization Share Synchronization payload. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - get(resourceGroupName: string, accountName: string, shareName: string, options?: msRest.RequestOptionsBase): Promise; + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, options?: Models.SharesListSynchronizationDetailsOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareName The name of the share to retrieve. + * @param shareName The name of the share. + * @param shareSynchronization Share Synchronization payload. * @param callback The callback */ - get(resourceGroupName: string, accountName: string, shareName: string, callback: msRest.ServiceCallback): void; + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareName The name of the share to retrieve. + * @param shareName The name of the share. + * @param shareSynchronization Share Synchronization payload. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, accountName: string, shareName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, accountName: string, shareName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, options: Models.SharesListSynchronizationDetailsOptionalParams, callback: msRest.ServiceCallback): void; + listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, options?: Models.SharesListSynchronizationDetailsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, shareName, + shareSynchronization, options }, - getOperationSpec, - callback) as Promise; + listSynchronizationDetailsOperationSpec, + callback) as Promise; } /** - * Create a share - * @summary Create a share in the given account. + * List synchronizations of a share + * @summary List Synchronizations in a share * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. - * @param share The share payload * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, options?: msRest.RequestOptionsBase): Promise; + listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, options?: Models.SharesListSynchronizationsOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. - * @param share The share payload * @param callback The callback */ - create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, callback: msRest.ServiceCallback): void; + listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. - * @param share The share payload * @param options The optional parameters * @param callback The callback */ - create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, options: Models.SharesListSynchronizationsOptionalParams, callback: msRest.ServiceCallback): void; + listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, options?: Models.SharesListSynchronizationsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, shareName, - share, options }, - createOperationSpec, - callback) as Promise; - } - - /** - * Delete a share - * @summary Deletes a share - * @param resourceGroupName The resource group name. - * @param accountName The name of the share account. - * @param shareName The name of the share. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, accountName: string, shareName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,shareName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + listSynchronizationsOperationSpec, + callback) as Promise; } /** - * List shares in an account - * @summary List of available shares under an account. + * Get a share + * @summary Get a specified share * @param resourceGroupName The resource group name. * @param accountName The name of the share account. + * @param shareName The name of the share to retrieve. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByAccount(resourceGroupName: string, accountName: string, options?: Models.SharesListByAccountOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, shareName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. + * @param shareName The name of the share to retrieve. * @param callback The callback */ - listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, shareName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. + * @param shareName The name of the share to retrieve. * @param options The optional parameters * @param callback The callback */ - listByAccount(resourceGroupName: string, accountName: string, options: Models.SharesListByAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByAccount(resourceGroupName: string, accountName: string, options?: Models.SharesListByAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, accountName: string, shareName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, shareName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, + shareName, options }, - listByAccountOperationSpec, - callback) as Promise; + getOperationSpec, + callback) as Promise; } /** - * List synchronizations of a share - * @summary List Synchronizations in a share + * Create a share + * @summary Create a share in the given account. * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. + * @param share The share payload * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, options?: Models.SharesListSynchronizationsOptionalParams): Promise; + create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. + * @param share The share payload * @param callback The callback */ - listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. + * @param share The share payload * @param options The optional parameters * @param callback The callback */ - listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, options: Models.SharesListSynchronizationsOptionalParams, callback: msRest.ServiceCallback): void; - listSynchronizations(resourceGroupName: string, accountName: string, shareName: string, options?: Models.SharesListSynchronizationsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, shareName: string, share: Models.Share, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, shareName, + share, options }, - listSynchronizationsOperationSpec, - callback) as Promise; + createOperationSpec, + callback) as Promise; } /** - * List synchronization details - * @summary List data set level details for a share synchronization + * Delete a share + * @summary Deletes a share * @param resourceGroupName The resource group name. * @param accountName The name of the share account. * @param shareName The name of the share. - * @param shareSynchronization Share Synchronization payload. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, options?: Models.SharesListSynchronizationDetailsOptionalParams): Promise; + deleteMethod(resourceGroupName: string, accountName: string, shareName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,shareName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * List shares in an account + * @summary List of available shares under an account. + * @param resourceGroupName The resource group name. + * @param accountName The name of the share account. + * @param [options] The optional parameters + * @returns Promise + */ + listByAccount(resourceGroupName: string, accountName: string, options?: Models.SharesListByAccountOptionalParams): Promise; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareName The name of the share. - * @param shareSynchronization Share Synchronization payload. * @param callback The callback */ - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The resource group name. * @param accountName The name of the share account. - * @param shareName The name of the share. - * @param shareSynchronization Share Synchronization payload. * @param options The optional parameters * @param callback The callback */ - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, options: Models.SharesListSynchronizationDetailsOptionalParams, callback: msRest.ServiceCallback): void; - listSynchronizationDetails(resourceGroupName: string, accountName: string, shareName: string, shareSynchronization: Models.ShareSynchronization, options?: Models.SharesListSynchronizationDetailsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByAccount(resourceGroupName: string, accountName: string, options: Models.SharesListByAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByAccount(resourceGroupName: string, accountName: string, options?: Models.SharesListByAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, - shareName, - shareSynchronization, options }, - listSynchronizationDetailsOperationSpec, - callback) as Promise; + listByAccountOperationSpec, + callback) as Promise; } /** @@ -252,32 +252,32 @@ export class Shares { } /** - * List shares in an account - * @summary List of available shares under an account. + * List synchronization details + * @summary List data set level details for a share synchronization * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listSynchronizationDetailsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listSynchronizationDetailsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listByAccountNextOperationSpec, - callback) as Promise; + listSynchronizationDetailsNextOperationSpec, + callback) as Promise; } /** @@ -310,40 +310,40 @@ export class Shares { } /** - * List synchronization details - * @summary List data set level details for a share synchronization + * List shares in an account + * @summary List of available shares under an account. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listSynchronizationDetailsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listSynchronizationDetailsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSynchronizationDetailsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listSynchronizationDetailsNextOperationSpec, - callback) as Promise; + listByAccountNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}", +const listSynchronizationDetailsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -351,14 +351,24 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.shareName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skipToken, + Parameters.filter, + Parameters.orderby ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "shareSynchronization", + mapper: { + ...Mappers.ShareSynchronization, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.Share + bodyMapper: Mappers.SynchronizationDetailsList }, default: { bodyMapper: Mappers.DataShareError @@ -367,9 +377,9 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}", +const listSynchronizationsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -377,24 +387,17 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.shareName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skipToken, + Parameters.filter, + Parameters.orderby ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "share", - mapper: { - ...Mappers.Share, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.Share - }, - 201: { - bodyMapper: Mappers.Share + bodyMapper: Mappers.ShareSynchronizationList }, default: { bodyMapper: Mappers.DataShareError @@ -403,26 +406,24 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const listByAccountOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName + Parameters.accountName, + Parameters.shareName ], queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.filter, - Parameters.orderby + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ShareList + bodyMapper: Mappers.Share }, default: { bodyMapper: Mappers.DataShareError @@ -431,9 +432,9 @@ const listByAccountOperationSpec: msRest.OperationSpec = { serializer }; -const listSynchronizationsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations", +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -441,17 +442,24 @@ const listSynchronizationsOperationSpec: msRest.OperationSpec = { Parameters.shareName ], queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken, - Parameters.filter, - Parameters.orderby + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "share", + mapper: { + ...Mappers.Share, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.ShareSynchronizationList + bodyMapper: Mappers.Share + }, + 201: { + bodyMapper: Mappers.Share }, default: { bodyMapper: Mappers.DataShareError @@ -460,14 +468,13 @@ const listSynchronizationsOperationSpec: msRest.OperationSpec = { serializer }; -const listSynchronizationDetailsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails", +const listByAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.accountName, - Parameters.shareName + Parameters.accountName ], queryParameters: [ Parameters.apiVersion, @@ -478,16 +485,9 @@ const listSynchronizationDetailsOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "shareSynchronization", - mapper: { - ...Mappers.ShareSynchronization, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.SynchronizationDetailsList + bodyMapper: Mappers.ShareList }, default: { bodyMapper: Mappers.DataShareError @@ -524,8 +524,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const listByAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const listSynchronizationDetailsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ @@ -536,7 +536,7 @@ const listByAccountNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.ShareList + bodyMapper: Mappers.SynchronizationDetailsList }, default: { bodyMapper: Mappers.DataShareError @@ -566,8 +566,8 @@ const listSynchronizationsNextOperationSpec: msRest.OperationSpec = { serializer }; -const listSynchronizationDetailsNextOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", +const listByAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ @@ -578,7 +578,7 @@ const listSynchronizationDetailsNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.SynchronizationDetailsList + bodyMapper: Mappers.ShareList }, default: { bodyMapper: Mappers.DataShareError