diff --git a/sdk/storagecache/arm-storagecache/LICENSE.txt b/sdk/storagecache/arm-storagecache/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/storagecache/arm-storagecache/LICENSE.txt +++ b/sdk/storagecache/arm-storagecache/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/storagecache/arm-storagecache/README.md b/sdk/storagecache/arm-storagecache/README.md index 2595ce41138f..d42f43290e2c 100644 --- a/sdk/storagecache/arm-storagecache/README.md +++ b/sdk/storagecache/arm-storagecache/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-storagecache ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { StorageCacheManagementClient, StorageCacheManagementModels, StorageCacheManagementMappers } from "@azure/arm-storagecache"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { StorageCacheManagementClient } = require("@azure/arm-storagecache"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/storagecache/arm-storagecache/rollup.config.js b/sdk/storagecache/arm-storagecache/rollup.config.js index 921b4319977d..8e109d293547 100644 --- a/sdk/storagecache/arm-storagecache/rollup.config.js +++ b/sdk/storagecache/arm-storagecache/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/storagecache/arm-storagecache/src/models/ascOperationsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/ascOperationsMappers.ts new file mode 100644 index 000000000000..07ca4ca0a14b --- /dev/null +++ b/sdk/storagecache/arm-storagecache/src/models/ascOperationsMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + discriminators, + AscOperation, + CloudError, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts b/sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts index 1947d5dd68fb..d3ced04b6637 100644 --- a/sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/cachesMappers.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,6 +10,9 @@ export { discriminators, BaseResource, Cache, + CacheActiveDirectorySettings, + CacheActiveDirectorySettingsCredentials, + CacheDirectorySettings, CacheEncryptionSettings, CacheHealth, CacheIdentity, @@ -18,13 +21,18 @@ export { CacheSku, CachesListResult, CacheUpgradeStatus, + CacheUsernameDownloadSettings, + CacheUsernameDownloadSettingsCredentials, ClfsTarget, CloudError, KeyVaultKeyReference, KeyVaultKeyReferenceSourceVault, NamespaceJunction, Nfs3Target, + NfsAccessPolicy, + NfsAccessRule, StorageTarget, StorageTargetResource, + SystemData, UnknownTarget } from "../models/mappers"; diff --git a/sdk/storagecache/arm-storagecache/src/models/index.ts b/sdk/storagecache/arm-storagecache/src/models/index.ts index 8c58bd4783db..c04c2c0b8d84 100644 --- a/sdk/storagecache/arm-storagecache/src/models/index.ts +++ b/sdk/storagecache/arm-storagecache/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,80 @@ export interface ApiOperationDisplay { * Resource on which the operation is performed: Cache, etc. */ resource?: string; + /** + * The description of the operation + */ + description?: string; +} + +/** + * Specifications of the Dimension of metrics. + */ +export interface MetricDimension { + /** + * Name of the dimension + */ + name?: string; + /** + * Localized friendly display name of the dimension + */ + displayName?: string; + /** + * Internal name of the dimension. + */ + internalName?: string; + /** + * To be exported to shoe box. + */ + toBeExportedForShoebox?: boolean; +} + +/** + * Details about operation related to metrics. + */ +export interface MetricSpecification { + /** + * The name of the metric. + */ + name?: string; + /** + * Localized display name of the metric. + */ + displayName?: string; + /** + * The description of the metric. + */ + displayDescription?: string; + /** + * The unit that the metric is measured in. + */ + unit?: string; + /** + * The type of metric aggregation. + */ + aggregationType?: string; + /** + * Support metric aggregation type. + */ + supportedAggregationTypes?: MetricAggregationType[]; + /** + * Type of metrics. + */ + metricClass?: string; + /** + * Dimensions of the metric + */ + dimensions?: MetricDimension[]; +} + +/** + * Specification of the all the metrics provided for a resource type. + */ +export interface ApiOperationPropertiesServiceSpecification { + /** + * Details about operations related to metrics. + */ + metricSpecifications?: MetricSpecification[]; } /** @@ -38,10 +112,22 @@ export interface ApiOperation { * The object that represents the operation. */ display?: ApiOperationDisplay; + /** + * Origin of the operation. + */ + origin?: string; + /** + * The flag that indicates whether the operation applies to data plane. + */ + isDataAction?: boolean; /** * Operation name: {provider}/{resource}/{operation} */ name?: string; + /** + * Specification of the all the metrics provided for a resource type. + */ + serviceSpecification?: ApiOperationPropertiesServiceSpecification; } /** @@ -67,6 +153,54 @@ export interface CloudErrorBody { target?: string; } +/** + * Describes the format of Error response. + */ +export interface ErrorResponse { + /** + * Error code + */ + code?: string; + /** + * Error message indicating why the operation failed. + */ + message?: string; +} + +/** + * The status of operation. + */ +export interface AscOperation { + /** + * The operation Id. + */ + id?: string; + /** + * The operation name. + */ + name?: string; + /** + * The start time of the operation. + */ + startTime?: string; + /** + * The end time of the operation. + */ + endTime?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The error detail of the operation if any. + */ + error?: ErrorResponse; + /** + * Additional Operation Specific Properties + */ + output?: { [propertyName: string]: any }; +} + /** * Cache identity properties. */ @@ -87,6 +221,38 @@ export interface CacheIdentity { type?: CacheIdentityType; } +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The type of identity that last modified the resource. + */ + lastModifiedAt?: Date; +} + /** * An indication of Cache health. Gives more information about health than just that related to * provisioning. @@ -185,14 +351,221 @@ export interface CacheEncryptionSettings { keyEncryptionKey?: KeyVaultKeyReference; } +/** + * Rule to place restrictions on portions of the cache namespace being presented to clients. + */ +export interface NfsAccessRule { + /** + * Scope for this rule. The scope and filter determine which clients match the rule. Possible + * values include: 'default', 'network', 'host' + */ + scope: NfsAccessRuleScope; + /** + * Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' + * scope matches all clients and has no filter value. 'network' scope takes a filter in CIDR + * format (for example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name + * as filter. If a client does not match any filter rule and there is no default rule, access is + * denied. + */ + filter?: string; + /** + * Access allowed by this rule. Possible values include: 'no', 'ro', 'rw' + */ + access: NfsAccessRuleAccess; + /** + * Allow SUID semantics. + */ + suid?: boolean; + /** + * For the default policy, allow access to subdirectories under the root export. If this is set + * to no, clients can only mount the path '/'. If set to yes, clients can mount a deeper path, + * like '/a/b'. + */ + submountAccess?: boolean; + /** + * Map root accesses to anonymousUID and anonymousGID. + */ + rootSquash?: boolean; + /** + * UID value that replaces 0 when rootSquash is true. Default value: '-2'. + */ + anonymousUID?: string; + /** + * GID value that replaces 0 when rootSquash is true. Default value: '-2'. + */ + anonymousGID?: string; +} + +/** + * A set of rules describing access policies applied to NFSv3 clients of the cache. + */ +export interface NfsAccessPolicy { + /** + * Name identifying this policy. Access Policy names are not case sensitive. + */ + name: string; + /** + * The set of rules describing client accesses allowed under this policy. + */ + accessRules: NfsAccessRule[]; +} + /** * Cache security settings. */ export interface CacheSecuritySettings { /** - * root squash of cache property. + * NFS access policies defined for this cache. */ - rootSquash?: boolean; + accessPolicies?: NfsAccessPolicy[]; +} + +/** + * Active Directory admin credentials used to join the HPC Cache to a domain. + */ +export interface CacheActiveDirectorySettingsCredentials { + /** + * Username of the Active Directory domain administrator. This value is stored encrypted and not + * returned on response. + */ + username: string; + /** + * Plain text password of the Active Directory domain administrator. This value is stored + * encrypted and not returned on response. + */ + password: string; +} + +/** + * Active Directory settings used to join a cache to a domain. + */ +export interface CacheActiveDirectorySettings { + /** + * Primary DNS IP address used to resolve the Active Directory domain controller's fully + * qualified domain name. + */ + primaryDnsIpAddress: string; + /** + * Secondary DNS IP address used to resolve the Active Directory domain controller's fully + * qualified domain name. + */ + secondaryDnsIpAddress?: string; + /** + * The fully qualified domain name of the Active Directory domain controller. + */ + domainName: string; + /** + * The Active Directory domain's NetBIOS name. + */ + domainNetBiosName: string; + /** + * The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a + * server. Length must 1-15 characters from the class [-0-9a-zA-Z]. + */ + cacheNetBiosName: string; + /** + * True if the HPC Cache is joined to the Active Directory domain. Possible values include: + * 'Yes', 'No', 'Error' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly domainJoined?: DomainJoinedType; + /** + * Active Directory admin credentials used to join the HPC Cache to a domain. + */ + credentials?: CacheActiveDirectorySettingsCredentials; +} + +/** + * When present, these are the credentials for the secure LDAP connection. + */ +export interface CacheUsernameDownloadSettingsCredentials { + /** + * The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is + * stored encrypted and not returned on response. + */ + bindDn?: string; + /** + * The Bind password to be used in the secure LDAP connection. This value is stored encrypted and + * not returned on response. + */ + bindPassword?: string; +} + +/** + * Settings for Extended Groups username and group download. + */ +export interface CacheUsernameDownloadSettings { + /** + * Whether or not Extended Groups is enabled. + */ + extendedGroups?: boolean; + /** + * This setting determines how the cache gets username and group names for clients. Possible + * values include: 'AD', 'LDAP', 'File', 'None'. Default value: 'None'. + */ + usernameSource?: UsernameSource; + /** + * The URI of the file containing group information (in /etc/group file format). This field must + * be populated when 'usernameSource' is set to 'File'. + */ + groupFileURI?: string; + /** + * The URI of the file containing user information (in /etc/passwd file format). This field must + * be populated when 'usernameSource' is set to 'File'. + */ + userFileURI?: string; + /** + * The fully qualified domain name or IP address of the LDAP server to use. + */ + ldapServer?: string; + /** + * The base distinguished name for the LDAP domain. + */ + ldapBaseDN?: string; + /** + * Whether or not the LDAP connection should be encrypted. + */ + encryptLdapConnection?: boolean; + /** + * Determines if the certificates must be validated by a certificate authority. When true, + * caCertificateURI must be provided. + */ + requireValidCertificate?: boolean; + /** + * Determines if the certificate should be automatically downloaded. This applies to + * 'caCertificateURI' only if 'requireValidCertificate' is true. + */ + autoDownloadCertificate?: boolean; + /** + * The URI of the CA certificate to validate the LDAP secure connection. This field must be + * populated when 'requireValidCertificate' is set to true. + */ + caCertificateURI?: string; + /** + * Indicates whether or not the HPC Cache has performed the username download successfully. + * Possible values include: 'Yes', 'No', 'Error' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usernameDownloaded?: UsernameDownloadedType; + /** + * When present, these are the credentials for the secure LDAP connection. + */ + credentials?: CacheUsernameDownloadSettingsCredentials; +} + +/** + * Cache Directory Services settings. + */ +export interface CacheDirectorySettings { + /** + * Specifies settings for joining the HPC Cache to an Active Directory domain. + */ + activeDirectory?: CacheActiveDirectorySettings; + /** + * Specifies settings for Extended Groups. Extended Groups allows users to be members of more + * than 16 groups. + */ + usernameDownload?: CacheUsernameDownloadSettings; } /** @@ -237,6 +610,11 @@ export interface Cache extends BaseResource { * The identity of the cache, if configured. */ identity?: CacheIdentity; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; /** * The size of this Cache, in GB. */ @@ -278,6 +656,10 @@ export interface Cache extends BaseResource { * Specifies security settings of the cache. */ securitySettings?: CacheSecuritySettings; + /** + * Specifies Directory Services settings of the cache. + */ + directoryServicesSettings?: CacheDirectorySettings; /** * SKU for the Cache. */ @@ -300,10 +682,14 @@ export interface NamespaceJunction { * NFS export where targetPath exists. */ nfsExport?: string; + /** + * Name of the access policy applied to this junction. + */ + nfsAccessPolicy?: string; } /** - * Properties pertained to Nfs3Target + * Properties pertaining to the Nfs3Target */ export interface Nfs3Target { /** @@ -311,14 +697,14 @@ export interface Nfs3Target { */ target?: string; /** - * Identifies the primary usage model to be used for this Storage Target. Get choices from + * Identifies the usage model to be used for this Storage Target. Get choices from * .../usageModels */ usageModel?: string; } /** - * Properties pertained to ClfsTarget + * Properties pertaining to the ClfsTarget */ export interface ClfsTarget { /** @@ -328,7 +714,7 @@ export interface ClfsTarget { } /** - * Properties pertained to UnknownTarget + * Properties pertaining to the UnknownTarget */ export interface UnknownTarget { /** @@ -349,15 +735,11 @@ export interface StorageTargetProperties { /** * Polymorphic Discriminator */ - targetBaseType: "StorageTargetProperties"; + targetType: "StorageTargetProperties"; /** * List of Cache namespace junctions to target for namespace associations. */ junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; /** * ARM provisioning state, see * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. @@ -398,6 +780,16 @@ export interface StorageTargetResource extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; + /** + * Region name string. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -408,10 +800,6 @@ export interface StorageTarget extends StorageTargetResource { * List of Cache namespace junctions to target for namespace associations. */ junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; /** * ARM provisioning state, see * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. @@ -434,7 +822,7 @@ export interface StorageTarget extends StorageTargetResource { /** * Polymorphic Discriminator */ - targetBaseType: string; + targetType: string; } /** @@ -444,15 +832,11 @@ export interface Nfs3TargetProperties { /** * Polymorphic Discriminator */ - targetBaseType: "nfs3"; + targetType: "nfs3"; /** * List of Cache namespace junctions to target for namespace associations. */ junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; /** * ARM provisioning state, see * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. @@ -481,15 +865,11 @@ export interface ClfsTargetProperties { /** * Polymorphic Discriminator */ - targetBaseType: "clfs"; + targetType: "clfs"; /** * List of Cache namespace junctions to target for namespace associations. */ junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; /** * ARM provisioning state, see * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. @@ -518,15 +898,11 @@ export interface UnknownTargetProperties { /** * Polymorphic Discriminator */ - targetBaseType: "unknown"; + targetType: "unknown"; /** * List of Cache namespace junctions to target for namespace associations. */ junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; /** * ARM provisioning state, see * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. @@ -614,13 +990,13 @@ export interface ResourceSku { */ capabilities?: ResourceSkuCapabilities[]; /** - * The set of locations that the SKU is available. This will be supported and registered Azure + * The set of locations where the SKU is available. This is the supported and registered Azure * Geo Regions (e.g., West US, East US, Southeast Asia, etc.). * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly locations?: string[]; /** - * The set of locations that the SKU is available. + * The set of locations where the SKU is available. */ locationInfo?: ResourceSkuLocationInfo[]; /** @@ -784,6 +1160,15 @@ export interface StorageTargetsResult extends Array { nextLink?: string; } +/** + * Defines values for MetricAggregationType. + * Possible values include: 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', + * 'Count' + * @readonly + * @enum {string} + */ +export type MetricAggregationType = 'NotSpecified' | 'None' | 'Average' | 'Minimum' | 'Maximum' | 'Total' | 'Count'; + /** * Defines values for CacheIdentityType. * Possible values include: 'SystemAssigned', 'None' @@ -792,6 +1177,14 @@ export interface StorageTargetsResult extends Array { */ export type CacheIdentityType = 'SystemAssigned' | 'None'; +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + /** * Defines values for HealthStateType. * Possible values include: 'Unknown', 'Healthy', 'Degraded', 'Down', 'Transitioning', 'Stopping', @@ -818,12 +1211,44 @@ export type ProvisioningStateType = 'Succeeded' | 'Failed' | 'Cancelled' | 'Crea export type FirmwareStatusType = 'available' | 'unavailable'; /** - * Defines values for StorageTargetType. - * Possible values include: 'nfs3', 'clfs', 'unknown' + * Defines values for NfsAccessRuleScope. + * Possible values include: 'default', 'network', 'host' + * @readonly + * @enum {string} + */ +export type NfsAccessRuleScope = 'default' | 'network' | 'host'; + +/** + * Defines values for NfsAccessRuleAccess. + * Possible values include: 'no', 'ro', 'rw' + * @readonly + * @enum {string} + */ +export type NfsAccessRuleAccess = 'no' | 'ro' | 'rw'; + +/** + * Defines values for DomainJoinedType. + * Possible values include: 'Yes', 'No', 'Error' + * @readonly + * @enum {string} + */ +export type DomainJoinedType = 'Yes' | 'No' | 'Error'; + +/** + * Defines values for UsernameSource. + * Possible values include: 'AD', 'LDAP', 'File', 'None' + * @readonly + * @enum {string} + */ +export type UsernameSource = 'AD' | 'LDAP' | 'File' | 'None'; + +/** + * Defines values for UsernameDownloadedType. + * Possible values include: 'Yes', 'No', 'Error' * @readonly * @enum {string} */ -export type StorageTargetType = 'nfs3' | 'clfs' | 'unknown'; +export type UsernameDownloadedType = 'Yes' | 'No' | 'Error'; /** * Defines values for ReasonCode. @@ -954,9 +1379,9 @@ export type UsageModelsListNextResponse = UsageModelsResult & { }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type CachesListResponse = CachesListResult & { +export type AscOperationsGetResponse = AscOperation & { /** * The underlying HTTP response. */ @@ -969,14 +1394,14 @@ export type CachesListResponse = CachesListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: CachesListResult; + parsedBody: AscOperation; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the list operation. */ -export type CachesListByResourceGroupResponse = CachesListResult & { +export type CachesListResponse = CachesListResult & { /** * The underlying HTTP response. */ @@ -994,14 +1419,9 @@ export type CachesListByResourceGroupResponse = CachesListResult & { }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the listByResourceGroup operation. */ -export type CachesDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - +export type CachesListByResourceGroupResponse = CachesListResult & { /** * The underlying HTTP response. */ @@ -1014,7 +1434,7 @@ export type CachesDeleteMethodResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: any; + parsedBody: CachesListResult; }; }; @@ -1078,131 +1498,6 @@ export type CachesUpdateResponse = Cache & { }; }; -/** - * Contains response data for the flush operation. - */ -export type CachesFlushResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - -/** - * Contains response data for the start operation. - */ -export type CachesStartResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - -/** - * Contains response data for the stop operation. - */ -export type CachesStopResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - -/** - * Contains response data for the upgradeFirmware operation. - */ -export type CachesUpgradeFirmwareResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - -/** - * Contains response data for the beginDeleteMethod operation. - */ -export type CachesBeginDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -1223,106 +1518,6 @@ export type CachesBeginCreateOrUpdateResponse = Cache & { }; }; -/** - * Contains response data for the beginFlush operation. - */ -export type CachesBeginFlushResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - -/** - * Contains response data for the beginStart operation. - */ -export type CachesBeginStartResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - -/** - * Contains response data for the beginStop operation. - */ -export type CachesBeginStopResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - -/** - * Contains response data for the beginUpgradeFirmware operation. - */ -export type CachesBeginUpgradeFirmwareResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - /** * Contains response data for the listNext operation. */ @@ -1383,31 +1578,6 @@ export type StorageTargetsListByCacheResponse = StorageTargetsResult & { }; }; -/** - * Contains response data for the deleteMethod operation. - */ -export type StorageTargetsDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - /** * Contains response data for the get operation. */ @@ -1448,31 +1618,6 @@ export type StorageTargetsCreateOrUpdateResponse = StorageTarget & { }; }; -/** - * Contains response data for the beginDeleteMethod operation. - */ -export type StorageTargetsBeginDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * 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: any; - }; -}; - /** * Contains response data for the beginCreateOrUpdate operation. */ diff --git a/sdk/storagecache/arm-storagecache/src/models/mappers.ts b/sdk/storagecache/arm-storagecache/src/models/mappers.ts index 672eb04f432f..6d7fc508ddf2 100644 --- a/sdk/storagecache/arm-storagecache/src/models/mappers.ts +++ b/sdk/storagecache/arm-storagecache/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,137 @@ export const ApiOperationDisplay: msRest.CompositeMapper = { type: { name: "String" } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const MetricDimension: msRest.CompositeMapper = { + serializedName: "MetricDimension", + type: { + name: "Composite", + className: "MetricDimension", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + internalName: { + serializedName: "internalName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", + type: { + name: "Composite", + className: "MetricSpecification", + 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" + } + }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + metricClass: { + serializedName: "metricClass", + type: { + name: "String" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } + } + } + } + } +}; + +export const ApiOperationPropertiesServiceSpecification: msRest.CompositeMapper = { + serializedName: "ApiOperation_properties_serviceSpecification", + type: { + name: "Composite", + className: "ApiOperationPropertiesServiceSpecification", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } + } } } } @@ -53,11 +184,30 @@ export const ApiOperation: msRest.CompositeMapper = { className: "ApiOperationDisplay" } }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, name: { serializedName: "name", type: { name: "String" } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "ApiOperationPropertiesServiceSpecification" + } } } } @@ -103,6 +253,86 @@ export const CloudErrorBody: msRest.CompositeMapper = { } }; +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const AscOperation: msRest.CompositeMapper = { + serializedName: "AscOperation", + type: { + name: "Composite", + className: "AscOperation", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + }, + output: { + serializedName: "properties.output", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + } + } + } +}; + export const CacheIdentity: msRest.CompositeMapper = { serializedName: "CacheIdentity", type: { @@ -137,6 +367,52 @@ export const CacheIdentity: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const CacheHealth: msRest.CompositeMapper = { serializedName: "CacheHealth", type: { @@ -295,17 +571,331 @@ export const CacheEncryptionSettings: msRest.CompositeMapper = { } }; +export const NfsAccessRule: msRest.CompositeMapper = { + serializedName: "NfsAccessRule", + type: { + name: "Composite", + className: "NfsAccessRule", + modelProperties: { + scope: { + required: true, + serializedName: "scope", + type: { + name: "String" + } + }, + filter: { + serializedName: "filter", + type: { + name: "String" + } + }, + access: { + required: true, + serializedName: "access", + type: { + name: "String" + } + }, + suid: { + serializedName: "suid", + type: { + name: "Boolean" + } + }, + submountAccess: { + serializedName: "submountAccess", + type: { + name: "Boolean" + } + }, + rootSquash: { + serializedName: "rootSquash", + type: { + name: "Boolean" + } + }, + anonymousUID: { + serializedName: "anonymousUID", + defaultValue: '-2', + type: { + name: "String" + } + }, + anonymousGID: { + serializedName: "anonymousGID", + defaultValue: '-2', + type: { + name: "String" + } + } + } + } +}; + +export const NfsAccessPolicy: msRest.CompositeMapper = { + serializedName: "NfsAccessPolicy", + type: { + name: "Composite", + className: "NfsAccessPolicy", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + accessRules: { + required: true, + serializedName: "accessRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NfsAccessRule" + } + } + } + } + } + } +}; + export const CacheSecuritySettings: msRest.CompositeMapper = { serializedName: "CacheSecuritySettings", type: { name: "Composite", className: "CacheSecuritySettings", modelProperties: { - rootSquash: { - serializedName: "rootSquash", + accessPolicies: { + serializedName: "accessPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NfsAccessPolicy" + } + } + } + } + } + } +}; + +export const CacheActiveDirectorySettingsCredentials: msRest.CompositeMapper = { + serializedName: "CacheActiveDirectorySettings_credentials", + type: { + name: "Composite", + className: "CacheActiveDirectorySettingsCredentials", + modelProperties: { + username: { + required: true, + serializedName: "username", + type: { + name: "String" + } + }, + password: { + required: true, + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const CacheActiveDirectorySettings: msRest.CompositeMapper = { + serializedName: "CacheActiveDirectorySettings", + type: { + name: "Composite", + className: "CacheActiveDirectorySettings", + modelProperties: { + primaryDnsIpAddress: { + required: true, + serializedName: "primaryDnsIpAddress", + type: { + name: "String" + } + }, + secondaryDnsIpAddress: { + serializedName: "secondaryDnsIpAddress", + type: { + name: "String" + } + }, + domainName: { + required: true, + serializedName: "domainName", + type: { + name: "String" + } + }, + domainNetBiosName: { + required: true, + serializedName: "domainNetBiosName", + type: { + name: "String" + } + }, + cacheNetBiosName: { + required: true, + serializedName: "cacheNetBiosName", + constraints: { + Pattern: /^[-0-9a-zA-Z]{1,15}$/ + }, + type: { + name: "String" + } + }, + domainJoined: { + readOnly: true, + serializedName: "domainJoined", + type: { + name: "String" + } + }, + credentials: { + serializedName: "credentials", + type: { + name: "Composite", + className: "CacheActiveDirectorySettingsCredentials" + } + } + } + } +}; + +export const CacheUsernameDownloadSettingsCredentials: msRest.CompositeMapper = { + serializedName: "CacheUsernameDownloadSettings_credentials", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettingsCredentials", + modelProperties: { + bindDn: { + serializedName: "bindDn", + type: { + name: "String" + } + }, + bindPassword: { + serializedName: "bindPassword", + type: { + name: "String" + } + } + } + } +}; + +export const CacheUsernameDownloadSettings: msRest.CompositeMapper = { + serializedName: "CacheUsernameDownloadSettings", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettings", + modelProperties: { + extendedGroups: { + serializedName: "extendedGroups", + type: { + name: "Boolean" + } + }, + usernameSource: { + serializedName: "usernameSource", + defaultValue: 'None', + type: { + name: "String" + } + }, + groupFileURI: { + serializedName: "groupFileURI", + type: { + name: "String" + } + }, + userFileURI: { + serializedName: "userFileURI", + type: { + name: "String" + } + }, + ldapServer: { + serializedName: "ldapServer", + type: { + name: "String" + } + }, + ldapBaseDN: { + serializedName: "ldapBaseDN", + type: { + name: "String" + } + }, + encryptLdapConnection: { + serializedName: "encryptLdapConnection", type: { name: "Boolean" } + }, + requireValidCertificate: { + serializedName: "requireValidCertificate", + type: { + name: "Boolean" + } + }, + autoDownloadCertificate: { + serializedName: "autoDownloadCertificate", + type: { + name: "Boolean" + } + }, + caCertificateURI: { + serializedName: "caCertificateURI", + type: { + name: "String" + } + }, + usernameDownloaded: { + readOnly: true, + serializedName: "usernameDownloaded", + type: { + name: "String" + } + }, + credentials: { + serializedName: "credentials", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettingsCredentials" + } + } + } + } +}; + +export const CacheDirectorySettings: msRest.CompositeMapper = { + serializedName: "CacheDirectorySettings", + type: { + name: "Composite", + className: "CacheDirectorySettings", + modelProperties: { + activeDirectory: { + serializedName: "activeDirectory", + type: { + name: "Composite", + className: "CacheActiveDirectorySettings" + } + }, + usernameDownload: { + serializedName: "usernameDownload", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettings" + } } } } @@ -373,6 +963,14 @@ export const Cache: msRest.CompositeMapper = { className: "CacheIdentity" } }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, cacheSizeGB: { serializedName: "properties.cacheSizeGB", type: { @@ -439,6 +1037,13 @@ export const Cache: msRest.CompositeMapper = { className: "CacheSecuritySettings" } }, + directoryServicesSettings: { + serializedName: "properties.directoryServicesSettings", + type: { + name: "Composite", + className: "CacheDirectorySettings" + } + }, sku: { serializedName: "sku", type: { @@ -473,6 +1078,12 @@ export const NamespaceJunction: msRest.CompositeMapper = { type: { name: "String" } + }, + nfsAccessPolicy: { + serializedName: "nfsAccessPolicy", + type: { + name: "String" + } } } } @@ -545,8 +1156,8 @@ export const StorageTargetProperties: msRest.CompositeMapper = { type: { name: "Composite", polymorphicDiscriminator: { - serializedName: "targetBaseType", - clientName: "targetBaseType" + serializedName: "targetType", + clientName: "targetType" }, uberParent: "StorageTargetProperties", className: "StorageTargetProperties", @@ -563,12 +1174,6 @@ export const StorageTargetProperties: msRest.CompositeMapper = { } } }, - targetType: { - serializedName: "targetType", - type: { - name: "String" - } - }, provisioningState: { serializedName: "provisioningState", type: { @@ -596,9 +1201,9 @@ export const StorageTargetProperties: msRest.CompositeMapper = { className: "UnknownTarget" } }, - targetBaseType: { + targetType: { required: true, - serializedName: "targetBaseType", + serializedName: "targetType", type: { name: "String" } @@ -633,6 +1238,21 @@ export const StorageTargetResource: msRest.CompositeMapper = { type: { name: "String" } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -657,12 +1277,6 @@ export const StorageTarget: msRest.CompositeMapper = { } } }, - targetType: { - serializedName: "properties.targetType", - type: { - name: "String" - } - }, provisioningState: { serializedName: "properties.provisioningState", type: { @@ -690,9 +1304,9 @@ export const StorageTarget: msRest.CompositeMapper = { className: "UnknownTarget" } }, - targetBaseType: { + targetType: { required: true, - serializedName: "properties.targetBaseType", + serializedName: "properties.targetType", type: { name: "String" } diff --git a/sdk/storagecache/arm-storagecache/src/models/operationsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/operationsMappers.ts index 69e93ca3e812..61c27747da6d 100644 --- a/sdk/storagecache/arm-storagecache/src/models/operationsMappers.ts +++ b/sdk/storagecache/arm-storagecache/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. @@ -11,5 +11,8 @@ export { ApiOperation, ApiOperationDisplay, ApiOperationListResult, - CloudError + ApiOperationPropertiesServiceSpecification, + CloudError, + MetricDimension, + MetricSpecification } from "../models/mappers"; diff --git a/sdk/storagecache/arm-storagecache/src/models/parameters.ts b/sdk/storagecache/arm-storagecache/src/models/parameters.ts index dd3394f6db81..f59cdb795e2c 100644 --- a/sdk/storagecache/arm-storagecache/src/models/parameters.ts +++ b/sdk/storagecache/arm-storagecache/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 @@ -43,6 +42,16 @@ export const cacheName: msRest.OperationURLParameter = { } } }; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -54,6 +63,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/storagecache/arm-storagecache/src/models/skusMappers.ts b/sdk/storagecache/arm-storagecache/src/models/skusMappers.ts index 25ba85daa733..bfe35722d81e 100644 --- a/sdk/storagecache/arm-storagecache/src/models/skusMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/skusMappers.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. diff --git a/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts index f7f8b3402e86..17c44505fed5 100644 --- a/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.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,6 +10,9 @@ export { discriminators, BaseResource, Cache, + CacheActiveDirectorySettings, + CacheActiveDirectorySettingsCredentials, + CacheDirectorySettings, CacheEncryptionSettings, CacheHealth, CacheIdentity, @@ -17,14 +20,19 @@ export { CacheSecuritySettings, CacheSku, CacheUpgradeStatus, + CacheUsernameDownloadSettings, + CacheUsernameDownloadSettingsCredentials, ClfsTarget, CloudError, KeyVaultKeyReference, KeyVaultKeyReferenceSourceVault, NamespaceJunction, Nfs3Target, + NfsAccessPolicy, + NfsAccessRule, StorageTarget, StorageTargetResource, StorageTargetsResult, + SystemData, UnknownTarget } from "../models/mappers"; diff --git a/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.ts index 5fed08aa0dc5..f1668446ae6b 100644 --- a/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.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. diff --git a/sdk/storagecache/arm-storagecache/src/operations/ascOperations.ts b/sdk/storagecache/arm-storagecache/src/operations/ascOperations.ts new file mode 100644 index 000000000000..08840b3e109a --- /dev/null +++ b/sdk/storagecache/arm-storagecache/src/operations/ascOperations.ts @@ -0,0 +1,86 @@ +/* + * 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/ascOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { StorageCacheManagementClientContext } from "../storageCacheManagementClientContext"; + +/** Class representing a AscOperations. */ +export class AscOperations { + private readonly client: StorageCacheManagementClientContext; + + /** + * Create a AscOperations. + * @param {StorageCacheManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageCacheManagementClientContext) { + this.client = client; + } + + /** + * Gets the status of an asynchronous operation for the Azure HPC Cache + * @param location The name of the region used to look up the operation. + * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param [options] The optional parameters + * @returns Promise + */ + get(location: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The name of the region used to look up the operation. + * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param callback The callback + */ + get(location: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param location The name of the region used to look up the operation. + * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param options The optional parameters + * @param callback The callback + */ + get(location: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(location: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + operationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AscOperation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/storagecache/arm-storagecache/src/operations/caches.ts b/sdk/storagecache/arm-storagecache/src/operations/caches.ts index e296ec434609..e305fdff225d 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/caches.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/caches.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 @@ -82,36 +81,36 @@ export class Caches { /** * Schedules a Cache for deletion. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + deleteMethod(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginDeleteMethod(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Returns a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param callback The callback */ get(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback */ @@ -130,8 +129,8 @@ export class Caches { /** * Create or update a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -143,23 +142,23 @@ export class Caches { /** * Update a Cache instance. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ update(resourceGroupName: string, cacheName: string, options?: Models.CachesUpdateOptionalParams): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param callback The callback */ update(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback */ @@ -175,65 +174,78 @@ export class Caches { callback) as Promise; } + /** + * Tells a Cache to write generate debug info for support to process. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. + * @param [options] The optional parameters + * @returns Promise + */ + debugInfo(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDebugInfo(resourceGroupName,cacheName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** * Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will * see errors returned until the flush is complete. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - flush(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + flush(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginFlush(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Tells a Stopped state Cache to transition to Active state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - start(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + start(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginStart(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Tells an Active Cache to transition to Stopped state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - stop(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + stop(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginStop(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no * effect. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - upgradeFirmware(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + upgradeFirmware(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginUpgradeFirmware(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Schedules a Cache for deletion. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -251,8 +263,8 @@ export class Caches { /** * Create or update a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -267,12 +279,31 @@ export class Caches { options); } + /** + * Tells a Cache to write generate debug info for support to process. + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. + * @param [options] The optional parameters + * @returns Promise + */ + beginDebugInfo(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + cacheName, + options + }, + beginDebugInfoOperationSpec, + options); + } + /** * Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will * see errors returned until the flush is complete. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -290,8 +321,8 @@ export class Caches { /** * Tells a Stopped state Cache to transition to Active state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -309,8 +340,8 @@ export class Caches { /** * Tells an Active Cache to transition to Stopped state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -329,8 +360,8 @@ export class Caches { * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no * effect. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -523,30 +554,9 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -582,6 +592,32 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.Cache }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDebugInfoOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/debugInfo", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.cacheName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -604,30 +640,9 @@ const beginFlushOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -650,30 +665,9 @@ const beginStartOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -696,30 +690,9 @@ const beginStopOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -742,30 +715,9 @@ const beginUpgradeFirmwareOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -780,6 +732,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -801,6 +756,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/storagecache/arm-storagecache/src/operations/index.ts b/sdk/storagecache/arm-storagecache/src/operations/index.ts index 461ea1b1d1b5..e855b3e0869e 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/index.ts +++ b/sdk/storagecache/arm-storagecache/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 @@ -11,5 +10,6 @@ export * from "./operations"; export * from "./skus"; export * from "./usageModels"; +export * from "./ascOperations"; export * from "./caches"; export * from "./storageTargets"; diff --git a/sdk/storagecache/arm-storagecache/src/operations/operations.ts b/sdk/storagecache/arm-storagecache/src/operations/operations.ts index d930c78bb3a9..5310858388ae 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/operations.ts +++ b/sdk/storagecache/arm-storagecache/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 @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/storagecache/arm-storagecache/src/operations/skus.ts b/sdk/storagecache/arm-storagecache/src/operations/skus.ts index 583f12cce083..1a932a055c28 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/skus.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/skus.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 @@ -111,6 +110,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts b/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts index a29771da8d90..2a6506a2e7e1 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/storageTargets.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 @@ -30,23 +29,23 @@ export class StorageTargets { /** * Returns a list of Storage Targets for the specified Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ listByCache(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param callback The callback */ listByCache(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback */ @@ -68,43 +67,43 @@ export class StorageTargets { * healthy again. Note that if the Cache has data to flush to the Storage Target, the data will be * flushed before the Storage Target will be deleted. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: msRest.RequestOptionsBase): Promise { + deleteMethod(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginDeleteMethod(resourceGroupName,cacheName,storageTargetName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Returns a Storage Target from a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 - * and chars must be in list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 + * and chars must be from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 - * and chars must be in list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 + * and chars must be from the [-0-9a-zA-Z_] char class. * @param callback The callback */ get(resourceGroupName: string, cacheName: string, storageTargetName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 - * and chars must be in list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 + * and chars must be from the [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback */ @@ -126,10 +125,10 @@ export class StorageTargets { * down or unhealthy, the actual creation/modification of the Storage Target may be delayed until * the Cache is healthy again. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 - * and chars must be in list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 + * and chars must be from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -144,8 +143,8 @@ export class StorageTargets { * healthy again. Note that if the Cache has data to flush to the Storage Target, the data will be * flushed before the Storage Target will be deleted. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. * @param [options] The optional parameters * @returns Promise @@ -167,10 +166,10 @@ export class StorageTargets { * down or unhealthy, the actual creation/modification of the Storage Target may be delayed until * the Cache is healthy again. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in - * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 - * and chars must be in list of [-0-9a-zA-Z_] char class. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be + * from the [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 + * and chars must be from the [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise */ @@ -284,30 +283,9 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -344,6 +322,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.StorageTarget }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -358,6 +337,9 @@ const listByCacheNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/storagecache/arm-storagecache/src/operations/usageModels.ts b/sdk/storagecache/arm-storagecache/src/operations/usageModels.ts index e5d55b99d6f6..17029293a4bd 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/usageModels.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/usageModels.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 @@ -111,6 +110,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts index 6380df6d5691..cb15178503bf 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.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 @@ -20,6 +19,7 @@ class StorageCacheManagementClient extends StorageCacheManagementClientContext { operations: operations.Operations; skus: operations.Skus; usageModels: operations.UsageModels; + ascOperations: operations.AscOperations; caches: operations.Caches; storageTargets: operations.StorageTargets; @@ -35,6 +35,7 @@ class StorageCacheManagementClient extends StorageCacheManagementClientContext { this.operations = new operations.Operations(this); this.skus = new operations.Skus(this); this.usageModels = new operations.UsageModels(this); + this.ascOperations = new operations.AscOperations(this); this.caches = new operations.Caches(this); this.storageTargets = new operations.StorageTargets(this); } diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts index 366823e7d24a..357233aafc0b 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.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 @@ -45,7 +44,7 @@ export class StorageCacheManagementClientContext extends msRestAzure.AzureServic super(credentials, options); - this.apiVersion = '2020-03-01'; + this.apiVersion = '2020-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";