diff --git a/sdk/storagesync/arm-storagesync/LICENSE.txt b/sdk/storagesync/arm-storagesync/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/storagesync/arm-storagesync/LICENSE.txt +++ b/sdk/storagesync/arm-storagesync/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/storagesync/arm-storagesync/README.md b/sdk/storagesync/arm-storagesync/README.md index 94c95f784e04..92600a973fc5 100644 --- a/sdk/storagesync/arm-storagesync/README.md +++ b/sdk/storagesync/arm-storagesync/README.md @@ -1,11 +1,11 @@ ## Azure StorageSyncManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageSyncManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for StorageSyncManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-storagesync @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new StorageSyncManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { console.log("The result is:"); console.log(result); @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmStoragesync.StorageSyncManagementClient(creds, subscriptionId); client.operations.list().then((result) => { diff --git a/sdk/storagesync/arm-storagesync/package.json b/sdk/storagesync/arm-storagesync/package.json index 6274c23dbd9f..7403327642ca 100644 --- a/sdk/storagesync/arm-storagesync/package.json +++ b/sdk/storagesync/arm-storagesync/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/storagesync/arm-storagesync", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storagesync/arm-storagesync", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/storagesync/arm-storagesync/rollup.config.js b/sdk/storagesync/arm-storagesync/rollup.config.js index 11130dc93fb6..7075a17b2c10 100644 --- a/sdk/storagesync/arm-storagesync/rollup.config.js +++ b/sdk/storagesync/arm-storagesync/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/storagesync/arm-storagesync/src/models/cloudEndpointsMappers.ts b/sdk/storagesync/arm-storagesync/src/models/cloudEndpointsMappers.ts index aad2b506cb6f..4c5e28c49ef2 100644 --- a/sdk/storagesync/arm-storagesync/src/models/cloudEndpointsMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/cloudEndpointsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,7 +12,10 @@ export { BaseResource, CloudEndpoint, CloudEndpointArray, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, CloudEndpointsCreateHeaders, CloudEndpointsDeleteHeaders, CloudEndpointsGetHeaders, @@ -23,15 +26,26 @@ export { CloudEndpointsPreRestoreHeaders, CloudEndpointsRestoreheartbeatHeaders, CloudEndpointsTriggerChangeDetectionHeaders, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, PostBackupResponse, PostRestoreRequest, PreRestoreRequest, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RegisteredServer, RegisteredServerCreateParameters, Resource, RestoreFileSpec, ServerEndpoint, + ServerEndpointBackgroundDataDownloadActivity, ServerEndpointCloudTieringStatus, ServerEndpointCreateParameters, ServerEndpointFilesNotSyncingError, @@ -43,6 +57,7 @@ export { StorageSyncApiError, StorageSyncError, StorageSyncErrorDetails, + StorageSyncInnerErrorDetails, StorageSyncService, SyncGroup, SyncGroupCreateParameters, diff --git a/sdk/storagesync/arm-storagesync/src/models/index.ts b/sdk/storagesync/arm-storagesync/src/models/index.ts index b58aba1f343e..9056278c1115 100644 --- a/sdk/storagesync/arm-storagesync/src/models/index.ts +++ b/sdk/storagesync/arm-storagesync/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -27,6 +27,48 @@ export interface StorageSyncErrorDetails { * Target of the given entry. */ target?: string; + /** + * Request URI of the given entry. + */ + requestUri?: string; + /** + * Exception type of the given entry. + */ + exceptionType?: string; + /** + * HTTP method of the given entry. + */ + httpMethod?: string; + /** + * Hashed message of the given entry. + */ + hashedMessage?: string; + /** + * HTTP error code of the given entry. + */ + httpErrorCode?: string; +} + +/** + * Error Details object. + */ +export interface StorageSyncInnerErrorDetails { + /** + * Call stack of the error. + */ + callStack?: string; + /** + * Error message of the error. + */ + message?: string; + /** + * Exception of the inner error. + */ + innerException?: string; + /** + * Call stack of the inner error. + */ + innerExceptionCallStack?: string; } /** @@ -49,6 +91,10 @@ export interface StorageSyncApiError { * Error details of the given entry. */ details?: StorageSyncErrorDetails; + /** + * Inner error details of the given entry. + */ + innerError?: StorageSyncInnerErrorDetails; } /** @@ -86,11 +132,43 @@ export interface SubscriptionState { } /** - * An interface representing Resource. + * The Private Endpoint resource. + */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * A collection of information about the state of the connection between service consumer and + * provider. + */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. Possible values include: 'Pending', 'Approved', 'Rejected' + */ + status?: PrivateEndpointServiceConnectionStatus; + /** + * The reason for approval/rejection of the connection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ + actionsRequired?: string; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ export interface Resource extends BaseResource { /** - * Fully qualified resource Id for the resource. Ex - + * Fully qualified resource ID for the resource. Ex - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ @@ -101,15 +179,37 @@ export interface Resource extends BaseResource { */ readonly name?: string; /** - * The type of the resource. Ex- Microsoft.Compute/virtualMachines or - * Microsoft.Storage/storageAccounts. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * The resource model definition for a ARM tracked top level resource + * The Private Endpoint Connection resource. + */ +export interface PrivateEndpointConnection extends Resource { + /** + * The resource of private end point. + */ + privateEndpoint?: PrivateEndpoint; + /** + * A collection of information about the state of the connection between service consumer and + * provider. + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. Possible values include: + * 'Succeeded', 'Creating', 'Deleting', 'Failed' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource */ export interface TrackedResource extends Resource { /** @@ -126,6 +226,11 @@ export interface TrackedResource extends Resource { * Storage Sync Service object. */ export interface StorageSyncService extends TrackedResource { + /** + * Incoming Traffic Policy. Possible values include: 'AllowAllTraffic', + * 'AllowVirtualNetworksOnly' + */ + incomingTrafficPolicy?: IncomingTrafficPolicy; /** * Storage Sync service status. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -136,11 +241,32 @@ export interface StorageSyncService extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly storageSyncServiceUid?: string; + /** + * StorageSyncService Provisioning State + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * StorageSyncService lastWorkflowId + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastWorkflowId?: string; + /** + * Resource Last Operation Name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastOperationName?: string; + /** + * List of private endpoint connection associated with the specified storage sync service + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; } /** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource */ export interface ProxyResource extends Resource { } @@ -161,6 +287,136 @@ export interface SyncGroup extends ProxyResource { readonly syncGroupStatus?: string; } +/** + * Cloud endpoint change enumeration status object + */ +export interface CloudEndpointLastChangeEnumerationStatus { + /** + * Timestamp when change enumeration started + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startedTimestamp?: Date; + /** + * Timestamp when change enumeration completed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly completedTimestamp?: Date; + /** + * Count of files in the namespace + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly namespaceFilesCount?: number; + /** + * Count of directories in the namespace + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly namespaceDirectoriesCount?: number; + /** + * Namespace size in bytes + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly namespaceSizeBytes?: number; + /** + * Timestamp of when change enumeration is expected to run again + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextRunTimestamp?: Date; +} + +/** + * Cloud endpoint change enumeration activity object + */ +export interface CloudEndpointChangeEnumerationActivity { + /** + * Last updated timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Change enumeration operation state. Possible values include: 'InitialEnumerationInProgress', + * 'EnumerationInProgress' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operationState?: CloudEndpointChangeEnumerationActivityState; + /** + * When non-zero, indicates an issue that is delaying change enumeration + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly statusCode?: number; + /** + * Timestamp when change enumeration started + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startedTimestamp?: Date; + /** + * Count of files processed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly processedFilesCount?: number; + /** + * Count of directories processed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly processedDirectoriesCount?: number; + /** + * Total count of files enumerated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalFilesCount?: number; + /** + * Total count of directories enumerated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalDirectoriesCount?: number; + /** + * Total enumerated size in bytes + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalSizeBytes?: number; + /** + * Progress percentage for change enumeration run, excluding processing of deletes + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly progressPercent?: number; + /** + * Estimate of time remaining for the enumeration run + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly minutesRemaining?: number; + /** + * Change enumeration total counts state. Possible values include: 'Calculating', 'Final' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalCountsState?: CloudEndpointChangeEnumerationTotalCountsState; + /** + * Progress percentage for processing deletes. This is done separately from the rest of the + * enumeration run + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deletesProgressPercent?: number; +} + +/** + * Cloud endpoint change enumeration status object + */ +export interface CloudEndpointChangeEnumerationStatus { + /** + * Last updated timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Status of last completed change enumeration + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastEnumerationStatus?: CloudEndpointLastChangeEnumerationStatus; + /** + * Change enumeration activity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly activity?: CloudEndpointChangeEnumerationActivity; +} + /** * Cloud Endpoint object. */ @@ -202,6 +458,11 @@ export interface CloudEndpoint extends ProxyResource { * Resource Last Operation Name */ lastOperationName?: string; + /** + * Cloud endpoint change enumeration status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly changeEnumerationStatus?: CloudEndpointChangeEnumerationStatus; } /** @@ -256,7 +517,11 @@ export interface StorageSyncServiceCreateParameters { * and a value with a length no greater than 256 characters. */ tags?: { [propertyName: string]: string }; - properties?: any; + /** + * Incoming Traffic Policy. Possible values include: 'AllowAllTraffic', + * 'AllowVirtualNetworksOnly' + */ + incomingTrafficPolicy?: IncomingTrafficPolicy; } /** @@ -302,9 +567,9 @@ export interface ServerEndpointCreateParameters extends ProxyResource { /** * Cloud Tiering. Possible values include: 'on', 'off' */ - cloudTiering?: CloudTiering; + cloudTiering?: FeatureStatus; /** - * Level of free space to be maintained by Cloud Tiering if it is enabled. + * Level of free space to be maintained by Cloud Tiering if it is enabled. Default value: 20. */ volumeFreeSpacePercent?: number; /** @@ -322,11 +587,27 @@ export interface ServerEndpointCreateParameters extends ProxyResource { /** * Offline data transfer. Possible values include: 'on', 'off' */ - offlineDataTransfer?: OfflineDataTransfer; + offlineDataTransfer?: FeatureStatus; /** * Offline data transfer share name */ offlineDataTransferShareName?: string; + /** + * Policy for how namespace and files are recalled during FastDr. Possible values include: + * 'NamespaceOnly', 'NamespaceThenModifiedFiles', 'AvoidTieredFiles' + */ + initialDownloadPolicy?: InitialDownloadPolicy; + /** + * Policy for enabling follow-the-sun business models: link local cache to cloud behavior to + * pre-populate before local access. Possible values include: 'DownloadNewAndModifiedFiles', + * 'UpdateLocallyCachedFiles' + */ + localCacheMode?: LocalCacheMode; + /** + * Policy for how the initial upload sync session is performed. Possible values include: + * 'ServerAuthoritative', 'Merge' + */ + initialUploadPolicy?: InitialUploadPolicy; } /** @@ -388,7 +669,7 @@ export interface ServerEndpointUpdateParameters { /** * Cloud Tiering. Possible values include: 'on', 'off' */ - cloudTiering?: CloudTiering1; + cloudTiering?: FeatureStatus; /** * Level of free space to be maintained by Cloud Tiering if it is enabled. */ @@ -400,11 +681,17 @@ export interface ServerEndpointUpdateParameters { /** * Offline data transfer. Possible values include: 'on', 'off' */ - offlineDataTransfer?: OfflineDataTransfer1; + offlineDataTransfer?: FeatureStatus; /** * Offline data transfer share name */ offlineDataTransferShareName?: string; + /** + * Policy for enabling follow-the-sun business models: link local cache to cloud behavior to + * pre-populate before local access. Possible values include: 'DownloadNewAndModifiedFiles', + * 'UpdateLocallyCachedFiles' + */ + localCacheMode?: LocalCacheMode; } /** @@ -467,6 +754,12 @@ export interface ServerEndpointSyncSessionStatus { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly filesNotSyncingErrors?: ServerEndpointFilesNotSyncingError[]; + /** + * Sync mode. Possible values include: 'Regular', 'NamespaceDownload', 'InitialUpload', + * 'SnapshotUpload', 'InitialFullDownload' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastSyncMode?: ServerEndpointSyncMode; } /** @@ -503,6 +796,43 @@ export interface ServerEndpointSyncActivityStatus { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalBytes?: number; + /** + * Sync mode. Possible values include: 'Regular', 'NamespaceDownload', 'InitialUpload', + * 'SnapshotUpload', 'InitialFullDownload' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly syncMode?: ServerEndpointSyncMode; + /** + * Session minutes remaining (if available) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sessionMinutesRemaining?: number; +} + +/** + * Background data download activity object + */ +export interface ServerEndpointBackgroundDataDownloadActivity { + /** + * Timestamp when properties were updated + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly timestamp?: Date; + /** + * Timestamp when the operation started + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startedTimestamp?: Date; + /** + * Progress percentage + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly percentProgress?: number; + /** + * Running count of bytes downloaded + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly downloadedBytes?: number; } /** @@ -510,28 +840,25 @@ export interface ServerEndpointSyncActivityStatus { */ export interface ServerEndpointSyncStatus { /** - * Download Health Status. Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * Download Health Status. Possible values include: 'Unavailable', 'Healthy', 'Error' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly downloadHealth?: DownloadHealth; + readonly downloadHealth?: ServerEndpointHealthState; /** - * Upload Health Status. Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * Upload Health Status. Possible values include: 'Unavailable', 'Healthy', 'Error' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly uploadHealth?: UploadHealth; + readonly uploadHealth?: ServerEndpointHealthState; /** - * Combined Health Status. Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * Combined Health Status. Possible values include: 'Unavailable', 'Healthy', 'Error' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly combinedHealth?: CombinedHealth; + readonly combinedHealth?: ServerEndpointHealthState; /** * Sync activity. Possible values include: 'Upload', 'Download', 'UploadAndDownload' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly syncActivity?: SyncActivity; + readonly syncActivity?: ServerEndpointSyncActivityState; /** * Total count of persistent files not syncing (combined upload + download). * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -567,90 +894,262 @@ export interface ServerEndpointSyncStatus { * 'Complete' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly offlineDataTransferStatus?: OfflineDataTransferStatus; + readonly offlineDataTransferStatus?: ServerEndpointOfflineDataTransferState; + /** + * Background data download activity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly backgroundDataDownloadActivity?: ServerEndpointBackgroundDataDownloadActivity; } /** * Server endpoint cloud tiering status object. */ -export interface ServerEndpointCloudTieringStatus { +export interface CloudTieringSpaceSavings { + /** + * Last updated timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Volume size + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly volumeSizeBytes?: number; + /** + * Total size of content in the azure file share + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalSizeCloudBytes?: number; + /** + * Cached content size on the server + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cachedSizeBytes?: number; + /** + * Percentage of cached size over total size + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly spaceSavingsPercent?: number; /** - * Cloud tiering health state. Possible values include: 'Healthy', 'Error' + * Count of bytes saved on the server * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly health?: Health; + readonly spaceSavingsBytes?: number; +} + +/** + * Server endpoint cloud tiering status object. + */ +export interface CloudTieringCachePerformance { /** * Last updated timestamp * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastUpdatedTimestamp?: Date; /** - * Last cloud tiering result (HResult) + * Count of bytes that were served from the local server * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastCloudTieringResult?: number; + readonly cacheHitBytes?: number; /** - * Last cloud tiering success timestamp + * Count of bytes that were served from the cloud * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastSuccessTimestamp?: Date; + readonly cacheMissBytes?: number; + /** + * Percentage of total bytes (hit + miss) that were served from the local server + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cacheHitBytesPercent?: number; } /** - * Server endpoint recall error object + * Files not tiering error object */ -export interface ServerEndpointRecallError { +export interface FilesNotTieringError { /** * Error code (HResult) * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly errorCode?: number; /** - * Count of occurences of the error + * Count of files with this error * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly count?: number; + readonly fileCount?: number; } /** - * Server endpoint recall status object. + * Server endpoint cloud tiering status object. */ -export interface ServerEndpointRecallStatus { +export interface CloudTieringFilesNotTiering { /** * Last updated timestamp * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastUpdatedTimestamp?: Date; /** - * Total count of recall errors. + * Last cloud tiering result (HResult) * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly totalRecallErrorsCount?: number; + readonly totalFileCount?: number; /** - * Array of recall errors + * Array of tiering errors * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly recallErrors?: ServerEndpointRecallError[]; + readonly errors?: FilesNotTieringError[]; } /** - * Server Endpoint object. + * Status of the volume free space policy */ -export interface ServerEndpoint extends ProxyResource { +export interface CloudTieringVolumeFreeSpacePolicyStatus { /** - * Server Local path. + * Last updated timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - serverLocalPath?: string; + readonly lastUpdatedTimestamp?: Date; /** - * Cloud Tiering. Possible values include: 'on', 'off' + * In the case where multiple server endpoints are present in a volume, an effective free space + * policy is applied. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - cloudTiering?: CloudTiering2; + readonly effectiveVolumeFreeSpacePolicy?: number; /** - * Level of free space to be maintained by Cloud Tiering if it is enabled. + * Current volume free space percentage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - volumeFreeSpacePercent?: number; - /** - * Tier files older than days. + readonly currentVolumeFreeSpacePercent?: number; +} + +/** + * Status of the date policy + */ +export interface CloudTieringDatePolicyStatus { + /** + * Last updated timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Most recent access time of tiered files + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tieredFilesMostRecentAccessTimestamp?: Date; +} + +/** + * Server endpoint cloud tiering status object. + */ +export interface ServerEndpointCloudTieringStatus { + /** + * Last updated timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Cloud tiering health state. Possible values include: 'Unavailable', 'Healthy', 'Error' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly health?: ServerEndpointHealthState; + /** + * The last updated timestamp of health state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly healthLastUpdatedTimestamp?: Date; + /** + * Last cloud tiering result (HResult) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastCloudTieringResult?: number; + /** + * Last cloud tiering success timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastSuccessTimestamp?: Date; + /** + * Information regarding how much local space cloud tiering is saving. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly spaceSavings?: CloudTieringSpaceSavings; + /** + * Information regarding how well the local cache on the server is performing. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cachePerformance?: CloudTieringCachePerformance; + /** + * Information regarding files that failed to be tiered + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly filesNotTiering?: CloudTieringFilesNotTiering; + /** + * Status of the volume free space policy + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly volumeFreeSpacePolicyStatus?: CloudTieringVolumeFreeSpacePolicyStatus; + /** + * Status of the date policy + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly datePolicyStatus?: CloudTieringDatePolicyStatus; +} + +/** + * Server endpoint recall error object + */ +export interface ServerEndpointRecallError { + /** + * Error code (HResult) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorCode?: number; + /** + * Count of occurences of the error + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly count?: number; +} + +/** + * Server endpoint recall status object. + */ +export interface ServerEndpointRecallStatus { + /** + * Last updated timestamp + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Total count of recall errors. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalRecallErrorsCount?: number; + /** + * Array of recall errors + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recallErrors?: ServerEndpointRecallError[]; +} + +/** + * Server Endpoint object. + */ +export interface ServerEndpoint extends ProxyResource { + /** + * Server Local path. + */ + serverLocalPath?: string; + /** + * Cloud Tiering. Possible values include: 'on', 'off' + */ + cloudTiering?: FeatureStatus; + /** + * Level of free space to be maintained by Cloud Tiering if it is enabled. + */ + volumeFreeSpacePercent?: number; + /** + * Tier files older than days. */ tierFilesOlderThanDays?: number; /** @@ -684,7 +1183,7 @@ export interface ServerEndpoint extends ProxyResource { /** * Offline data transfer. Possible values include: 'on', 'off' */ - offlineDataTransfer?: OfflineDataTransfer2; + offlineDataTransfer?: FeatureStatus; /** * Offline data transfer storage account resource ID * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -709,6 +1208,27 @@ export interface ServerEndpoint extends ProxyResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recallStatus?: ServerEndpointRecallStatus; + /** + * Policy for how namespace and files are recalled during FastDr. Possible values include: + * 'NamespaceOnly', 'NamespaceThenModifiedFiles', 'AvoidTieredFiles' + */ + initialDownloadPolicy?: InitialDownloadPolicy; + /** + * Policy for enabling follow-the-sun business models: link local cache to cloud behavior to + * pre-populate before local access. Possible values include: 'DownloadNewAndModifiedFiles', + * 'UpdateLocallyCachedFiles' + */ + localCacheMode?: LocalCacheMode; + /** + * Policy for how the initial upload sync session is performed. Possible values include: + * 'ServerAuthoritative', 'Merge' + */ + initialUploadPolicy?: InitialUploadPolicy; + /** + * Server name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serverName?: string; } /** @@ -723,6 +1243,17 @@ export interface RegisteredServer extends ProxyResource { * Registered Server Agent Version */ agentVersion?: string; + /** + * Registered Server Agent Version Status. Possible values include: 'Ok', 'NearExpiry', + * 'Expired', 'Blocked' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agentVersionStatus?: RegisteredServerAgentVersionStatus; + /** + * Registered Server Agent Version Expiration Date + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly agentVersionExpirationDate?: Date; /** * Registered Server OS Version */ @@ -787,10 +1318,19 @@ export interface RegisteredServer extends ProxyResource { * Management Endpoint Uri */ managementEndpointUri?: string; + /** + * Telemetry Endpoint Uri + */ + monitoringEndpointUri?: string; /** * Monitoring Configuration */ monitoringConfiguration?: string; + /** + * Server name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serverName?: string; } /** @@ -819,11 +1359,11 @@ export interface Workflow extends ProxyResource { * workflow status. Possible values include: 'active', 'expired', 'succeeded', 'aborted', * 'failed' */ - status?: Status; + status?: WorkflowStatus; /** * operation direction. Possible values include: 'do', 'undo', 'cancel' */ - operation?: Operation; + operation?: OperationDirection; /** * workflow steps */ @@ -832,6 +1372,21 @@ export interface Workflow extends ProxyResource { * workflow last operation identifier. */ lastOperationId?: string; + /** + * workflow command name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly commandName?: string; + /** + * workflow created timestamp. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdTimestamp?: Date; + /** + * workflow last status timestamp. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastStatusTimestamp?: Date; } /** @@ -856,6 +1411,78 @@ export interface OperationDisplayInfo { resource?: string; } +/** + * OperationResourceMetricSpecificationDimension object. + */ +export interface OperationResourceMetricSpecificationDimension { + /** + * Name of the dimension. + */ + name?: string; + /** + * Display name of the dimensions. + */ + displayName?: string; + /** + * Indicates metric should be exported for Shoebox. + */ + toBeExportedForShoebox?: boolean; +} + +/** + * Operation Display Resource object. + */ +export interface OperationResourceMetricSpecification { + /** + * Name of the metric. + */ + name?: string; + /** + * Display name for the metric. + */ + displayName?: string; + /** + * Display description for the metric. + */ + displayDescription?: string; + /** + * Unit for the metric. + */ + unit?: string; + /** + * Aggregation type for the metric. + */ + aggregationType?: string; + /** + * Fill gaps in the metric with zero. + */ + fillGapWithZero?: boolean; + /** + * Dimensions for the metric specification. + */ + dimensions?: OperationResourceMetricSpecificationDimension[]; +} + +/** + * Service specification. + */ +export interface OperationResourceServiceSpecification { + /** + * List of metric specifications. + */ + metricSpecifications?: OperationResourceMetricSpecification[]; +} + +/** + * Properties of the operations resource. + */ +export interface OperationProperties { + /** + * Service specification for the operations resource. + */ + serviceSpecification?: OperationResourceServiceSpecification; +} + /** * The operation supported by storage sync. */ @@ -872,6 +1499,10 @@ export interface OperationEntity { * The origin. */ origin?: string; + /** + * Properties of the operations resource. + */ + properties?: OperationProperties; } /** @@ -1053,9 +1684,10 @@ export interface StorageSyncServiceUpdateParameters { */ tags?: { [propertyName: string]: string }; /** - * The properties of the storage sync service. + * Incoming Traffic Policy. Possible values include: 'AllowAllTraffic', + * 'AllowVirtualNetworksOnly' */ - properties?: any; + incomingTrafficPolicy?: IncomingTrafficPolicy; } /** @@ -1090,7 +1722,49 @@ export interface OperationStatus { } /** - * The resource model definition for a Azure Resource Manager resource with an etag. + * Operation status object + */ +export interface LocationOperationStatus { + /** + * Operation resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Operation Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Operation status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * Start time of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: Date; + /** + * End time of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTime?: Date; + /** + * Error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly error?: StorageSyncApiError; + /** + * Percent complete. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly percentComplete?: number; +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource */ export interface AzureEntityResource extends Resource { /** @@ -1100,6 +1774,36 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +/** + * A private link resource + */ +export interface PrivateLinkResource extends Resource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + +/** + * A list of private link resources + */ +export interface PrivateLinkResourceListResult { + /** + * Array of private link resources + */ + value?: PrivateLinkResource[]; +} + /** * Optional Parameters. */ @@ -1110,6 +1814,16 @@ export interface StorageSyncServicesUpdateOptionalParams extends msRest.RequestO parameters?: StorageSyncServiceUpdateParameters; } +/** + * Optional Parameters. + */ +export interface StorageSyncServicesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Storage Sync Service resource. + */ + parameters?: StorageSyncServiceUpdateParameters; +} + /** * Optional Parameters. */ @@ -1125,36 +1839,128 @@ export interface ServerEndpointsUpdateOptionalParams extends msRest.RequestOptio */ export interface ServerEndpointsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * Any of the properties applicable in PUT request. + * Any of the properties applicable in PUT request. + */ + parameters?: ServerEndpointUpdateParameters; +} + +/** + * An interface representing StorageSyncManagementClientOptions. + */ +export interface StorageSyncManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for List operation. + */ +export interface OperationsListHeaders { + /** + * request id. + */ + xMsRequestId: string; + /** + * correlation request id. + */ + xMsCorrelationRequestId: string; +} + +/** + * Defines headers for Create operation. + */ +export interface StorageSyncServicesCreateHeaders { + /** + * Operation Status Location URI + */ + azureAsyncOperation: string; + /** + * Operation Status Location URI + */ + locationHeader: string; + /** + * Retry After + */ + retryAfter: string; + /** + * Request id + */ + xMsRequestId: string; + /** + * correlation request id + */ + xMsCorrelationRequestId: string; +} + +/** + * Defines headers for Get operation. + */ +export interface StorageSyncServicesGetHeaders { + /** + * request id. + */ + xMsRequestId: string; + /** + * correlation request id. + */ + xMsCorrelationRequestId: string; +} + +/** + * Defines headers for Update operation. + */ +export interface StorageSyncServicesUpdateHeaders { + /** + * Request id + */ + xMsRequestId: string; + /** + * correlation request id + */ + xMsCorrelationRequestId: string; + /** + * Operation Status Location URI + */ + azureAsyncOperation: string; + /** + * Operation Status Location URI */ - parameters?: ServerEndpointUpdateParameters; -} - -/** - * An interface representing StorageSyncManagementClientOptions. - */ -export interface StorageSyncManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; + locationHeader: string; + /** + * Retry After + */ + retryAfter: string; } /** - * Defines headers for List operation. + * Defines headers for Delete operation. */ -export interface OperationsListHeaders { +export interface StorageSyncServicesDeleteHeaders { /** - * request id. + * Request id */ xMsRequestId: string; /** - * correlation request id. + * correlation request id */ xMsCorrelationRequestId: string; + /** + * Operation Status Location URI + */ + azureAsyncOperation: string; + /** + * Operation Status Location URI + */ + location: string; + /** + * Retry After + */ + retryAfter: string; } /** - * Defines headers for Get operation. + * Defines headers for ListByResourceGroup operation. */ -export interface StorageSyncServicesGetHeaders { +export interface StorageSyncServicesListByResourceGroupHeaders { /** * request id. */ @@ -1166,9 +1972,9 @@ export interface StorageSyncServicesGetHeaders { } /** - * Defines headers for Update operation. + * Defines headers for ListBySubscription operation. */ -export interface StorageSyncServicesUpdateHeaders { +export interface StorageSyncServicesListBySubscriptionHeaders { /** * request id. */ @@ -1180,37 +1986,61 @@ export interface StorageSyncServicesUpdateHeaders { } /** - * Defines headers for Delete operation. + * Defines headers for Create operation. */ -export interface StorageSyncServicesDeleteHeaders { +export interface PrivateEndpointConnectionsCreateHeaders { /** - * request id. + * Operation Status Location URI + */ + azureAsyncOperation: string; + /** + * Operation Status Location URI + */ + location: string; + /** + * Retry After + */ + retryAfter: string; + /** + * Request id */ xMsRequestId: string; /** - * correlation request id. + * correlation request id */ xMsCorrelationRequestId: string; } /** - * Defines headers for ListByResourceGroup operation. + * Defines headers for Delete operation. */ -export interface StorageSyncServicesListByResourceGroupHeaders { +export interface PrivateEndpointConnectionsDeleteHeaders { /** - * request id. + * Operation Status Location URI + */ + azureAsyncOperation: string; + /** + * Operation Status Location URI + */ + location: string; + /** + * Retry After + */ + retryAfter: string; + /** + * Request id */ xMsRequestId: string; /** - * correlation request id. + * correlation request id */ xMsCorrelationRequestId: string; } /** - * Defines headers for ListBySubscription operation. + * Defines headers for ListByStorageSyncService operation. */ -export interface StorageSyncServicesListBySubscriptionHeaders { +export interface PrivateEndpointConnectionsListByStorageSyncServiceHeaders { /** * request id. */ @@ -1715,6 +2545,20 @@ export interface OperationStatusGetHeaders { xMsCorrelationRequestId: string; } +/** + * Defines headers for LocationOperationStatus operation. + */ +export interface LocationOperationStatusHeaders { + /** + * request id. + */ + xMsRequestId: string; + /** + * correlation request id. + */ + xMsCorrelationRequestId: string; +} + /** * @interface * The list of storage sync operations. @@ -1735,6 +2579,14 @@ export interface OperationEntityListResult extends Array { export interface StorageSyncServiceArray extends Array { } +/** + * @interface + * List of private endpoint connection associated with the specified storage account + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { +} + /** * @interface * Array of SyncGroup @@ -1784,135 +2636,157 @@ export interface WorkflowArray extends Array { export type Reason = 'Registered' | 'Unregistered' | 'Warned' | 'Suspended' | 'Deleted'; /** - * Defines values for ChangeDetectionMode. - * Possible values include: 'Default', 'Recursive' + * Defines values for IncomingTrafficPolicy. + * Possible values include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' * @readonly * @enum {string} */ -export type ChangeDetectionMode = 'Default' | 'Recursive'; +export type IncomingTrafficPolicy = 'AllowAllTraffic' | 'AllowVirtualNetworksOnly'; /** - * Defines values for NameAvailabilityReason. - * Possible values include: 'Invalid', 'AlreadyExists' + * Defines values for PrivateEndpointServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected' * @readonly * @enum {string} */ -export type NameAvailabilityReason = 'Invalid' | 'AlreadyExists'; +export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected'; /** - * Defines values for CloudTiering. - * Possible values include: 'on', 'off' + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' * @readonly * @enum {string} */ -export type CloudTiering = 'on' | 'off'; +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Deleting' | 'Failed'; /** - * Defines values for OfflineDataTransfer. - * Possible values include: 'on', 'off' + * Defines values for CloudEndpointChangeEnumerationActivityState. + * Possible values include: 'InitialEnumerationInProgress', 'EnumerationInProgress' * @readonly * @enum {string} */ -export type OfflineDataTransfer = 'on' | 'off'; +export type CloudEndpointChangeEnumerationActivityState = 'InitialEnumerationInProgress' | 'EnumerationInProgress'; /** - * Defines values for CloudTiering1. - * Possible values include: 'on', 'off' + * Defines values for CloudEndpointChangeEnumerationTotalCountsState. + * Possible values include: 'Calculating', 'Final' + * @readonly + * @enum {string} + */ +export type CloudEndpointChangeEnumerationTotalCountsState = 'Calculating' | 'Final'; + +/** + * Defines values for ChangeDetectionMode. + * Possible values include: 'Default', 'Recursive' * @readonly * @enum {string} */ -export type CloudTiering1 = 'on' | 'off'; +export type ChangeDetectionMode = 'Default' | 'Recursive'; /** - * Defines values for OfflineDataTransfer1. + * Defines values for FeatureStatus. * Possible values include: 'on', 'off' * @readonly * @enum {string} */ -export type OfflineDataTransfer1 = 'on' | 'off'; +export type FeatureStatus = 'on' | 'off'; /** - * Defines values for DownloadHealth. - * Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * Defines values for InitialDownloadPolicy. + * Possible values include: 'NamespaceOnly', 'NamespaceThenModifiedFiles', 'AvoidTieredFiles' * @readonly * @enum {string} */ -export type DownloadHealth = 'Healthy' | 'Error' | 'SyncBlockedForRestore' | 'SyncBlockedForChangeDetectionPostRestore' | 'NoActivity'; +export type InitialDownloadPolicy = 'NamespaceOnly' | 'NamespaceThenModifiedFiles' | 'AvoidTieredFiles'; /** - * Defines values for UploadHealth. - * Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * Defines values for LocalCacheMode. + * Possible values include: 'DownloadNewAndModifiedFiles', 'UpdateLocallyCachedFiles' * @readonly * @enum {string} */ -export type UploadHealth = 'Healthy' | 'Error' | 'SyncBlockedForRestore' | 'SyncBlockedForChangeDetectionPostRestore' | 'NoActivity'; +export type LocalCacheMode = 'DownloadNewAndModifiedFiles' | 'UpdateLocallyCachedFiles'; /** - * Defines values for CombinedHealth. - * Possible values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - * 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + * Defines values for InitialUploadPolicy. + * Possible values include: 'ServerAuthoritative', 'Merge' * @readonly * @enum {string} */ -export type CombinedHealth = 'Healthy' | 'Error' | 'SyncBlockedForRestore' | 'SyncBlockedForChangeDetectionPostRestore' | 'NoActivity'; +export type InitialUploadPolicy = 'ServerAuthoritative' | 'Merge'; /** - * Defines values for SyncActivity. - * Possible values include: 'Upload', 'Download', 'UploadAndDownload' + * Defines values for ServerEndpointHealthState. + * Possible values include: 'Unavailable', 'Healthy', 'Error' * @readonly * @enum {string} */ -export type SyncActivity = 'Upload' | 'Download' | 'UploadAndDownload'; +export type ServerEndpointHealthState = 'Unavailable' | 'Healthy' | 'Error'; /** - * Defines values for OfflineDataTransferStatus. - * Possible values include: 'InProgress', 'Stopping', 'NotRunning', 'Complete' + * Defines values for ServerEndpointSyncActivityState. + * Possible values include: 'Upload', 'Download', 'UploadAndDownload' * @readonly * @enum {string} */ -export type OfflineDataTransferStatus = 'InProgress' | 'Stopping' | 'NotRunning' | 'Complete'; +export type ServerEndpointSyncActivityState = 'Upload' | 'Download' | 'UploadAndDownload'; /** - * Defines values for Health. - * Possible values include: 'Healthy', 'Error' + * Defines values for ServerEndpointSyncMode. + * Possible values include: 'Regular', 'NamespaceDownload', 'InitialUpload', 'SnapshotUpload', + * 'InitialFullDownload' * @readonly * @enum {string} */ -export type Health = 'Healthy' | 'Error'; +export type ServerEndpointSyncMode = 'Regular' | 'NamespaceDownload' | 'InitialUpload' | 'SnapshotUpload' | 'InitialFullDownload'; /** - * Defines values for CloudTiering2. - * Possible values include: 'on', 'off' + * Defines values for ServerEndpointOfflineDataTransferState. + * Possible values include: 'InProgress', 'Stopping', 'NotRunning', 'Complete' * @readonly * @enum {string} */ -export type CloudTiering2 = 'on' | 'off'; +export type ServerEndpointOfflineDataTransferState = 'InProgress' | 'Stopping' | 'NotRunning' | 'Complete'; /** - * Defines values for OfflineDataTransfer2. - * Possible values include: 'on', 'off' + * Defines values for RegisteredServerAgentVersionStatus. + * Possible values include: 'Ok', 'NearExpiry', 'Expired', 'Blocked' * @readonly * @enum {string} */ -export type OfflineDataTransfer2 = 'on' | 'off'; +export type RegisteredServerAgentVersionStatus = 'Ok' | 'NearExpiry' | 'Expired' | 'Blocked'; /** - * Defines values for Status. + * Defines values for WorkflowStatus. * Possible values include: 'active', 'expired', 'succeeded', 'aborted', 'failed' * @readonly * @enum {string} */ -export type Status = 'active' | 'expired' | 'succeeded' | 'aborted' | 'failed'; +export type WorkflowStatus = 'active' | 'expired' | 'succeeded' | 'aborted' | 'failed'; /** - * Defines values for Operation. + * Defines values for OperationDirection. * Possible values include: 'do', 'undo', 'cancel' * @readonly * @enum {string} */ -export type Operation = 'do' | 'undo' | 'cancel'; +export type OperationDirection = 'do' | 'undo' | 'cancel'; + +/** + * Defines values for NameAvailabilityReason. + * Possible values include: 'Invalid', 'AlreadyExists' + * @readonly + * @enum {string} + */ +export type NameAvailabilityReason = 'Invalid' | 'AlreadyExists'; + +/** + * Defines values for ProgressType. + * Possible values include: 'none', 'initialize', 'download', 'upload', 'recall' + * @readonly + * @enum {string} + */ +export type ProgressType = 'none' | 'initialize' | 'download' | 'upload' | 'recall'; /** * Contains response data for the list operation. @@ -1962,11 +2836,16 @@ export type StorageSyncServicesCheckNameAvailabilityResponse = CheckNameAvailabi /** * Contains response data for the create operation. */ -export type StorageSyncServicesCreateResponse = StorageSyncService & { +export type StorageSyncServicesCreateResponse = StorageSyncService & StorageSyncServicesCreateHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: StorageSyncServicesCreateHeaders; + /** * The response body as text (string format) */ @@ -2094,6 +2973,111 @@ export type StorageSyncServicesListBySubscriptionResponse = StorageSyncServiceAr }; }; +/** + * Contains response data for the listByStorageSyncService operation. + */ +export type PrivateLinkResourcesListByStorageSyncServiceResponse = PrivateLinkResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection & PrivateEndpointConnectionsCreateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsCreateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type PrivateEndpointConnectionsDeleteResponse = PrivateEndpointConnectionsDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsDeleteHeaders; + }; +}; + +/** + * Contains response data for the listByStorageSyncService operation. + */ +export type PrivateEndpointConnectionsListByStorageSyncServiceResponse = PrivateEndpointConnectionListResult & PrivateEndpointConnectionsListByStorageSyncServiceHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsListByStorageSyncServiceHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + /** * Contains response data for the listByStorageSyncService operation. */ @@ -2698,3 +3682,28 @@ export type OperationStatusGetResponse = OperationStatus & OperationStatusGetHea parsedBody: OperationStatus; }; }; + +/** + * Contains response data for the locationOperationStatusMethod operation. + */ +export type LocationOperationStatusResponse = LocationOperationStatus & LocationOperationStatusHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: LocationOperationStatusHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LocationOperationStatus; + }; +}; diff --git a/sdk/storagesync/arm-storagesync/src/models/mappers.ts b/sdk/storagesync/arm-storagesync/src/models/mappers.ts index 5a0f25e6e367..d9ea80226ff6 100644 --- a/sdk/storagesync/arm-storagesync/src/models/mappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -35,6 +35,70 @@ export const StorageSyncErrorDetails: msRest.CompositeMapper = { type: { name: "String" } + }, + requestUri: { + serializedName: "requestUri", + type: { + name: "String" + } + }, + exceptionType: { + serializedName: "exceptionType", + type: { + name: "String" + } + }, + httpMethod: { + serializedName: "httpMethod", + type: { + name: "String" + } + }, + hashedMessage: { + serializedName: "hashedMessage", + type: { + name: "String" + } + }, + httpErrorCode: { + serializedName: "httpErrorCode", + type: { + name: "String" + } + } + } + } +}; + +export const StorageSyncInnerErrorDetails: msRest.CompositeMapper = { + serializedName: "StorageSyncInnerErrorDetails", + type: { + name: "Composite", + className: "StorageSyncInnerErrorDetails", + modelProperties: { + callStack: { + serializedName: "callStack", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + innerException: { + serializedName: "innerException", + type: { + name: "String" + } + }, + innerExceptionCallStack: { + serializedName: "innerExceptionCallStack", + type: { + name: "String" + } } } } @@ -70,6 +134,13 @@ export const StorageSyncApiError: msRest.CompositeMapper = { name: "Composite", className: "StorageSyncErrorDetails" } + }, + innerError: { + serializedName: "innerError", + type: { + name: "Composite", + className: "StorageSyncInnerErrorDetails" + } } } } @@ -128,6 +199,51 @@ export const SubscriptionState: msRest.CompositeMapper = { } }; +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -159,6 +275,38 @@ export const Resource: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + export const TrackedResource: msRest.CompositeMapper = { serializedName: "TrackedResource", type: { @@ -195,6 +343,12 @@ export const StorageSyncService: msRest.CompositeMapper = { className: "StorageSyncService", modelProperties: { ...TrackedResource.type.modelProperties, + incomingTrafficPolicy: { + serializedName: "properties.incomingTrafficPolicy", + type: { + name: "String" + } + }, storageSyncServiceStatus: { readOnly: true, serializedName: "properties.storageSyncServiceStatus", @@ -208,6 +362,40 @@ export const StorageSyncService: msRest.CompositeMapper = { type: { name: "String" } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + lastWorkflowId: { + readOnly: true, + serializedName: "properties.lastWorkflowId", + type: { + name: "String" + } + }, + lastOperationName: { + readOnly: true, + serializedName: "properties.lastOperationName", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } } } } @@ -249,6 +437,227 @@ export const SyncGroup: msRest.CompositeMapper = { } }; +export const CloudEndpointLastChangeEnumerationStatus: msRest.CompositeMapper = { + serializedName: "CloudEndpointLastChangeEnumerationStatus", + type: { + name: "Composite", + className: "CloudEndpointLastChangeEnumerationStatus", + modelProperties: { + startedTimestamp: { + readOnly: true, + serializedName: "startedTimestamp", + type: { + name: "DateTime" + } + }, + completedTimestamp: { + readOnly: true, + serializedName: "completedTimestamp", + type: { + name: "DateTime" + } + }, + namespaceFilesCount: { + readOnly: true, + serializedName: "namespaceFilesCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + namespaceDirectoriesCount: { + readOnly: true, + serializedName: "namespaceDirectoriesCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + namespaceSizeBytes: { + readOnly: true, + serializedName: "namespaceSizeBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + nextRunTimestamp: { + readOnly: true, + serializedName: "nextRunTimestamp", + type: { + name: "DateTime" + } + } + } + } +}; + +export const CloudEndpointChangeEnumerationActivity: msRest.CompositeMapper = { + serializedName: "CloudEndpointChangeEnumerationActivity", + type: { + name: "Composite", + className: "CloudEndpointChangeEnumerationActivity", + modelProperties: { + lastUpdatedTimestamp: { + readOnly: true, + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + }, + operationState: { + readOnly: true, + serializedName: "operationState", + type: { + name: "String" + } + }, + statusCode: { + readOnly: true, + serializedName: "statusCode", + type: { + name: "Number" + } + }, + startedTimestamp: { + readOnly: true, + serializedName: "startedTimestamp", + type: { + name: "DateTime" + } + }, + processedFilesCount: { + readOnly: true, + serializedName: "processedFilesCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + processedDirectoriesCount: { + readOnly: true, + serializedName: "processedDirectoriesCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + totalFilesCount: { + readOnly: true, + serializedName: "totalFilesCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + totalDirectoriesCount: { + readOnly: true, + serializedName: "totalDirectoriesCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + totalSizeBytes: { + readOnly: true, + serializedName: "totalSizeBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + progressPercent: { + readOnly: true, + serializedName: "progressPercent", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + minutesRemaining: { + readOnly: true, + serializedName: "minutesRemaining", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + totalCountsState: { + readOnly: true, + serializedName: "totalCountsState", + type: { + name: "String" + } + }, + deletesProgressPercent: { + readOnly: true, + serializedName: "deletesProgressPercent", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const CloudEndpointChangeEnumerationStatus: msRest.CompositeMapper = { + serializedName: "CloudEndpointChangeEnumerationStatus", + type: { + name: "Composite", + className: "CloudEndpointChangeEnumerationStatus", + modelProperties: { + lastUpdatedTimestamp: { + readOnly: true, + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + }, + lastEnumerationStatus: { + readOnly: true, + serializedName: "lastEnumerationStatus", + type: { + name: "Composite", + className: "CloudEndpointLastChangeEnumerationStatus" + } + }, + activity: { + readOnly: true, + serializedName: "activity", + type: { + name: "Composite", + className: "CloudEndpointChangeEnumerationActivity" + } + } + } + } +}; + export const CloudEndpoint: msRest.CompositeMapper = { serializedName: "CloudEndpoint", type: { @@ -310,6 +719,14 @@ export const CloudEndpoint: msRest.CompositeMapper = { type: { name: "String" } + }, + changeEnumerationStatus: { + readOnly: true, + serializedName: "properties.changeEnumerationStatus", + type: { + name: "Composite", + className: "CloudEndpointChangeEnumerationStatus" + } } } } @@ -394,10 +811,10 @@ export const StorageSyncServiceCreateParameters: msRest.CompositeMapper = { } } }, - properties: { - serializedName: "properties", + incomingTrafficPolicy: { + serializedName: "properties.incomingTrafficPolicy", type: { - name: "Object" + name: "String" } } } @@ -477,6 +894,7 @@ export const ServerEndpointCreateParameters: msRest.CompositeMapper = { }, volumeFreeSpacePercent: { serializedName: "properties.volumeFreeSpacePercent", + defaultValue: 20, constraints: { InclusiveMaximum: 100, InclusiveMinimum: 0 @@ -518,6 +936,24 @@ export const ServerEndpointCreateParameters: msRest.CompositeMapper = { type: { name: "String" } + }, + initialDownloadPolicy: { + serializedName: "properties.initialDownloadPolicy", + type: { + name: "String" + } + }, + localCacheMode: { + serializedName: "properties.localCacheMode", + type: { + name: "String" + } + }, + initialUploadPolicy: { + serializedName: "properties.initialUploadPolicy", + type: { + name: "String" + } } } } @@ -647,6 +1083,12 @@ export const ServerEndpointUpdateParameters: msRest.CompositeMapper = { type: { name: "String" } + }, + localCacheMode: { + serializedName: "properties.localCacheMode", + type: { + name: "String" + } } } } @@ -758,6 +1200,13 @@ export const ServerEndpointSyncSessionStatus: msRest.CompositeMapper = { } } } + }, + lastSyncMode: { + readOnly: true, + serializedName: "lastSyncMode", + type: { + name: "String" + } } } } @@ -825,6 +1274,68 @@ export const ServerEndpointSyncActivityStatus: msRest.CompositeMapper = { type: { name: "Number" } + }, + syncMode: { + readOnly: true, + serializedName: "syncMode", + type: { + name: "String" + } + }, + sessionMinutesRemaining: { + readOnly: true, + serializedName: "sessionMinutesRemaining", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const ServerEndpointBackgroundDataDownloadActivity: msRest.CompositeMapper = { + serializedName: "ServerEndpointBackgroundDataDownloadActivity", + type: { + name: "Composite", + className: "ServerEndpointBackgroundDataDownloadActivity", + modelProperties: { + timestamp: { + readOnly: true, + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + startedTimestamp: { + readOnly: true, + serializedName: "startedTimestamp", + type: { + name: "DateTime" + } + }, + percentProgress: { + readOnly: true, + serializedName: "percentProgress", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + downloadedBytes: { + readOnly: true, + serializedName: "downloadedBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } } } } @@ -904,20 +1415,274 @@ export const ServerEndpointSyncStatus: msRest.CompositeMapper = { name: "Composite", className: "ServerEndpointSyncActivityStatus" } - }, - downloadActivity: { + }, + downloadActivity: { + readOnly: true, + serializedName: "downloadActivity", + type: { + name: "Composite", + className: "ServerEndpointSyncActivityStatus" + } + }, + offlineDataTransferStatus: { + readOnly: true, + serializedName: "offlineDataTransferStatus", + type: { + name: "String" + } + }, + backgroundDataDownloadActivity: { + readOnly: true, + serializedName: "backgroundDataDownloadActivity", + type: { + name: "Composite", + className: "ServerEndpointBackgroundDataDownloadActivity" + } + } + } + } +}; + +export const CloudTieringSpaceSavings: msRest.CompositeMapper = { + serializedName: "CloudTieringSpaceSavings", + type: { + name: "Composite", + className: "CloudTieringSpaceSavings", + modelProperties: { + lastUpdatedTimestamp: { + readOnly: true, + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + }, + volumeSizeBytes: { + readOnly: true, + serializedName: "volumeSizeBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + totalSizeCloudBytes: { + readOnly: true, + serializedName: "totalSizeCloudBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + cachedSizeBytes: { + readOnly: true, + serializedName: "cachedSizeBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + spaceSavingsPercent: { + readOnly: true, + serializedName: "spaceSavingsPercent", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + spaceSavingsBytes: { + readOnly: true, + serializedName: "spaceSavingsBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const CloudTieringCachePerformance: msRest.CompositeMapper = { + serializedName: "CloudTieringCachePerformance", + type: { + name: "Composite", + className: "CloudTieringCachePerformance", + modelProperties: { + lastUpdatedTimestamp: { + readOnly: true, + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + }, + cacheHitBytes: { + readOnly: true, + serializedName: "cacheHitBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + cacheMissBytes: { + readOnly: true, + serializedName: "cacheMissBytes", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + cacheHitBytesPercent: { + readOnly: true, + serializedName: "cacheHitBytesPercent", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const FilesNotTieringError: msRest.CompositeMapper = { + serializedName: "FilesNotTieringError", + type: { + name: "Composite", + className: "FilesNotTieringError", + modelProperties: { + errorCode: { + readOnly: true, + serializedName: "errorCode", + type: { + name: "Number" + } + }, + fileCount: { + readOnly: true, + serializedName: "fileCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const CloudTieringFilesNotTiering: msRest.CompositeMapper = { + serializedName: "CloudTieringFilesNotTiering", + type: { + name: "Composite", + className: "CloudTieringFilesNotTiering", + modelProperties: { + lastUpdatedTimestamp: { + readOnly: true, + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + }, + totalFileCount: { + readOnly: true, + serializedName: "totalFileCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + errors: { + readOnly: true, + serializedName: "errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilesNotTieringError" + } + } + } + } + } + } +}; + +export const CloudTieringVolumeFreeSpacePolicyStatus: msRest.CompositeMapper = { + serializedName: "CloudTieringVolumeFreeSpacePolicyStatus", + type: { + name: "Composite", + className: "CloudTieringVolumeFreeSpacePolicyStatus", + modelProperties: { + lastUpdatedTimestamp: { + readOnly: true, + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + }, + effectiveVolumeFreeSpacePolicy: { + readOnly: true, + serializedName: "effectiveVolumeFreeSpacePolicy", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + }, + currentVolumeFreeSpacePercent: { + readOnly: true, + serializedName: "currentVolumeFreeSpacePercent", + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const CloudTieringDatePolicyStatus: msRest.CompositeMapper = { + serializedName: "CloudTieringDatePolicyStatus", + type: { + name: "Composite", + className: "CloudTieringDatePolicyStatus", + modelProperties: { + lastUpdatedTimestamp: { readOnly: true, - serializedName: "downloadActivity", + serializedName: "lastUpdatedTimestamp", type: { - name: "Composite", - className: "ServerEndpointSyncActivityStatus" + name: "DateTime" } }, - offlineDataTransferStatus: { + tieredFilesMostRecentAccessTimestamp: { readOnly: true, - serializedName: "offlineDataTransferStatus", + serializedName: "tieredFilesMostRecentAccessTimestamp", type: { - name: "String" + name: "DateTime" } } } @@ -930,6 +1695,13 @@ export const ServerEndpointCloudTieringStatus: msRest.CompositeMapper = { name: "Composite", className: "ServerEndpointCloudTieringStatus", modelProperties: { + lastUpdatedTimestamp: { + readOnly: true, + serializedName: "lastUpdatedTimestamp", + type: { + name: "DateTime" + } + }, health: { readOnly: true, serializedName: "health", @@ -937,9 +1709,9 @@ export const ServerEndpointCloudTieringStatus: msRest.CompositeMapper = { name: "String" } }, - lastUpdatedTimestamp: { + healthLastUpdatedTimestamp: { readOnly: true, - serializedName: "lastUpdatedTimestamp", + serializedName: "healthLastUpdatedTimestamp", type: { name: "DateTime" } @@ -957,6 +1729,46 @@ export const ServerEndpointCloudTieringStatus: msRest.CompositeMapper = { type: { name: "DateTime" } + }, + spaceSavings: { + readOnly: true, + serializedName: "spaceSavings", + type: { + name: "Composite", + className: "CloudTieringSpaceSavings" + } + }, + cachePerformance: { + readOnly: true, + serializedName: "cachePerformance", + type: { + name: "Composite", + className: "CloudTieringCachePerformance" + } + }, + filesNotTiering: { + readOnly: true, + serializedName: "filesNotTiering", + type: { + name: "Composite", + className: "CloudTieringFilesNotTiering" + } + }, + volumeFreeSpacePolicyStatus: { + readOnly: true, + serializedName: "volumeFreeSpacePolicyStatus", + type: { + name: "Composite", + className: "CloudTieringVolumeFreeSpacePolicyStatus" + } + }, + datePolicyStatus: { + readOnly: true, + serializedName: "datePolicyStatus", + type: { + name: "Composite", + className: "CloudTieringDatePolicyStatus" + } } } } @@ -1150,6 +1962,31 @@ export const ServerEndpoint: msRest.CompositeMapper = { name: "Composite", className: "ServerEndpointRecallStatus" } + }, + initialDownloadPolicy: { + serializedName: "properties.initialDownloadPolicy", + type: { + name: "String" + } + }, + localCacheMode: { + serializedName: "properties.localCacheMode", + type: { + name: "String" + } + }, + initialUploadPolicy: { + serializedName: "properties.initialUploadPolicy", + type: { + name: "String" + } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } } } } @@ -1174,6 +2011,20 @@ export const RegisteredServer: msRest.CompositeMapper = { name: "String" } }, + agentVersionStatus: { + readOnly: true, + serializedName: "properties.agentVersionStatus", + type: { + name: "String" + } + }, + agentVersionExpirationDate: { + readOnly: true, + serializedName: "properties.agentVersionExpirationDate", + type: { + name: "DateTime" + } + }, serverOSVersion: { serializedName: "properties.serverOSVersion", type: { @@ -1270,11 +2121,24 @@ export const RegisteredServer: msRest.CompositeMapper = { name: "String" } }, + monitoringEndpointUri: { + serializedName: "properties.monitoringEndpointUri", + type: { + name: "String" + } + }, monitoringConfiguration: { serializedName: "properties.monitoringConfiguration", type: { name: "String" } + }, + serverName: { + readOnly: true, + serializedName: "properties.serverName", + type: { + name: "String" + } } } } @@ -1343,6 +2207,27 @@ export const Workflow: msRest.CompositeMapper = { type: { name: "String" } + }, + commandName: { + readOnly: true, + serializedName: "properties.commandName", + type: { + name: "String" + } + }, + createdTimestamp: { + readOnly: true, + serializedName: "properties.createdTimestamp", + type: { + name: "DateTime" + } + }, + lastStatusTimestamp: { + readOnly: true, + serializedName: "properties.lastStatusTimestamp", + type: { + name: "DateTime" + } } } } @@ -1382,6 +2267,131 @@ export const OperationDisplayInfo: msRest.CompositeMapper = { } }; +export const OperationResourceMetricSpecificationDimension: msRest.CompositeMapper = { + serializedName: "OperationResourceMetricSpecificationDimension", + type: { + name: "Composite", + className: "OperationResourceMetricSpecificationDimension", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const OperationResourceMetricSpecification: msRest.CompositeMapper = { + serializedName: "OperationResourceMetricSpecification", + type: { + name: "Composite", + className: "OperationResourceMetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationResourceMetricSpecificationDimension" + } + } + } + } + } + } +}; + +export const OperationResourceServiceSpecification: msRest.CompositeMapper = { + serializedName: "OperationResourceServiceSpecification", + type: { + name: "Composite", + className: "OperationResourceServiceSpecification", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationResourceMetricSpecification" + } + } + } + } + } + } +}; + +export const OperationProperties: msRest.CompositeMapper = { + serializedName: "OperationProperties", + type: { + name: "Composite", + className: "OperationProperties", + modelProperties: { + serviceSpecification: { + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "OperationResourceServiceSpecification" + } + } + } + } +}; + export const OperationEntity: msRest.CompositeMapper = { serializedName: "OperationEntity", type: { @@ -1406,6 +2416,13 @@ export const OperationEntity: msRest.CompositeMapper = { type: { name: "String" } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "OperationProperties" + } } } } @@ -1712,10 +2729,10 @@ export const StorageSyncServiceUpdateParameters: msRest.CompositeMapper = { } } }, - properties: { - serializedName: "properties", + incomingTrafficPolicy: { + serializedName: "properties.incomingTrafficPolicy", type: { - name: "Object" + name: "String" } } } @@ -1768,6 +2785,66 @@ export const OperationStatus: msRest.CompositeMapper = { } }; +export const LocationOperationStatus: msRest.CompositeMapper = { + serializedName: "LocationOperationStatus", + type: { + name: "Composite", + className: "LocationOperationStatus", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + readOnly: true, + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "StorageSyncApiError" + } + }, + percentComplete: { + readOnly: true, + serializedName: "percentComplete", + type: { + name: "Number" + } + } + } + } +}; + export const AzureEntityResource: msRest.CompositeMapper = { serializedName: "AzureEntityResource", type: { @@ -1786,6 +2863,69 @@ export const AzureEntityResource: msRest.CompositeMapper = { } }; +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + export const OperationsListHeaders: msRest.CompositeMapper = { serializedName: "operations-list-headers", type: { @@ -1808,6 +2948,46 @@ export const OperationsListHeaders: msRest.CompositeMapper = { } }; +export const StorageSyncServicesCreateHeaders: msRest.CompositeMapper = { + serializedName: "storagesyncservices-create-headers", + type: { + name: "Composite", + className: "StorageSyncServicesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + locationHeader: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + }, + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String" + } + } + } + } +}; + export const StorageSyncServicesGetHeaders: msRest.CompositeMapper = { serializedName: "storagesyncservices-get-headers", type: { @@ -1847,6 +3027,24 @@ export const StorageSyncServicesUpdateHeaders: msRest.CompositeMapper = { type: { name: "String" } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + locationHeader: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } } } } @@ -1869,6 +3067,24 @@ export const StorageSyncServicesDeleteHeaders: msRest.CompositeMapper = { type: { name: "String" } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } } } } @@ -1918,6 +3134,108 @@ export const StorageSyncServicesListBySubscriptionHeaders: msRest.CompositeMappe } }; +export const PrivateEndpointConnectionsCreateHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-create-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + }, + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-delete-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + }, + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsListByStorageSyncServiceHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-listbystoragesyncservice-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsListByStorageSyncServiceHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String" + } + } + } + } +}; + export const SyncGroupsListByStorageSyncServiceHeaders: msRest.CompositeMapper = { serializedName: "syncgroups-listbystoragesyncservice-headers", type: { @@ -2688,6 +4006,28 @@ export const OperationStatusGetHeaders: msRest.CompositeMapper = { } }; +export const LocationOperationStatusHeaders: msRest.CompositeMapper = { + serializedName: "locationoperationstatus-headers", + type: { + name: "Composite", + className: "LocationOperationStatusHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String" + } + } + } + } +}; + export const OperationEntityListResult: msRest.CompositeMapper = { serializedName: "OperationEntityListResult", type: { @@ -2738,6 +4078,28 @@ export const StorageSyncServiceArray: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + export const SyncGroupArray: msRest.CompositeMapper = { serializedName: "SyncGroupArray", type: { diff --git a/sdk/storagesync/arm-storagesync/src/models/operationStatusOperationsMappers.ts b/sdk/storagesync/arm-storagesync/src/models/operationStatusOperationsMappers.ts index 4de39529d32b..81469b8e3e2b 100644 --- a/sdk/storagesync/arm-storagesync/src/models/operationStatusOperationsMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/operationStatusOperationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -11,5 +11,6 @@ export { OperationStatusGetHeaders, StorageSyncApiError, StorageSyncError, - StorageSyncErrorDetails + StorageSyncErrorDetails, + StorageSyncInnerErrorDetails } from "../models/mappers"; diff --git a/sdk/storagesync/arm-storagesync/src/models/operationsMappers.ts b/sdk/storagesync/arm-storagesync/src/models/operationsMappers.ts index 0300c447523d..2db661d1b74a 100644 --- a/sdk/storagesync/arm-storagesync/src/models/operationsMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -10,8 +10,13 @@ export { OperationDisplayInfo, OperationEntity, OperationEntityListResult, + OperationProperties, + OperationResourceMetricSpecification, + OperationResourceMetricSpecificationDimension, + OperationResourceServiceSpecification, OperationsListHeaders, StorageSyncApiError, StorageSyncError, - StorageSyncErrorDetails + StorageSyncErrorDetails, + StorageSyncInnerErrorDetails } from "../models/mappers"; diff --git a/sdk/storagesync/arm-storagesync/src/models/parameters.ts b/sdk/storagesync/arm-storagesync/src/models/parameters.ts index 4f73078d7bbc..33de55b3dfe2 100644 --- a/sdk/storagesync/arm-storagesync/src/models/parameters.ts +++ b/sdk/storagesync/arm-storagesync/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -74,6 +73,16 @@ export const operationId: msRest.OperationURLParameter = { } } }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -81,8 +90,7 @@ export const resourceGroupName: msRest.OperationURLParameter = { serializedName: "resourceGroupName", constraints: { MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ + MinLength: 1 }, type: { name: "String" diff --git a/sdk/storagesync/arm-storagesync/src/models/privateEndpointConnectionsMappers.ts b/sdk/storagesync/arm-storagesync/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..3cd8a7f79ccb --- /dev/null +++ b/sdk/storagesync/arm-storagesync/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,54 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudEndpoint, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, + CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointConnectionsCreateHeaders, + PrivateEndpointConnectionsDeleteHeaders, + PrivateEndpointConnectionsListByStorageSyncServiceHeaders, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + RegisteredServer, + RegisteredServerCreateParameters, + Resource, + ServerEndpoint, + ServerEndpointBackgroundDataDownloadActivity, + ServerEndpointCloudTieringStatus, + ServerEndpointCreateParameters, + ServerEndpointFilesNotSyncingError, + ServerEndpointRecallError, + ServerEndpointRecallStatus, + ServerEndpointSyncActivityStatus, + ServerEndpointSyncSessionStatus, + ServerEndpointSyncStatus, + StorageSyncApiError, + StorageSyncError, + StorageSyncErrorDetails, + StorageSyncInnerErrorDetails, + StorageSyncService, + SyncGroup, + SyncGroupCreateParameters, + TrackedResource, + Workflow +} from "../models/mappers"; diff --git a/sdk/storagesync/arm-storagesync/src/models/privateLinkResourcesMappers.ts b/sdk/storagesync/arm-storagesync/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..b7df2ace5cd8 --- /dev/null +++ b/sdk/storagesync/arm-storagesync/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudEndpoint, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, + CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, + CloudError, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + ProxyResource, + RegisteredServer, + RegisteredServerCreateParameters, + Resource, + ServerEndpoint, + ServerEndpointBackgroundDataDownloadActivity, + ServerEndpointCloudTieringStatus, + ServerEndpointCreateParameters, + ServerEndpointFilesNotSyncingError, + ServerEndpointRecallError, + ServerEndpointRecallStatus, + ServerEndpointSyncActivityStatus, + ServerEndpointSyncSessionStatus, + ServerEndpointSyncStatus, + StorageSyncService, + SyncGroup, + SyncGroupCreateParameters, + TrackedResource, + Workflow +} from "../models/mappers"; diff --git a/sdk/storagesync/arm-storagesync/src/models/registeredServersMappers.ts b/sdk/storagesync/arm-storagesync/src/models/registeredServersMappers.ts index 558aecd968b0..5cedddeae615 100644 --- a/sdk/storagesync/arm-storagesync/src/models/registeredServersMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/registeredServersMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -10,7 +10,20 @@ export { AzureEntityResource, BaseResource, CloudEndpoint, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RegisteredServer, RegisteredServerArray, @@ -22,6 +35,7 @@ export { RegisteredServersTriggerRolloverHeaders, Resource, ServerEndpoint, + ServerEndpointBackgroundDataDownloadActivity, ServerEndpointCloudTieringStatus, ServerEndpointCreateParameters, ServerEndpointFilesNotSyncingError, @@ -33,6 +47,7 @@ export { StorageSyncApiError, StorageSyncError, StorageSyncErrorDetails, + StorageSyncInnerErrorDetails, StorageSyncService, SyncGroup, SyncGroupCreateParameters, diff --git a/sdk/storagesync/arm-storagesync/src/models/serverEndpointsMappers.ts b/sdk/storagesync/arm-storagesync/src/models/serverEndpointsMappers.ts index d2cf597bac5b..9c78f7d7bf02 100644 --- a/sdk/storagesync/arm-storagesync/src/models/serverEndpointsMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/serverEndpointsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -10,7 +10,20 @@ export { AzureEntityResource, BaseResource, CloudEndpoint, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RecallActionParameters, RegisteredServer, @@ -18,6 +31,7 @@ export { Resource, ServerEndpoint, ServerEndpointArray, + ServerEndpointBackgroundDataDownloadActivity, ServerEndpointCloudTieringStatus, ServerEndpointCreateParameters, ServerEndpointFilesNotSyncingError, @@ -36,6 +50,7 @@ export { StorageSyncApiError, StorageSyncError, StorageSyncErrorDetails, + StorageSyncInnerErrorDetails, StorageSyncService, SyncGroup, SyncGroupCreateParameters, diff --git a/sdk/storagesync/arm-storagesync/src/models/storageSyncServicesMappers.ts b/sdk/storagesync/arm-storagesync/src/models/storageSyncServicesMappers.ts index 2bc4aa2c18e0..b8ec23452fd8 100644 --- a/sdk/storagesync/arm-storagesync/src/models/storageSyncServicesMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/storageSyncServicesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,13 +12,27 @@ export { CheckNameAvailabilityParameters, CheckNameAvailabilityResult, CloudEndpoint, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, CloudError, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RegisteredServer, RegisteredServerCreateParameters, Resource, ServerEndpoint, + ServerEndpointBackgroundDataDownloadActivity, ServerEndpointCloudTieringStatus, ServerEndpointCreateParameters, ServerEndpointFilesNotSyncingError, @@ -30,9 +44,11 @@ export { StorageSyncApiError, StorageSyncError, StorageSyncErrorDetails, + StorageSyncInnerErrorDetails, StorageSyncService, StorageSyncServiceArray, StorageSyncServiceCreateParameters, + StorageSyncServicesCreateHeaders, StorageSyncServicesDeleteHeaders, StorageSyncServicesGetHeaders, StorageSyncServicesListByResourceGroupHeaders, diff --git a/sdk/storagesync/arm-storagesync/src/models/syncGroupsMappers.ts b/sdk/storagesync/arm-storagesync/src/models/syncGroupsMappers.ts index f7e5c093c068..48f60e9cfd43 100644 --- a/sdk/storagesync/arm-storagesync/src/models/syncGroupsMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/syncGroupsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -10,12 +10,26 @@ export { AzureEntityResource, BaseResource, CloudEndpoint, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RegisteredServer, RegisteredServerCreateParameters, Resource, ServerEndpoint, + ServerEndpointBackgroundDataDownloadActivity, ServerEndpointCloudTieringStatus, ServerEndpointCreateParameters, ServerEndpointFilesNotSyncingError, @@ -27,6 +41,7 @@ export { StorageSyncApiError, StorageSyncError, StorageSyncErrorDetails, + StorageSyncInnerErrorDetails, StorageSyncService, SyncGroup, SyncGroupArray, diff --git a/sdk/storagesync/arm-storagesync/src/models/workflowsMappers.ts b/sdk/storagesync/arm-storagesync/src/models/workflowsMappers.ts index cc6031cb217c..6a4ec918b01d 100644 --- a/sdk/storagesync/arm-storagesync/src/models/workflowsMappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/workflowsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -10,12 +10,26 @@ export { AzureEntityResource, BaseResource, CloudEndpoint, + CloudEndpointChangeEnumerationActivity, + CloudEndpointChangeEnumerationStatus, CloudEndpointCreateParameters, + CloudEndpointLastChangeEnumerationStatus, + CloudTieringCachePerformance, + CloudTieringDatePolicyStatus, + CloudTieringFilesNotTiering, + CloudTieringSpaceSavings, + CloudTieringVolumeFreeSpacePolicyStatus, + FilesNotTieringError, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RegisteredServer, RegisteredServerCreateParameters, Resource, ServerEndpoint, + ServerEndpointBackgroundDataDownloadActivity, ServerEndpointCloudTieringStatus, ServerEndpointCreateParameters, ServerEndpointFilesNotSyncingError, @@ -27,6 +41,7 @@ export { StorageSyncApiError, StorageSyncError, StorageSyncErrorDetails, + StorageSyncInnerErrorDetails, StorageSyncService, SyncGroup, SyncGroupCreateParameters, diff --git a/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts index 0885608e307a..ed60ae727512 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -440,7 +439,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsGetHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsGetHeaders } }, serializer @@ -467,7 +467,8 @@ const listBySyncGroupOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsListBySyncGroupHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsListBySyncGroupHeaders } }, serializer @@ -494,7 +495,8 @@ const restoreheartbeatOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsRestoreheartbeatHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsRestoreheartbeatHeaders } }, serializer @@ -532,7 +534,8 @@ const beginCreateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsCreateHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsCreateHeaders } }, serializer @@ -565,7 +568,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsDeleteHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsDeleteHeaders } }, serializer @@ -602,7 +606,8 @@ const beginPreBackupOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsPreBackupHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsPreBackupHeaders } }, serializer @@ -640,7 +645,8 @@ const beginPostBackupOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsPostBackupHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsPostBackupHeaders } }, serializer @@ -677,7 +683,8 @@ const beginPreRestoreOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsPreRestoreHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsPreRestoreHeaders } }, serializer @@ -714,7 +721,8 @@ const beginPostRestoreOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsPostRestoreHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsPostRestoreHeaders } }, serializer @@ -751,7 +759,8 @@ const beginTriggerChangeDetectionOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.CloudEndpointsTriggerChangeDetectionHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.CloudEndpointsTriggerChangeDetectionHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/operations/index.ts b/sdk/storagesync/arm-storagesync/src/operations/index.ts index d6e1eee242fe..089c08930ec8 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/index.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,6 +9,8 @@ export * from "./operations"; export * from "./storageSyncServices"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; export * from "./syncGroups"; export * from "./cloudEndpoints"; export * from "./serverEndpoints"; diff --git a/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts b/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts index 5e94dc133c06..3dcd18ecaae3 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -91,7 +90,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.OperationStatusGetHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.OperationStatusGetHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/operations/operations.ts b/sdk/storagesync/arm-storagesync/src/operations/operations.ts index 5e526f5a7e9c..a3942123d108 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/operations.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -96,7 +95,8 @@ const listOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.OperationsListHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.OperationsListHeaders } }, serializer @@ -109,6 +109,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -118,7 +121,8 @@ const listNextOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.OperationsListHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.OperationsListHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/operations/privateEndpointConnections.ts b/sdk/storagesync/arm-storagesync/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..a32d80f2c73a --- /dev/null +++ b/sdk/storagesync/arm-storagesync/src/operations/privateEndpointConnections.ts @@ -0,0 +1,307 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { StorageSyncManagementClientContext } from "../storageSyncManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: StorageSyncManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {StorageSyncManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageSyncManagementClientContext) { + this.client = client; + } + + /** + * Gets the specified private endpoint connection associated with the storage sync service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param callback The callback + */ + get(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + storageSyncServiceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the storage sync + * service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,storageSyncServiceName,privateEndpointConnectionName,properties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the storage sync service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,storageSyncServiceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Get a PrivateEndpointConnection List. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param callback The callback + */ + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param options The optional parameters + * @param callback The callback + */ + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + storageSyncServiceName, + options + }, + listByStorageSyncServiceOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the storage sync + * service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + storageSyncServiceName, + privateEndpointConnectionName, + properties, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes the specified private endpoint connection associated with the storage sync service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + storageSyncServiceName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.storageSyncServiceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.StorageSyncError + } + }, + serializer +}; + +const listByStorageSyncServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageSyncServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult, + headersMapper: Mappers.PrivateEndpointConnectionsListByStorageSyncServiceHeaders + }, + default: { + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.PrivateEndpointConnectionsListByStorageSyncServiceHeaders + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.storageSyncServiceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + headersMapper: Mappers.PrivateEndpointConnectionsCreateHeaders + }, + 202: { + headersMapper: Mappers.PrivateEndpointConnectionsCreateHeaders + }, + default: { + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.PrivateEndpointConnectionsCreateHeaders + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.storageSyncServiceName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 202: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 204: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + default: { + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + } + }, + serializer +}; diff --git a/sdk/storagesync/arm-storagesync/src/operations/privateLinkResources.ts b/sdk/storagesync/arm-storagesync/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..9132cd29c03b --- /dev/null +++ b/sdk/storagesync/arm-storagesync/src/operations/privateLinkResources.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { StorageSyncManagementClientContext } from "../storageSyncManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: StorageSyncManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {StorageSyncManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageSyncManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a storage sync service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param callback The callback + */ + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName The name of the storage sync service name within the specified + * resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + storageSyncServiceName, + options + }, + listByStorageSyncServiceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByStorageSyncServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.storageSyncServiceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts b/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts index a82543597dcd..7dde283ae38c 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -223,7 +222,8 @@ const listByStorageSyncServiceOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.RegisteredServersListByStorageSyncServiceHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.RegisteredServersListByStorageSyncServiceHeaders } }, serializer @@ -250,7 +250,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.RegisteredServersGetHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.RegisteredServersGetHeaders } }, serializer @@ -287,7 +288,8 @@ const beginCreateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.RegisteredServersCreateHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.RegisteredServersCreateHeaders } }, serializer @@ -319,7 +321,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.RegisteredServersDeleteHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.RegisteredServersDeleteHeaders } }, serializer @@ -355,7 +358,8 @@ const beginTriggerRolloverOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts index e4ebf1aa217e..a804a4f89f6d 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -278,7 +277,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ServerEndpointsGetHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.ServerEndpointsGetHeaders } }, serializer @@ -305,7 +305,8 @@ const listBySyncGroupOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ServerEndpointsListBySyncGroupHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.ServerEndpointsListBySyncGroupHeaders } }, serializer @@ -343,7 +344,8 @@ const beginCreateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ServerEndpointsCreateHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.ServerEndpointsCreateHeaders } }, serializer @@ -381,7 +383,8 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ServerEndpointsUpdateHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.ServerEndpointsUpdateHeaders } }, serializer @@ -411,7 +414,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ServerEndpointsDeleteHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.ServerEndpointsDeleteHeaders } }, serializer @@ -448,7 +452,8 @@ const beginRecallActionOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.ServerEndpointsRecallActionHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.ServerEndpointsRecallActionHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts b/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts index 4b38dbe1496f..33abd8df9cd0 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/storageSyncServicesMappers"; import * as Parameters from "../models/parameters"; @@ -66,32 +66,9 @@ export class StorageSyncServices { * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, storageSyncServiceName: string, parameters: Models.StorageSyncServiceCreateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSyncServiceName Name of Storage Sync Service resource. - * @param parameters Storage Sync Service resource name. - * @param callback The callback - */ - create(resourceGroupName: string, storageSyncServiceName: string, parameters: Models.StorageSyncServiceCreateParameters, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSyncServiceName Name of Storage Sync Service resource. - * @param parameters Storage Sync Service resource name. - * @param options The optional parameters - * @param callback The callback - */ - create(resourceGroupName: string, storageSyncServiceName: string, parameters: Models.StorageSyncServiceCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(resourceGroupName: string, storageSyncServiceName: string, parameters: Models.StorageSyncServiceCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - storageSyncServiceName, - parameters, - options - }, - createOperationSpec, - callback) as Promise; + create(resourceGroupName: string, storageSyncServiceName: string, parameters: Models.StorageSyncServiceCreateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,storageSyncServiceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -133,29 +110,9 @@ export class StorageSyncServices { * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, storageSyncServiceName: string, options?: Models.StorageSyncServicesUpdateOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSyncServiceName Name of Storage Sync Service resource. - * @param callback The callback - */ - update(resourceGroupName: string, storageSyncServiceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSyncServiceName Name of Storage Sync Service resource. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, storageSyncServiceName: string, options: Models.StorageSyncServicesUpdateOptionalParams, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, storageSyncServiceName: string, options?: Models.StorageSyncServicesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - storageSyncServiceName, - options - }, - updateOperationSpec, - callback) as Promise; + update(resourceGroupName: string, storageSyncServiceName: string, options?: Models.StorageSyncServicesUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,storageSyncServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -165,29 +122,9 @@ export class StorageSyncServices { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSyncServiceName Name of Storage Sync Service resource. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, storageSyncServiceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param storageSyncServiceName Name of Storage Sync Service resource. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, storageSyncServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - storageSyncServiceName, - options - }, - deleteMethodOperationSpec, - callback) as Promise; + deleteMethod(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,storageSyncServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -241,6 +178,62 @@ export class StorageSyncServices { listBySubscriptionOperationSpec, callback) as Promise; } + + /** + * Create a new StorageSyncService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param parameters Storage Sync Service resource name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, storageSyncServiceName: string, parameters: Models.StorageSyncServiceCreateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + storageSyncServiceName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Patch a given StorageSyncService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, storageSyncServiceName: string, options?: Models.StorageSyncServicesBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + storageSyncServiceName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Delete a given StorageSyncService. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, storageSyncServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + storageSyncServiceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } } // Operation Specifications @@ -276,8 +269,8 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { serializer }; -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", urlParameters: [ Parameters.subscriptionId, @@ -290,31 +283,25 @@ const createOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.StorageSyncServiceCreateParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.StorageSyncService + bodyMapper: Mappers.StorageSyncService, + headersMapper: Mappers.StorageSyncServicesGetHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.StorageSyncServicesGetHeaders } }, serializer }; -const getOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.resourceGroupName ], queryParameters: [ Parameters.apiVersion @@ -324,23 +311,22 @@ const getOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.StorageSyncService, - headersMapper: Mappers.StorageSyncServicesGetHeaders + bodyMapper: Mappers.StorageSyncServiceArray, + headersMapper: Mappers.StorageSyncServicesListByResourceGroupHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.StorageSyncServicesListByResourceGroupHeaders } }, serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/storageSyncServices", urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion @@ -348,27 +334,21 @@ const updateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: [ - "options", - "parameters" - ], - mapper: Mappers.StorageSyncServiceUpdateParameters - }, responses: { 200: { - bodyMapper: Mappers.StorageSyncService, - headersMapper: Mappers.StorageSyncServicesUpdateHeaders + bodyMapper: Mappers.StorageSyncServiceArray, + headersMapper: Mappers.StorageSyncServicesListBySubscriptionHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.StorageSyncServicesListBySubscriptionHeaders } }, serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", urlParameters: [ Parameters.subscriptionId, @@ -381,26 +361,36 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StorageSyncServiceCreateParameters, + required: true + } + }, responses: { 200: { - headersMapper: Mappers.StorageSyncServicesDeleteHeaders + bodyMapper: Mappers.StorageSyncService, + headersMapper: Mappers.StorageSyncServicesCreateHeaders }, - 204: { - headersMapper: Mappers.StorageSyncServicesDeleteHeaders + 202: { + headersMapper: Mappers.StorageSyncServicesCreateHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.StorageSyncServicesCreateHeaders } }, serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.storageSyncServiceName ], queryParameters: [ Parameters.apiVersion @@ -408,23 +398,36 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.StorageSyncServiceUpdateParameters + }, responses: { 200: { - bodyMapper: Mappers.StorageSyncServiceArray, - headersMapper: Mappers.StorageSyncServicesListByResourceGroupHeaders + bodyMapper: Mappers.StorageSyncService, + headersMapper: Mappers.StorageSyncServicesUpdateHeaders + }, + 202: { + headersMapper: Mappers.StorageSyncServicesUpdateHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.StorageSyncServicesUpdateHeaders } }, serializer }; -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/storageSyncServices", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", urlParameters: [ - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageSyncServiceName ], queryParameters: [ Parameters.apiVersion @@ -434,11 +437,17 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.StorageSyncServiceArray, - headersMapper: Mappers.StorageSyncServicesListBySubscriptionHeaders + headersMapper: Mappers.StorageSyncServicesDeleteHeaders + }, + 202: { + headersMapper: Mappers.StorageSyncServicesDeleteHeaders + }, + 204: { + headersMapper: Mappers.StorageSyncServicesDeleteHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.StorageSyncServicesDeleteHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts b/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts index b8af33870b65..e2cfd020acde 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -193,7 +192,8 @@ const listByStorageSyncServiceOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.SyncGroupsListByStorageSyncServiceHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.SyncGroupsListByStorageSyncServiceHeaders } }, serializer @@ -227,7 +227,8 @@ const createOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.SyncGroupsCreateHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.SyncGroupsCreateHeaders } }, serializer @@ -254,7 +255,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.SyncGroupsGetHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.SyncGroupsGetHeaders } }, serializer @@ -283,7 +285,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.SyncGroupsDeleteHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.SyncGroupsDeleteHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/operations/workflows.ts b/sdk/storagesync/arm-storagesync/src/operations/workflows.ts index a2b8c6bbfe2d..ff41884ab8c8 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/workflows.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/workflows.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -153,7 +152,8 @@ const listByStorageSyncServiceOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.WorkflowsListByStorageSyncServiceHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.WorkflowsListByStorageSyncServiceHeaders } }, serializer @@ -180,7 +180,8 @@ const getOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.WorkflowsGetHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.WorkflowsGetHeaders } }, serializer @@ -206,7 +207,8 @@ const abortOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.WorkflowsAbortHeaders }, default: { - bodyMapper: Mappers.StorageSyncError + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.WorkflowsAbortHeaders } }, serializer diff --git a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts index 9197adff1266..e5871553dd51 100644 --- a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts +++ b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,6 +11,7 @@ import * as msRest from "@azure/ms-rest-js"; import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { StorageSyncManagementClientContext } from "./storageSyncManagementClientContext"; @@ -20,6 +20,8 @@ class StorageSyncManagementClient extends StorageSyncManagementClientContext { // Operation groups operations: operations.Operations; storageSyncServices: operations.StorageSyncServices; + privateLinkResources: operations.PrivateLinkResources; + privateEndpointConnections: operations.PrivateEndpointConnections; syncGroups: operations.SyncGroups; cloudEndpoints: operations.CloudEndpoints; serverEndpoints: operations.ServerEndpoints; @@ -42,6 +44,8 @@ class StorageSyncManagementClient extends StorageSyncManagementClientContext { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.storageSyncServices = new operations.StorageSyncServices(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); this.syncGroups = new operations.SyncGroups(this); this.cloudEndpoints = new operations.CloudEndpoints(this); this.serverEndpoints = new operations.ServerEndpoints(this); @@ -49,9 +53,68 @@ class StorageSyncManagementClient extends StorageSyncManagementClientContext { this.workflows = new operations.Workflows(this); this.operationStatus = new operations.OperationStatusOperations(this); } + + /** + * Get Operation status + * @param locationName The desired region to obtain information from. + * @param operationId operation Id + * @param [options] The optional parameters + * @returns Promise + */ + locationOperationStatusMethod(locationName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The desired region to obtain information from. + * @param operationId operation Id + * @param callback The callback + */ + locationOperationStatusMethod(locationName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param locationName The desired region to obtain information from. + * @param operationId operation Id + * @param options The optional parameters + * @param callback The callback + */ + locationOperationStatusMethod(locationName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + locationOperationStatusMethod(locationName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + locationName, + operationId, + options + }, + locationOperationStatusMethodOperationSpec, + callback) as Promise; + } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const locationOperationStatusMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LocationOperationStatus, + headersMapper: Mappers.LocationOperationStatusHeaders + }, + default: { + bodyMapper: Mappers.StorageSyncError, + headersMapper: Mappers.LocationOperationStatusHeaders + } + }, + serializer +}; export { StorageSyncManagementClient, diff --git a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts index 8e15729df941..30ba6a0a4dd3 100644 --- a/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts +++ b/sdk/storagesync/arm-storagesync/src/storageSyncManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-storagesync"; const packageVersion = "8.1.1"; @@ -50,7 +49,7 @@ export class StorageSyncManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2019-06-01'; + this.apiVersion = '2020-09-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";