diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index e2dfad23f799..bdf0b2d4bfc0 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -78,6 +78,10 @@ { "path": "src/appConfigurationClient.ts", "prefix": "packageVersion" + }, + { + "path": "src/generated/src/appConfigurationContext.ts", + "prefix": "packageVersion" } ] }, diff --git a/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts b/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts index 844528dc3298..d1e83d5cf1af 100644 --- a/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts +++ b/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts @@ -55,8 +55,8 @@ import { import { tracingPolicy } from "@azure/core-http"; import { Spanner } from "./internal/tracingHelpers"; import { - GetKeyValuesResponse, - AppConfigurationOptions as GeneratedAppConfigurationClientOptions + AppConfigurationGetKeyValuesResponse, + AppConfigurationOptionalParams as GeneratedAppConfigurationClientOptions } from "./generated/src/models"; import { syncTokenPolicy, SyncTokens } from "./internal/synctokenpolicy"; @@ -169,6 +169,7 @@ export class AppConfigurationClient { this.client = new AppConfiguration( appConfigCredential, + appConfigEndpoint, apiVersion, getGeneratedClientOptions(appConfigEndpoint, syncTokens, appConfigOptions) ); @@ -357,7 +358,9 @@ export class AppConfigurationClient { } } - private *createListConfigurationPageFromResponse(currentResponse: GetKeyValuesResponse) { + private *createListConfigurationPageFromResponse( + currentResponse: AppConfigurationGetKeyValuesResponse + ) { yield { ...currentResponse, items: currentResponse.items != null ? currentResponse.items.map(transformKeyValue) : [] @@ -512,7 +515,7 @@ export class AppConfigurationClient { * @hidden */ export function getGeneratedClientOptions( - baseUri: string, + endpoint: string, syncTokens: SyncTokens, internalAppConfigOptions: InternalAppConfigurationClientOptions ): GeneratedAppConfigurationClientOptions { @@ -528,7 +531,7 @@ export function getGeneratedClientOptions( ); return { - baseUri, + endpoint, deserializationContentTypes, // we'll add in our own custom retry policies noRetryPolicy: true, diff --git a/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts b/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts index 88eb5f60b917..b6f5fe9e00e5 100644 --- a/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts +++ b/sdk/appconfiguration/app-configuration/src/generated/src/appConfiguration.ts @@ -1,764 +1,816 @@ /* - * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as coreHttp from "@azure/core-http"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; import { AppConfigurationContext } from "./appConfigurationContext"; +import { + AppConfigurationOptionalParams, + ApiVersion10, + AppConfigurationGetKeysOptionalParams, + AppConfigurationGetKeysResponse, + AppConfigurationCheckKeysOptionalParams, + AppConfigurationCheckKeysResponse, + AppConfigurationGetKeyValuesOptionalParams, + AppConfigurationGetKeyValuesResponse, + AppConfigurationCheckKeyValuesOptionalParams, + AppConfigurationCheckKeyValuesResponse, + AppConfigurationGetKeyValueOptionalParams, + AppConfigurationGetKeyValueResponse, + AppConfigurationPutKeyValueOptionalParams, + AppConfigurationPutKeyValueResponse, + AppConfigurationDeleteKeyValueOptionalParams, + AppConfigurationDeleteKeyValueResponse, + AppConfigurationCheckKeyValueOptionalParams, + AppConfigurationCheckKeyValueResponse, + AppConfigurationGetLabelsOptionalParams, + AppConfigurationGetLabelsResponse, + AppConfigurationCheckLabelsOptionalParams, + AppConfigurationCheckLabelsResponse, + AppConfigurationPutLockOptionalParams, + AppConfigurationPutLockResponse, + AppConfigurationDeleteLockOptionalParams, + AppConfigurationDeleteLockResponse, + AppConfigurationGetRevisionsOptionalParams, + AppConfigurationGetRevisionsResponse, + AppConfigurationCheckRevisionsOptionalParams, + AppConfigurationCheckRevisionsResponse, + AppConfigurationGetKeysNextOptionalParams, + AppConfigurationGetKeysNextResponse, + AppConfigurationGetKeyValuesNextOptionalParams, + AppConfigurationGetKeyValuesNextResponse, + AppConfigurationGetLabelsNextOptionalParams, + AppConfigurationGetLabelsNextResponse, + AppConfigurationGetRevisionsNextOptionalParams, + AppConfigurationGetRevisionsNextResponse +} from "./models"; -class AppConfiguration extends AppConfigurationContext { +/** @hidden */ +export class AppConfiguration extends AppConfigurationContext { /** * Initializes a new instance of the AppConfiguration class. - * @param apiVersion The API version to be used with the HTTP request. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, apiVersion: string, options?: Models.AppConfigurationOptions) { - super(credentials, apiVersion, options); + * @param endpoint The endpoint of the App Configuration instance to send requests to. + * @param apiVersion Api Version + * @param options The parameter options + */ + constructor( + credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, + endpoint: string, + apiVersion: ApiVersion10, + options?: AppConfigurationOptionalParams + ) { + super(credentials, endpoint, apiVersion, options); } /** - * @summary Gets a list of keys. - * @param [options] The optional parameters - * @returns Promise + * Gets a list of keys. + * @param options The options parameters. */ - getKeys(options?: Models.AppConfigurationGetKeysOptionalParams): Promise; - /** - * @param callback The callback - */ - getKeys(callback: coreHttp.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - getKeys(options: Models.AppConfigurationGetKeysOptionalParams, callback: coreHttp.ServiceCallback): void; - getKeys(options?: Models.AppConfigurationGetKeysOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + getKeys( + options?: AppConfigurationGetKeysOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - getKeysOperationSpec, - callback) as Promise; + operationArguments, + getKeysOperationSpec + ) as Promise; } /** - * @summary Requests the headers and status of the given resource. - * @param [options] The optional parameters - * @returns Promise - */ - checkKeys(options?: Models.AppConfigurationCheckKeysOptionalParams): Promise; - /** - * @param callback The callback - */ - checkKeys(callback: coreHttp.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback + * Requests the headers and status of the given resource. + * @param options The options parameters. */ - checkKeys(options: Models.AppConfigurationCheckKeysOptionalParams, callback: coreHttp.ServiceCallback): void; - checkKeys(options?: Models.AppConfigurationCheckKeysOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + checkKeys( + options?: AppConfigurationCheckKeysOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - checkKeysOperationSpec, - callback) as Promise; + operationArguments, + checkKeysOperationSpec + ) as Promise; } /** - * @summary Gets a list of key-values. - * @param [options] The optional parameters - * @returns Promise + * Gets a list of key-values. + * @param options The options parameters. */ - getKeyValues(options?: Models.AppConfigurationGetKeyValuesOptionalParams): Promise; - /** - * @param callback The callback - */ - getKeyValues(callback: coreHttp.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - getKeyValues(options: Models.AppConfigurationGetKeyValuesOptionalParams, callback: coreHttp.ServiceCallback): void; - getKeyValues(options?: Models.AppConfigurationGetKeyValuesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + getKeyValues( + options?: AppConfigurationGetKeyValuesOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - getKeyValuesOperationSpec, - callback) as Promise; + operationArguments, + getKeyValuesOperationSpec + ) as Promise; } /** - * @summary Requests the headers and status of the given resource. - * @param [options] The optional parameters - * @returns Promise - */ - checkKeyValues(options?: Models.AppConfigurationCheckKeyValuesOptionalParams): Promise; - /** - * @param callback The callback + * Requests the headers and status of the given resource. + * @param options The options parameters. */ - checkKeyValues(callback: coreHttp.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - checkKeyValues(options: Models.AppConfigurationCheckKeyValuesOptionalParams, callback: coreHttp.ServiceCallback): void; - checkKeyValues(options?: Models.AppConfigurationCheckKeyValuesOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + checkKeyValues( + options?: AppConfigurationCheckKeyValuesOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - checkKeyValuesOperationSpec, - callback) as Promise; + operationArguments, + checkKeyValuesOperationSpec + ) as Promise; } /** - * @summary Gets a single key-value. - * @param key The key of the key-value to retrieve. - * @param [options] The optional parameters - * @returns Promise - */ - getKeyValue(key: string, options?: Models.AppConfigurationGetKeyValueOptionalParams): Promise; - /** + * Gets a single key-value. * @param key The key of the key-value to retrieve. - * @param callback The callback - */ - getKeyValue(key: string, callback: coreHttp.ServiceCallback): void; - /** - * @param key The key of the key-value to retrieve. - * @param options The optional parameters - * @param callback The callback - */ - getKeyValue(key: string, options: Models.AppConfigurationGetKeyValueOptionalParams, callback: coreHttp.ServiceCallback): void; - getKeyValue(key: string, options?: Models.AppConfigurationGetKeyValueOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * @param options The options parameters. + */ + getKeyValue( + key: string, + options?: AppConfigurationGetKeyValueOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + key, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - key, - options - }, - getKeyValueOperationSpec, - callback) as Promise; + operationArguments, + getKeyValueOperationSpec + ) as Promise; } /** - * @summary Creates a key-value. + * Creates a key-value. * @param key The key of the key-value to create. - * @param [options] The optional parameters - * @returns Promise - */ - putKeyValue(key: string, options?: Models.AppConfigurationPutKeyValueOptionalParams): Promise; - /** - * @param key The key of the key-value to create. - * @param callback The callback - */ - putKeyValue(key: string, callback: coreHttp.ServiceCallback): void; - /** - * @param key The key of the key-value to create. - * @param options The optional parameters - * @param callback The callback - */ - putKeyValue(key: string, options: Models.AppConfigurationPutKeyValueOptionalParams, callback: coreHttp.ServiceCallback): void; - putKeyValue(key: string, options?: Models.AppConfigurationPutKeyValueOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * @param options The options parameters. + */ + putKeyValue( + key: string, + options?: AppConfigurationPutKeyValueOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + key, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - key, - options - }, - putKeyValueOperationSpec, - callback) as Promise; + operationArguments, + putKeyValueOperationSpec + ) as Promise; } /** - * @summary Deletes a key-value. + * Deletes a key-value. * @param key The key of the key-value to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteKeyValue(key: string, options?: Models.AppConfigurationDeleteKeyValueOptionalParams): Promise; - /** - * @param key The key of the key-value to delete. - * @param callback The callback - */ - deleteKeyValue(key: string, callback: coreHttp.ServiceCallback): void; - /** - * @param key The key of the key-value to delete. - * @param options The optional parameters - * @param callback The callback - */ - deleteKeyValue(key: string, options: Models.AppConfigurationDeleteKeyValueOptionalParams, callback: coreHttp.ServiceCallback): void; - deleteKeyValue(key: string, options?: Models.AppConfigurationDeleteKeyValueOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * @param options The options parameters. + */ + deleteKeyValue( + key: string, + options?: AppConfigurationDeleteKeyValueOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + key, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - key, - options - }, - deleteKeyValueOperationSpec, - callback) as Promise; + operationArguments, + deleteKeyValueOperationSpec + ) as Promise; } /** - * @summary Requests the headers and status of the given resource. - * @param key The key of the key-value to retrieve. - * @param [options] The optional parameters - * @returns Promise - */ - checkKeyValue(key: string, options?: Models.AppConfigurationCheckKeyValueOptionalParams): Promise; - /** + * Requests the headers and status of the given resource. * @param key The key of the key-value to retrieve. - * @param callback The callback - */ - checkKeyValue(key: string, callback: coreHttp.ServiceCallback): void; - /** - * @param key The key of the key-value to retrieve. - * @param options The optional parameters - * @param callback The callback - */ - checkKeyValue(key: string, options: Models.AppConfigurationCheckKeyValueOptionalParams, callback: coreHttp.ServiceCallback): void; - checkKeyValue(key: string, options?: Models.AppConfigurationCheckKeyValueOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * @param options The options parameters. + */ + checkKeyValue( + key: string, + options?: AppConfigurationCheckKeyValueOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + key, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - key, - options - }, - checkKeyValueOperationSpec, - callback) as Promise; + operationArguments, + checkKeyValueOperationSpec + ) as Promise; } /** - * @summary Gets a list of labels. - * @param [options] The optional parameters - * @returns Promise - */ - getLabels(options?: Models.AppConfigurationGetLabelsOptionalParams): Promise; - /** - * @param callback The callback + * Gets a list of labels. + * @param options The options parameters. */ - getLabels(callback: coreHttp.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - getLabels(options: Models.AppConfigurationGetLabelsOptionalParams, callback: coreHttp.ServiceCallback): void; - getLabels(options?: Models.AppConfigurationGetLabelsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + getLabels( + options?: AppConfigurationGetLabelsOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - getLabelsOperationSpec, - callback) as Promise; + operationArguments, + getLabelsOperationSpec + ) as Promise; } /** - * @summary Requests the headers and status of the given resource. - * @param [options] The optional parameters - * @returns Promise + * Requests the headers and status of the given resource. + * @param options The options parameters. */ - checkLabels(options?: Models.AppConfigurationCheckLabelsOptionalParams): Promise; - /** - * @param callback The callback - */ - checkLabels(callback: coreHttp.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - checkLabels(options: Models.AppConfigurationCheckLabelsOptionalParams, callback: coreHttp.ServiceCallback): void; - checkLabels(options?: Models.AppConfigurationCheckLabelsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + checkLabels( + options?: AppConfigurationCheckLabelsOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - checkLabelsOperationSpec, - callback) as Promise; + operationArguments, + checkLabelsOperationSpec + ) as Promise; } /** - * @summary Locks a key-value. - * @param key The key of the key-value to lock. - * @param [options] The optional parameters - * @returns Promise - */ - putLock(key: string, options?: Models.AppConfigurationPutLockOptionalParams): Promise; - /** - * @param key The key of the key-value to lock. - * @param callback The callback - */ - putLock(key: string, callback: coreHttp.ServiceCallback): void; - /** + * Locks a key-value. * @param key The key of the key-value to lock. - * @param options The optional parameters - * @param callback The callback - */ - putLock(key: string, options: Models.AppConfigurationPutLockOptionalParams, callback: coreHttp.ServiceCallback): void; - putLock(key: string, options?: Models.AppConfigurationPutLockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * @param options The options parameters. + */ + putLock( + key: string, + options?: AppConfigurationPutLockOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + key, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - key, - options - }, - putLockOperationSpec, - callback) as Promise; + operationArguments, + putLockOperationSpec + ) as Promise; } /** - * @summary Unlocks a key-value. - * @param key The key of the key-value to unlock. - * @param [options] The optional parameters - * @returns Promise - */ - deleteLock(key: string, options?: Models.AppConfigurationDeleteLockOptionalParams): Promise; - /** - * @param key The key of the key-value to unlock. - * @param callback The callback - */ - deleteLock(key: string, callback: coreHttp.ServiceCallback): void; - /** + * Unlocks a key-value. * @param key The key of the key-value to unlock. - * @param options The optional parameters - * @param callback The callback - */ - deleteLock(key: string, options: Models.AppConfigurationDeleteLockOptionalParams, callback: coreHttp.ServiceCallback): void; - deleteLock(key: string, options?: Models.AppConfigurationDeleteLockOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * @param options The options parameters. + */ + deleteLock( + key: string, + options?: AppConfigurationDeleteLockOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + key, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - key, - options - }, - deleteLockOperationSpec, - callback) as Promise; + operationArguments, + deleteLockOperationSpec + ) as Promise; } /** - * @summary Gets a list of key-value revisions. - * @param [options] The optional parameters - * @returns Promise + * Gets a list of key-value revisions. + * @param options The options parameters. */ - getRevisions(options?: Models.AppConfigurationGetRevisionsOptionalParams): Promise; + getRevisions( + options?: AppConfigurationGetRevisionsOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; + return this.sendOperationRequest( + operationArguments, + getRevisionsOperationSpec + ) as Promise; + } + /** - * @param callback The callback + * Requests the headers and status of the given resource. + * @param options The options parameters. */ - getRevisions(callback: coreHttp.ServiceCallback): void; + checkRevisions( + options?: AppConfigurationCheckRevisionsOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; + return this.sendOperationRequest( + operationArguments, + checkRevisionsOperationSpec + ) as Promise; + } + /** - * @param options The optional parameters - * @param callback The callback - */ - getRevisions(options: Models.AppConfigurationGetRevisionsOptionalParams, callback: coreHttp.ServiceCallback): void; - getRevisions(options?: Models.AppConfigurationGetRevisionsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * GetKeysNext + * @param nextLink The nextLink from the previous successful call to the GetKeys method. + * @param options The options parameters. + */ + getKeysNext( + nextLink: string, + options?: AppConfigurationGetKeysNextOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + nextLink, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - getRevisionsOperationSpec, - callback) as Promise; + operationArguments, + getKeysNextOperationSpec + ) as Promise; } /** - * @summary Requests the headers and status of the given resource. - * @param [options] The optional parameters - * @returns Promise - */ - checkRevisions(options?: Models.AppConfigurationCheckRevisionsOptionalParams): Promise; + * GetKeyValuesNext + * @param nextLink The nextLink from the previous successful call to the GetKeyValues method. + * @param options The options parameters. + */ + getKeyValuesNext( + nextLink: string, + options?: AppConfigurationGetKeyValuesNextOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + nextLink, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; + return this.sendOperationRequest( + operationArguments, + getKeyValuesNextOperationSpec + ) as Promise; + } + /** - * @param callback The callback - */ - checkRevisions(callback: coreHttp.ServiceCallback): void; + * GetLabelsNext + * @param nextLink The nextLink from the previous successful call to the GetLabels method. + * @param options The options parameters. + */ + getLabelsNext( + nextLink: string, + options?: AppConfigurationGetLabelsNextOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + nextLink, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; + return this.sendOperationRequest( + operationArguments, + getLabelsNextOperationSpec + ) as Promise; + } + /** - * @param options The optional parameters - * @param callback The callback - */ - checkRevisions(options: Models.AppConfigurationCheckRevisionsOptionalParams, callback: coreHttp.ServiceCallback): void; - checkRevisions(options?: Models.AppConfigurationCheckRevisionsOptionalParams | coreHttp.ServiceCallback, callback?: coreHttp.ServiceCallback): Promise { + * GetRevisionsNext + * @param nextLink The nextLink from the previous successful call to the GetRevisions method. + * @param options The options parameters. + */ + getRevisionsNext( + nextLink: string, + options?: AppConfigurationGetRevisionsNextOptionalParams + ): Promise { + const operationArguments: coreHttp.OperationArguments = { + nextLink, + options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) + }; return this.sendOperationRequest( - { - options - }, - checkRevisionsOperationSpec, - callback) as Promise; + operationArguments, + getRevisionsNextOperationSpec + ) as Promise; } } - // Operation Specifications -const serializer = new coreHttp.Serializer(Mappers); +const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false); + const getKeysOperationSpec: coreHttp.OperationSpec = { + path: "/keys", httpMethod: "GET", - path: "keys", - queryParameters: [ - Parameters.name, - Parameters.apiVersion, - Parameters.after - ], - headerParameters: [ - Parameters.syncToken, - Parameters.acceptDatetime - ], responses: { 200: { bodyMapper: Mappers.KeyListResult, - headersMapper: Mappers.GetKeysHeaders + headersMapper: Mappers.AppConfigurationGetKeysHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, - serializer -}; - -const checkKeysOperationSpec: coreHttp.OperationSpec = { - httpMethod: "HEAD", - path: "keys", - queryParameters: [ - Parameters.name, - Parameters.apiVersion, - Parameters.after - ], + queryParameters: [Parameters.name, Parameters.apiVersion, Parameters.after], + urlParameters: [Parameters.endpoint], headerParameters: [ + Parameters.accept, Parameters.syncToken, Parameters.acceptDatetime ], + serializer +}; +const checkKeysOperationSpec: coreHttp.OperationSpec = { + path: "/keys", + httpMethod: "HEAD", responses: { 200: { - headersMapper: Mappers.CheckKeysHeaders + headersMapper: Mappers.AppConfigurationCheckKeysHeaders }, default: {} }, + queryParameters: [Parameters.name, Parameters.apiVersion, Parameters.after], + urlParameters: [Parameters.endpoint], + headerParameters: [Parameters.syncToken, Parameters.acceptDatetime], serializer }; - const getKeyValuesOperationSpec: coreHttp.OperationSpec = { + path: "/kv", httpMethod: "GET", - path: "kv", - queryParameters: [ - Parameters.key0, - Parameters.label, - Parameters.apiVersion, - Parameters.after, - Parameters.select - ], - headerParameters: [ - Parameters.syncToken, - Parameters.acceptDatetime - ], responses: { 200: { bodyMapper: Mappers.KeyValueListResult, - headersMapper: Mappers.GetKeyValuesHeaders + headersMapper: Mappers.AppConfigurationGetKeyValuesHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, - serializer -}; - -const checkKeyValuesOperationSpec: coreHttp.OperationSpec = { - httpMethod: "HEAD", - path: "kv", queryParameters: [ - Parameters.key0, - Parameters.label, Parameters.apiVersion, Parameters.after, + Parameters.key, + Parameters.label, Parameters.select ], + urlParameters: [Parameters.endpoint], headerParameters: [ Parameters.syncToken, - Parameters.acceptDatetime + Parameters.acceptDatetime, + Parameters.accept1 ], + serializer +}; +const checkKeyValuesOperationSpec: coreHttp.OperationSpec = { + path: "/kv", + httpMethod: "HEAD", responses: { 200: { - headersMapper: Mappers.CheckKeyValuesHeaders + headersMapper: Mappers.AppConfigurationCheckKeyValuesHeaders }, default: {} }, + queryParameters: [ + Parameters.apiVersion, + Parameters.after, + Parameters.key, + Parameters.label, + Parameters.select1 + ], + urlParameters: [Parameters.endpoint], + headerParameters: [Parameters.syncToken, Parameters.acceptDatetime], serializer }; - const getKeyValueOperationSpec: coreHttp.OperationSpec = { + path: "/kv/{key}", httpMethod: "GET", - path: "kv/{key}", - urlParameters: [ - Parameters.key1 - ], - queryParameters: [ - Parameters.label, - Parameters.apiVersion, - Parameters.select - ], - headerParameters: [ - Parameters.syncToken, - Parameters.acceptDatetime, - Parameters.ifMatch, - Parameters.ifNoneMatch - ], responses: { 200: { bodyMapper: Mappers.KeyValue, - headersMapper: Mappers.GetKeyValueHeaders + headersMapper: Mappers.AppConfigurationGetKeyValueHeaders }, 304: { - headersMapper: Mappers.GetKeyValueHeaders + headersMapper: Mappers.AppConfigurationGetKeyValueHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, - serializer -}; - -const putKeyValueOperationSpec: coreHttp.OperationSpec = { - httpMethod: "PUT", - path: "kv/{key}", - urlParameters: [ - Parameters.key1 - ], queryParameters: [ + Parameters.apiVersion, Parameters.label, - Parameters.apiVersion + Parameters.select2 ], + urlParameters: [Parameters.endpoint, Parameters.key1], headerParameters: [ Parameters.syncToken, + Parameters.acceptDatetime, + Parameters.accept2, Parameters.ifMatch, Parameters.ifNoneMatch ], - requestBody: { - parameterPath: [ - "options", - "entity" - ], - mapper: Mappers.KeyValue - }, + serializer +}; +const putKeyValueOperationSpec: coreHttp.OperationSpec = { + path: "/kv/{key}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.KeyValue, - headersMapper: Mappers.PutKeyValueHeaders + headersMapper: Mappers.AppConfigurationPutKeyValueHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, + requestBody: Parameters.entity, + queryParameters: [Parameters.apiVersion, Parameters.label], + urlParameters: [Parameters.endpoint, Parameters.key1], + headerParameters: [ + Parameters.syncToken, + Parameters.accept2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.contentType + ], + mediaType: "json", serializer }; - const deleteKeyValueOperationSpec: coreHttp.OperationSpec = { + path: "/kv/{key}", httpMethod: "DELETE", - path: "kv/{key}", - urlParameters: [ - Parameters.key1 - ], - queryParameters: [ - Parameters.label, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.syncToken, - Parameters.ifMatch - ], responses: { 200: { bodyMapper: Mappers.KeyValue, - headersMapper: Mappers.DeleteKeyValueHeaders + headersMapper: Mappers.AppConfigurationDeleteKeyValueHeaders }, 204: { - headersMapper: Mappers.DeleteKeyValueHeaders + headersMapper: Mappers.AppConfigurationDeleteKeyValueHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, + queryParameters: [Parameters.apiVersion, Parameters.label], + urlParameters: [Parameters.endpoint, Parameters.key1], + headerParameters: [ + Parameters.syncToken, + Parameters.accept2, + Parameters.ifMatch + ], serializer }; - const checkKeyValueOperationSpec: coreHttp.OperationSpec = { + path: "/kv/{key}", httpMethod: "HEAD", - path: "kv/{key}", - urlParameters: [ - Parameters.key1 - ], - queryParameters: [ - Parameters.label, - Parameters.apiVersion, - Parameters.select - ], - headerParameters: [ - Parameters.syncToken, - Parameters.acceptDatetime, - Parameters.ifMatch, - Parameters.ifNoneMatch - ], responses: { 200: { - headersMapper: Mappers.CheckKeyValueHeaders + headersMapper: Mappers.AppConfigurationCheckKeyValueHeaders }, 304: { - headersMapper: Mappers.CheckKeyValueHeaders + headersMapper: Mappers.AppConfigurationCheckKeyValueHeaders }, default: {} }, - serializer -}; - -const getLabelsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "GET", - path: "labels", queryParameters: [ - Parameters.name, Parameters.apiVersion, - Parameters.after, - Parameters.select + Parameters.label, + Parameters.select3 ], + urlParameters: [Parameters.endpoint, Parameters.key1], headerParameters: [ Parameters.syncToken, - Parameters.acceptDatetime + Parameters.acceptDatetime, + Parameters.ifMatch, + Parameters.ifNoneMatch ], + serializer +}; +const getLabelsOperationSpec: coreHttp.OperationSpec = { + path: "/labels", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.LabelListResult, - headersMapper: Mappers.GetLabelsHeaders + headersMapper: Mappers.AppConfigurationGetLabelsHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, - serializer -}; - -const checkLabelsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "HEAD", - path: "labels", queryParameters: [ Parameters.name, Parameters.apiVersion, Parameters.after, - Parameters.select + Parameters.select4 ], + urlParameters: [Parameters.endpoint], headerParameters: [ Parameters.syncToken, - Parameters.acceptDatetime + Parameters.acceptDatetime, + Parameters.accept3 ], + serializer +}; +const checkLabelsOperationSpec: coreHttp.OperationSpec = { + path: "/labels", + httpMethod: "HEAD", responses: { 200: { - headersMapper: Mappers.CheckLabelsHeaders + headersMapper: Mappers.AppConfigurationCheckLabelsHeaders }, default: {} }, + queryParameters: [ + Parameters.name, + Parameters.apiVersion, + Parameters.after, + Parameters.select4 + ], + urlParameters: [Parameters.endpoint], + headerParameters: [Parameters.syncToken, Parameters.acceptDatetime], serializer }; - const putLockOperationSpec: coreHttp.OperationSpec = { + path: "/locks/{key}", httpMethod: "PUT", - path: "locks/{key}", - urlParameters: [ - Parameters.key1 - ], - queryParameters: [ - Parameters.label, - Parameters.apiVersion - ], + responses: { + 200: { + bodyMapper: Mappers.KeyValue, + headersMapper: Mappers.AppConfigurationPutLockHeaders + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion, Parameters.label], + urlParameters: [Parameters.endpoint, Parameters.key1], headerParameters: [ Parameters.syncToken, + Parameters.accept2, Parameters.ifMatch, Parameters.ifNoneMatch ], + serializer +}; +const deleteLockOperationSpec: coreHttp.OperationSpec = { + path: "/locks/{key}", + httpMethod: "DELETE", responses: { 200: { bodyMapper: Mappers.KeyValue, - headersMapper: Mappers.PutLockHeaders + headersMapper: Mappers.AppConfigurationDeleteLockHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, + queryParameters: [Parameters.apiVersion, Parameters.label], + urlParameters: [Parameters.endpoint, Parameters.key1], + headerParameters: [ + Parameters.syncToken, + Parameters.accept2, + Parameters.ifMatch, + Parameters.ifNoneMatch + ], serializer }; - -const deleteLockOperationSpec: coreHttp.OperationSpec = { - httpMethod: "DELETE", - path: "locks/{key}", - urlParameters: [ - Parameters.key1 - ], +const getRevisionsOperationSpec: coreHttp.OperationSpec = { + path: "/revisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.KeyValueListResult, + headersMapper: Mappers.AppConfigurationGetRevisionsHeaders + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, queryParameters: [ + Parameters.apiVersion, + Parameters.after, + Parameters.key, Parameters.label, - Parameters.apiVersion + Parameters.select5 ], + urlParameters: [Parameters.endpoint], headerParameters: [ Parameters.syncToken, - Parameters.ifMatch, - Parameters.ifNoneMatch + Parameters.acceptDatetime, + Parameters.accept1 ], + serializer +}; +const checkRevisionsOperationSpec: coreHttp.OperationSpec = { + path: "/revisions", + httpMethod: "HEAD", responses: { 200: { - bodyMapper: Mappers.KeyValue, - headersMapper: Mappers.DeleteLockHeaders + headersMapper: Mappers.AppConfigurationCheckRevisionsHeaders + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.after, + Parameters.key, + Parameters.label, + Parameters.select6 + ], + urlParameters: [Parameters.endpoint], + headerParameters: [Parameters.syncToken, Parameters.acceptDatetime], + serializer +}; +const getKeysNextOperationSpec: coreHttp.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.KeyListResult, + headersMapper: Mappers.AppConfigurationGetKeysNextHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, + queryParameters: [Parameters.name, Parameters.apiVersion, Parameters.after], + urlParameters: [Parameters.endpoint, Parameters.nextLink], + headerParameters: [ + Parameters.accept, + Parameters.syncToken, + Parameters.acceptDatetime + ], serializer }; - -const getRevisionsOperationSpec: coreHttp.OperationSpec = { +const getKeyValuesNextOperationSpec: coreHttp.OperationSpec = { + path: "{nextLink}", httpMethod: "GET", - path: "revisions", + responses: { + 200: { + bodyMapper: Mappers.KeyValueListResult, + headersMapper: Mappers.AppConfigurationGetKeyValuesNextHeaders + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, queryParameters: [ - Parameters.key0, - Parameters.label, Parameters.apiVersion, Parameters.after, + Parameters.key, + Parameters.label, Parameters.select ], + urlParameters: [Parameters.endpoint, Parameters.nextLink], headerParameters: [ Parameters.syncToken, - Parameters.acceptDatetime + Parameters.acceptDatetime, + Parameters.accept1 ], + serializer +}; +const getLabelsNextOperationSpec: coreHttp.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.KeyValueListResult, - headersMapper: Mappers.GetRevisionsHeaders + bodyMapper: Mappers.LabelListResult, + headersMapper: Mappers.AppConfigurationGetLabelsNextHeaders }, default: { bodyMapper: Mappers.ErrorModel } }, - serializer -}; - -const checkRevisionsOperationSpec: coreHttp.OperationSpec = { - httpMethod: "HEAD", - path: "revisions", queryParameters: [ - Parameters.key0, - Parameters.label, + Parameters.name, Parameters.apiVersion, Parameters.after, - Parameters.select + Parameters.select4 ], + urlParameters: [Parameters.endpoint, Parameters.nextLink], headerParameters: [ Parameters.syncToken, - Parameters.acceptDatetime + Parameters.acceptDatetime, + Parameters.accept3 ], + serializer +}; +const getRevisionsNextOperationSpec: coreHttp.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { - headersMapper: Mappers.CheckRevisionsHeaders + bodyMapper: Mappers.KeyValueListResult, + headersMapper: Mappers.AppConfigurationGetRevisionsNextHeaders }, - default: {} + default: { + bodyMapper: Mappers.ErrorModel + } }, + queryParameters: [ + Parameters.apiVersion, + Parameters.after, + Parameters.key, + Parameters.label, + Parameters.select5 + ], + urlParameters: [Parameters.endpoint, Parameters.nextLink], + headerParameters: [ + Parameters.syncToken, + Parameters.acceptDatetime, + Parameters.accept1 + ], serializer }; - -export { - AppConfiguration, - AppConfigurationContext, - Models as AppConfigurationModels, - Mappers as AppConfigurationMappers -}; diff --git a/sdk/appconfiguration/app-configuration/src/generated/src/appConfigurationContext.ts b/sdk/appconfiguration/app-configuration/src/generated/src/appConfigurationContext.ts index 30746aa8969e..4463d7e033b4 100644 --- a/sdk/appconfiguration/app-configuration/src/generated/src/appConfigurationContext.ts +++ b/sdk/appconfiguration/app-configuration/src/generated/src/appConfigurationContext.ts @@ -1,51 +1,64 @@ /* - * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as coreHttp from "@azure/core-http"; -import * as Models from "./models"; +import { ApiVersion10, AppConfigurationOptionalParams } from "./models"; +const packageName = "app-configuration"; +const packageVersion = "1.1.1"; + +/** @hidden */ export class AppConfigurationContext extends coreHttp.ServiceClient { + endpoint: string; syncToken?: string; - apiVersion: string; - credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials; + apiVersion: ApiVersion10; /** * Initializes a new instance of the AppConfigurationContext class. - * @param apiVersion The API version to be used with the HTTP request. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options + * @param endpoint The endpoint of the App Configuration instance to send requests to. + * @param apiVersion Api Version + * @param options The parameter options */ constructor( credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, - apiVersion: string, - options?: Models.AppConfigurationOptions + endpoint: string, + apiVersion: ApiVersion10, + options?: AppConfigurationOptionalParams ) { - if (apiVersion == undefined) { - throw new Error("'apiVersion' cannot be null."); + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (endpoint === undefined) { + throw new Error("'endpoint' cannot be null"); } - if (credentials == undefined) { - throw new Error("'credentials' cannot be null."); + if (apiVersion === undefined) { + throw new Error("'apiVersion' cannot be null"); } + // Initializing default values for options if (!options) { options = {}; } + if (!options.userAgent) { + const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + super(credentials, options); - this.baseUri = options.baseUri || this.baseUri || "http://localhost"; this.requestContentType = "application/json; charset=utf-8"; + + this.baseUri = options.endpoint || "{endpoint}"; + + // Parameter assignments + this.endpoint = endpoint; this.apiVersion = apiVersion; - this.credentials = credentials; - if (options.syncToken !== null && options.syncToken !== undefined) { - this.syncToken = options.syncToken; - } } } diff --git a/sdk/appconfiguration/app-configuration/src/generated/src/index.ts b/sdk/appconfiguration/app-configuration/src/generated/src/index.ts new file mode 100644 index 000000000000..2366d1e0cde8 --- /dev/null +++ b/sdk/appconfiguration/app-configuration/src/generated/src/index.ts @@ -0,0 +1,11 @@ +/* + * 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 * from "./models"; +export { AppConfiguration } from "./appConfiguration"; +export { AppConfigurationContext } from "./appConfigurationContext"; diff --git a/sdk/appconfiguration/app-configuration/src/generated/src/models/index.ts b/sdk/appconfiguration/app-configuration/src/generated/src/models/index.ts index d981adc5bf03..f13fb697338f 100644 --- a/sdk/appconfiguration/app-configuration/src/generated/src/models/index.ts +++ b/sdk/appconfiguration/app-configuration/src/generated/src/models/index.ts @@ -1,930 +1,861 @@ /* - * 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. */ -import { ServiceClientOptions } from "@azure/core-http"; import * as coreHttp from "@azure/core-http"; -/** - * An interface representing Key. - */ -export interface Key { - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; -} - -/** - * An interface representing KeyValue. - */ -export interface KeyValue { - key: string; - label?: string; - contentType?: string; - value?: string; - lastModified?: Date; - tags?: { [propertyName: string]: string }; - locked?: boolean; - etag?: string; +/** The result of a list request. */ +export interface KeyListResult { + /** The collection value. */ + items?: Key[]; + /** The URI that can be used to request the next set of paged results. */ + nextLink?: string; } -/** - * An interface representing Label. - */ -export interface Label { - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ +export interface Key { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; } -/** - * Azure App Configuration error object. - */ +/** Azure App Configuration error object. */ export interface ErrorModel { - /** - * The type of the error. - */ + /** The type of the error. */ type?: string; - /** - * A brief summary of the error. - */ + /** A brief summary of the error. */ title?: string; - /** - * The name of the parameter that resulted in the error. - */ + /** The name of the parameter that resulted in the error. */ name?: string; - /** - * A detailed description of the error. - */ + /** A detailed description of the error. */ detail?: string; - /** - * The HTTP status code that the error maps to. - */ + /** The HTTP status code that the error maps to. */ status?: number; } -/** - * The result of a list request. - */ -export interface KeyListResult { - /** - * The collection value. - */ - items?: Key[]; - /** - * The URI that can be used to request the next set of paged results. - */ - nextLink?: string; -} - -/** - * The result of a list request. - */ +/** The result of a list request. */ export interface KeyValueListResult { - /** - * The collection value. - */ + /** The collection value. */ items?: KeyValue[]; - /** - * The URI that can be used to request the next set of paged results. - */ + /** The URI that can be used to request the next set of paged results. */ nextLink?: string; } -/** - * The result of a list request. - */ -export interface LabelListResult { - /** - * The collection value. - */ - items?: Label[]; - /** - * The URI that can be used to request the next set of paged results. - */ - nextLink?: string; -} - -/** - * An interface representing AppConfigurationOptions. - */ -export interface AppConfigurationOptions extends ServiceClientOptions { - /** - * Used to guarantee real-time consistency between requests. - */ - syncToken?: string; - baseUri?: string; -} - -/** - * Optional Parameters. - */ -export interface AppConfigurationGetKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter for the name of the returned keys. - */ - name?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; -} - -/** - * Optional Parameters. - */ -export interface AppConfigurationCheckKeysOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter for the name of the returned keys. - */ - name?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; -} - -/** - * Optional Parameters. - */ -export interface AppConfigurationGetKeyValuesOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter used to match keys. - */ - key?: string; - /** - * A filter used to match labels - */ - label?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; -} - -/** - * Optional Parameters. - */ -export interface AppConfigurationCheckKeyValuesOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter used to match keys. - */ - key?: string; - /** - * A filter used to match labels - */ - label?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; -} - -/** - * Optional Parameters. - */ -export interface AppConfigurationGetKeyValueOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The label of the key-value to retrieve. - */ - label?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to perform an operation only if the targeted resource's etag matches the value provided. - */ - ifMatch?: string; - /** - * Used to perform an operation only if the targeted resource's etag does not match the value - * provided. - */ - ifNoneMatch?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; -} - -/** - * Optional Parameters. - */ -export interface AppConfigurationPutKeyValueOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The label of the key-value to create. - */ - label?: string; - /** - * The key-value to create. - */ - entity?: KeyValue; - /** - * Used to perform an operation only if the targeted resource's etag matches the value provided. - */ - ifMatch?: string; - /** - * Used to perform an operation only if the targeted resource's etag does not match the value - * provided. - */ - ifNoneMatch?: string; -} - -/** - * Optional Parameters. - */ -export interface AppConfigurationDeleteKeyValueOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The label of the key-value to delete. - */ +export interface KeyValue { + key: string; label?: string; - /** - * Used to perform an operation only if the targeted resource's etag matches the value provided. - */ - ifMatch?: string; + contentType?: string; + value?: string; + lastModified?: Date; + /** Dictionary of */ + tags?: { [propertyName: string]: string }; + locked?: boolean; + etag?: string; } -/** - * Optional Parameters. - */ -export interface AppConfigurationCheckKeyValueOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The label of the key-value to retrieve. - */ - label?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to perform an operation only if the targeted resource's etag matches the value provided. - */ - ifMatch?: string; - /** - * Used to perform an operation only if the targeted resource's etag does not match the value - * provided. - */ - ifNoneMatch?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; +/** The result of a list request. */ +export interface LabelListResult { + /** The collection value. */ + items?: Label[]; + /** The URI that can be used to request the next set of paged results. */ + nextLink?: string; } -/** - * Optional Parameters. - */ -export interface AppConfigurationGetLabelsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter for the name of the returned labels. - */ - name?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; +export interface Label { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly name?: string; } -/** - * Optional Parameters. - */ -export interface AppConfigurationCheckLabelsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter for the name of the returned labels. - */ - name?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; +/** Defines headers for AppConfiguration_getKeys operation. */ +export interface AppConfigurationGetKeysHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ + syncToken?: string; } -/** - * Optional Parameters. - */ -export interface AppConfigurationPutLockOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The label, if any, of the key-value to lock. - */ - label?: string; - /** - * Used to perform an operation only if the targeted resource's etag matches the value provided. - */ - ifMatch?: string; - /** - * Used to perform an operation only if the targeted resource's etag does not match the value - * provided. - */ - ifNoneMatch?: string; +/** Defines headers for AppConfiguration_checkKeys operation. */ +export interface AppConfigurationCheckKeysHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ + syncToken?: string; } -/** - * Optional Parameters. - */ -export interface AppConfigurationDeleteLockOptionalParams extends coreHttp.RequestOptionsBase { - /** - * The label, if any, of the key-value to unlock. - */ - label?: string; - /** - * Used to perform an operation only if the targeted resource's etag matches the value provided. - */ - ifMatch?: string; - /** - * Used to perform an operation only if the targeted resource's etag does not match the value - * provided. - */ - ifNoneMatch?: string; +/** Defines headers for AppConfiguration_getKeyValues operation. */ +export interface AppConfigurationGetKeyValuesHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ + syncToken?: string; } -/** - * Optional Parameters. - */ -export interface AppConfigurationGetRevisionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter used to match keys. - */ - key?: string; - /** - * A filter used to match labels - */ - label?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; +/** Defines headers for AppConfiguration_checkKeyValues operation. */ +export interface AppConfigurationCheckKeyValuesHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ + syncToken?: string; } -/** - * Optional Parameters. - */ -export interface AppConfigurationCheckRevisionsOptionalParams extends coreHttp.RequestOptionsBase { - /** - * A filter used to match keys. - */ - key?: string; - /** - * A filter used to match labels - */ - label?: string; - /** - * Instructs the server to return elements that appear after the element referred to by the - * specified token. - */ - after?: string; - /** - * Requests the server to respond with the state of the resource at the specified time. - */ - acceptDatetime?: string; - /** - * Used to select what fields are present in the returned resource(s). - */ - select?: string[]; +/** Defines headers for AppConfiguration_getKeyValue operation. */ +export interface AppConfigurationGetKeyValueHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ + syncToken?: string; + /** An identifier representing the returned state of the resource. */ + eTag?: string; + /** A UTC datetime that specifies the last time the resource was modified. */ + lastModified?: string; } -/** - * Defines headers for GetKeys operation. - */ -export interface GetKeysHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_putKeyValue operation. */ +export interface AppConfigurationPutKeyValueHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; + /** An identifier representing the returned state of the resource. */ + eTag?: string; } -/** - * Defines headers for CheckKeys operation. - */ -export interface CheckKeysHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_deleteKeyValue operation. */ +export interface AppConfigurationDeleteKeyValueHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; + /** An identifier representing the returned state of the resource. */ + eTag?: string; } -/** - * Defines headers for GetKeyValues operation. - */ -export interface GetKeyValuesHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_checkKeyValue operation. */ +export interface AppConfigurationCheckKeyValueHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; + /** An identifier representing the returned state of the resource. */ + eTag?: string; + /** A UTC datetime that specifies the last time the resource was modified. */ + lastModified?: string; } -/** - * Defines headers for CheckKeyValues operation. - */ -export interface CheckKeyValuesHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_getLabels operation. */ +export interface AppConfigurationGetLabelsHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; } -/** - * Defines headers for GetKeyValue operation. - */ -export interface GetKeyValueHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_checkLabels operation. */ +export interface AppConfigurationCheckLabelsHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; - /** - * An identifier representing the returned state of the resource. - */ - eTag?: string; - /** - * A UTC datetime that specifies the last time the resource was modified. - */ - lastModifiedHeader?: string; } -/** - * Defines headers for PutKeyValue operation. - */ -export interface PutKeyValueHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_putLock operation. */ +export interface AppConfigurationPutLockHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; - /** - * An identifier representing the returned state of the resource. - */ + /** An identifier representing the returned state of the resource. */ eTag?: string; } -/** - * Defines headers for DeleteKeyValue operation. - */ -export interface DeleteKeyValueHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_deleteLock operation. */ +export interface AppConfigurationDeleteLockHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; - /** - * An identifier representing the returned state of the resource. - */ + /** An identifier representing the returned state of the resource. */ eTag?: string; } -/** - * Defines headers for CheckKeyValue operation. - */ -export interface CheckKeyValueHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_getRevisions operation. */ +export interface AppConfigurationGetRevisionsHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; - /** - * An identifier representing the returned state of the resource. - */ - eTag?: string; - /** - * A UTC datetime that specifies the last time the resource was modified. - */ - lastModified?: string; } -/** - * Defines headers for GetLabels operation. - */ -export interface GetLabelsHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_checkRevisions operation. */ +export interface AppConfigurationCheckRevisionsHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; } -/** - * Defines headers for CheckLabels operation. - */ -export interface CheckLabelsHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_getKeysNext operation. */ +export interface AppConfigurationGetKeysNextHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; } -/** - * Defines headers for PutLock operation. - */ -export interface PutLockHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_getKeyValuesNext operation. */ +export interface AppConfigurationGetKeyValuesNextHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; - /** - * An identifier representing the returned state of the resource. - */ - eTag?: string; } -/** - * Defines headers for DeleteLock operation. - */ -export interface DeleteLockHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_getLabelsNext operation. */ +export interface AppConfigurationGetLabelsNextHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; - /** - * An identifier representing the returned state of the resource. - */ - eTag?: string; } -/** - * Defines headers for GetRevisions operation. - */ -export interface GetRevisionsHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ +/** Defines headers for AppConfiguration_getRevisionsNext operation. */ +export interface AppConfigurationGetRevisionsNextHeaders { + /** Enables real-time consistency between requests by providing the returned value in the next request made to the server. */ syncToken?: string; } -/** - * Defines headers for CheckRevisions operation. - */ -export interface CheckRevisionsHeaders { - /** - * Enables real-time consistency between requests by providing the returned value in the next - * request made to the server. - */ - syncToken?: string; +/** Known values of {@link ApiVersion10} that the service accepts. */ +export const enum KnownApiVersion10 { + /** Api Version '1.0' */ + One0 = "1.0" +} + +/** + * Defines values for ApiVersion10. \ + * {@link KnownApiVersion10} can be used interchangeably with ApiVersion10, + * this enum contains the known values that the service supports. + * ### Know values supported by the service + * **1.0**: Api Version '1.0' + */ +export type ApiVersion10 = string; + +/** Known values of {@link Get6ItemsItem} that the service accepts. */ +export const enum KnownGet6ItemsItem { + Key = "key", + Label = "label", + ContentType = "content_type", + Value = "value", + LastModified = "last_modified", + Tags = "tags", + Locked = "locked", + Etag = "etag" +} + +/** + * Defines values for Get6ItemsItem. \ + * {@link KnownGet6ItemsItem} can be used interchangeably with Get6ItemsItem, + * this enum contains the known values that the service supports. + * ### Know values supported by the service + * **key** \ + * **label** \ + * **content_type** \ + * **value** \ + * **last_modified** \ + * **tags** \ + * **locked** \ + * **etag** + */ +export type Get6ItemsItem = string; + +/** Known values of {@link Head6ItemsItem} that the service accepts. */ +export const enum KnownHead6ItemsItem { + Key = "key", + Label = "label", + ContentType = "content_type", + Value = "value", + LastModified = "last_modified", + Tags = "tags", + Locked = "locked", + Etag = "etag" +} + +/** + * Defines values for Head6ItemsItem. \ + * {@link KnownHead6ItemsItem} can be used interchangeably with Head6ItemsItem, + * this enum contains the known values that the service supports. + * ### Know values supported by the service + * **key** \ + * **label** \ + * **content_type** \ + * **value** \ + * **last_modified** \ + * **tags** \ + * **locked** \ + * **etag** + */ +export type Head6ItemsItem = string; + +/** Known values of {@link Get7ItemsItem} that the service accepts. */ +export const enum KnownGet7ItemsItem { + Key = "key", + Label = "label", + ContentType = "content_type", + Value = "value", + LastModified = "last_modified", + Tags = "tags", + Locked = "locked", + Etag = "etag" +} + +/** + * Defines values for Get7ItemsItem. \ + * {@link KnownGet7ItemsItem} can be used interchangeably with Get7ItemsItem, + * this enum contains the known values that the service supports. + * ### Know values supported by the service + * **key** \ + * **label** \ + * **content_type** \ + * **value** \ + * **last_modified** \ + * **tags** \ + * **locked** \ + * **etag** + */ +export type Get7ItemsItem = string; + +/** Known values of {@link Head7ItemsItem} that the service accepts. */ +export const enum KnownHead7ItemsItem { + Key = "key", + Label = "label", + ContentType = "content_type", + Value = "value", + LastModified = "last_modified", + Tags = "tags", + Locked = "locked", + Etag = "etag" +} + +/** + * Defines values for Head7ItemsItem. \ + * {@link KnownHead7ItemsItem} can be used interchangeably with Head7ItemsItem, + * this enum contains the known values that the service supports. + * ### Know values supported by the service + * **key** \ + * **label** \ + * **content_type** \ + * **value** \ + * **last_modified** \ + * **tags** \ + * **locked** \ + * **etag** + */ +export type Head7ItemsItem = string; + +/** Known values of {@link Enum5} that the service accepts. */ +export const enum KnownEnum5 { + Key = "key", + Label = "label", + ContentType = "content_type", + Value = "value", + LastModified = "last_modified", + Tags = "tags", + Locked = "locked", + Etag = "etag" +} + +/** + * Defines values for Enum5. \ + * {@link KnownEnum5} can be used interchangeably with Enum5, + * this enum contains the known values that the service supports. + * ### Know values supported by the service + * **key** \ + * **label** \ + * **content_type** \ + * **value** \ + * **last_modified** \ + * **tags** \ + * **locked** \ + * **etag** + */ +export type Enum5 = string; + +/** Known values of {@link Enum6} that the service accepts. */ +export const enum KnownEnum6 { + Key = "key", + Label = "label", + ContentType = "content_type", + Value = "value", + LastModified = "last_modified", + Tags = "tags", + Locked = "locked", + Etag = "etag" +} + +/** + * Defines values for Enum6. \ + * {@link KnownEnum6} can be used interchangeably with Enum6, + * this enum contains the known values that the service supports. + * ### Know values supported by the service + * **key** \ + * **label** \ + * **content_type** \ + * **value** \ + * **last_modified** \ + * **tags** \ + * **locked** \ + * **etag** + */ +export type Enum6 = string; + +/** Optional parameters. */ +export interface AppConfigurationGetKeysOptionalParams + extends coreHttp.OperationOptions { + /** A filter for the name of the returned keys. */ + name?: string; + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; } -/** - * Contains response data for the getKeys operation. - */ -export type GetKeysResponse = KeyListResult & GetKeysHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: GetKeysHeaders; - - /** - * The response body as text (string format) - */ +/** Contains response data for the getKeys operation. */ +export type AppConfigurationGetKeysResponse = AppConfigurationGetKeysHeaders & + KeyListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetKeysHeaders; }; -}; + }; -/** - * Contains response data for the checkKeys operation. - */ -export type CheckKeysResponse = CheckKeysHeaders & { - /** - * The underlying HTTP response. - */ +/** Optional parameters. */ +export interface AppConfigurationCheckKeysOptionalParams + extends coreHttp.OperationOptions { + /** A filter for the name of the returned keys. */ + name?: string; + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; +} + +/** Contains response data for the checkKeys operation. */ +export type AppConfigurationCheckKeysResponse = AppConfigurationCheckKeysHeaders & { + /** The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: CheckKeysHeaders; - }; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationCheckKeysHeaders; + }; }; -/** - * Contains response data for the getKeyValues operation. - */ -export type GetKeyValuesResponse = KeyValueListResult & GetKeyValuesHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: GetKeyValuesHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationGetKeyValuesOptionalParams + extends coreHttp.OperationOptions { + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** A filter used to match keys. */ + key?: string; + /** A filter used to match labels */ + label?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Get6ItemsItem[]; +} + +/** Contains response data for the getKeyValues operation. */ +export type AppConfigurationGetKeyValuesResponse = AppConfigurationGetKeyValuesHeaders & + KeyValueListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyValueListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetKeyValuesHeaders; }; -}; + }; -/** - * Contains response data for the checkKeyValues operation. - */ -export type CheckKeyValuesResponse = CheckKeyValuesHeaders & { - /** - * The underlying HTTP response. - */ +/** Optional parameters. */ +export interface AppConfigurationCheckKeyValuesOptionalParams + extends coreHttp.OperationOptions { + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** A filter used to match keys. */ + key?: string; + /** A filter used to match labels */ + label?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Head6ItemsItem[]; +} + +/** Contains response data for the checkKeyValues operation. */ +export type AppConfigurationCheckKeyValuesResponse = AppConfigurationCheckKeyValuesHeaders & { + /** The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: CheckKeyValuesHeaders; - }; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationCheckKeyValuesHeaders; + }; }; -/** - * Contains response data for the getKeyValue operation. - */ -export type GetKeyValueResponse = KeyValue & GetKeyValueHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: GetKeyValueHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationGetKeyValueOptionalParams + extends coreHttp.OperationOptions { + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** The label of the key-value to retrieve. */ + label?: string; + /** Used to perform an operation only if the targeted resource's etag matches the value provided. */ + ifMatch?: string; + /** Used to perform an operation only if the targeted resource's etag does not match the value provided. */ + ifNoneMatch?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Get7ItemsItem[]; +} + +/** Contains response data for the getKeyValue operation. */ +export type AppConfigurationGetKeyValueResponse = AppConfigurationGetKeyValueHeaders & + KeyValue & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyValue; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetKeyValueHeaders; }; -}; + }; -/** - * Contains response data for the putKeyValue operation. - */ -export type PutKeyValueResponse = KeyValue & PutKeyValueHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: PutKeyValueHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationPutKeyValueOptionalParams + extends coreHttp.OperationOptions { + /** The label of the key-value to create. */ + label?: string; + /** Used to perform an operation only if the targeted resource's etag matches the value provided. */ + ifMatch?: string; + /** Used to perform an operation only if the targeted resource's etag does not match the value provided. */ + ifNoneMatch?: string; + /** The key-value to create. */ + entity?: KeyValue; +} + +/** Contains response data for the putKeyValue operation. */ +export type AppConfigurationPutKeyValueResponse = AppConfigurationPutKeyValueHeaders & + KeyValue & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyValue; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationPutKeyValueHeaders; }; -}; + }; -/** - * Contains response data for the deleteKeyValue operation. - */ -export type DeleteKeyValueResponse = KeyValue & DeleteKeyValueHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: DeleteKeyValueHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationDeleteKeyValueOptionalParams + extends coreHttp.OperationOptions { + /** The label of the key-value to delete. */ + label?: string; + /** Used to perform an operation only if the targeted resource's etag matches the value provided. */ + ifMatch?: string; +} + +/** Contains response data for the deleteKeyValue operation. */ +export type AppConfigurationDeleteKeyValueResponse = AppConfigurationDeleteKeyValueHeaders & + KeyValue & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyValue; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationDeleteKeyValueHeaders; }; -}; + }; -/** - * Contains response data for the checkKeyValue operation. - */ -export type CheckKeyValueResponse = CheckKeyValueHeaders & { - /** - * The underlying HTTP response. - */ +/** Optional parameters. */ +export interface AppConfigurationCheckKeyValueOptionalParams + extends coreHttp.OperationOptions { + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** The label of the key-value to retrieve. */ + label?: string; + /** Used to perform an operation only if the targeted resource's etag matches the value provided. */ + ifMatch?: string; + /** Used to perform an operation only if the targeted resource's etag does not match the value provided. */ + ifNoneMatch?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Head7ItemsItem[]; +} + +/** Contains response data for the checkKeyValue operation. */ +export type AppConfigurationCheckKeyValueResponse = AppConfigurationCheckKeyValueHeaders & { + /** The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: CheckKeyValueHeaders; - }; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationCheckKeyValueHeaders; + }; }; -/** - * Contains response data for the getLabels operation. - */ -export type GetLabelsResponse = LabelListResult & GetLabelsHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: GetLabelsHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationGetLabelsOptionalParams + extends coreHttp.OperationOptions { + /** A filter for the name of the returned labels. */ + name?: string; + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: string[]; +} + +/** Contains response data for the getLabels operation. */ +export type AppConfigurationGetLabelsResponse = AppConfigurationGetLabelsHeaders & + LabelListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: LabelListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetLabelsHeaders; }; -}; + }; -/** - * Contains response data for the checkLabels operation. - */ -export type CheckLabelsResponse = CheckLabelsHeaders & { - /** - * The underlying HTTP response. - */ +/** Optional parameters. */ +export interface AppConfigurationCheckLabelsOptionalParams + extends coreHttp.OperationOptions { + /** A filter for the name of the returned labels. */ + name?: string; + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: string[]; +} + +/** Contains response data for the checkLabels operation. */ +export type AppConfigurationCheckLabelsResponse = AppConfigurationCheckLabelsHeaders & { + /** The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: CheckLabelsHeaders; - }; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationCheckLabelsHeaders; + }; }; -/** - * Contains response data for the putLock operation. - */ -export type PutLockResponse = KeyValue & PutLockHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: PutLockHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationPutLockOptionalParams + extends coreHttp.OperationOptions { + /** The label, if any, of the key-value to lock. */ + label?: string; + /** Used to perform an operation only if the targeted resource's etag matches the value provided. */ + ifMatch?: string; + /** Used to perform an operation only if the targeted resource's etag does not match the value provided. */ + ifNoneMatch?: string; +} + +/** Contains response data for the putLock operation. */ +export type AppConfigurationPutLockResponse = AppConfigurationPutLockHeaders & + KeyValue & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyValue; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationPutLockHeaders; }; -}; + }; -/** - * Contains response data for the deleteLock operation. - */ -export type DeleteLockResponse = KeyValue & DeleteLockHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: DeleteLockHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationDeleteLockOptionalParams + extends coreHttp.OperationOptions { + /** The label, if any, of the key-value to unlock. */ + label?: string; + /** Used to perform an operation only if the targeted resource's etag matches the value provided. */ + ifMatch?: string; + /** Used to perform an operation only if the targeted resource's etag does not match the value provided. */ + ifNoneMatch?: string; +} + +/** Contains response data for the deleteLock operation. */ +export type AppConfigurationDeleteLockResponse = AppConfigurationDeleteLockHeaders & + KeyValue & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyValue; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationDeleteLockHeaders; }; -}; + }; -/** - * Contains response data for the getRevisions operation. - */ -export type GetRevisionsResponse = KeyValueListResult & GetRevisionsHeaders & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: GetRevisionsHeaders; - - /** - * The response body as text (string format) - */ +/** Optional parameters. */ +export interface AppConfigurationGetRevisionsOptionalParams + extends coreHttp.OperationOptions { + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** A filter used to match keys. */ + key?: string; + /** A filter used to match labels */ + label?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Enum5[]; +} + +/** Contains response data for the getRevisions operation. */ +export type AppConfigurationGetRevisionsResponse = AppConfigurationGetRevisionsHeaders & + KeyValueListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ + /** The response body as parsed JSON or XML */ parsedBody: KeyValueListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetRevisionsHeaders; }; -}; + }; -/** - * Contains response data for the checkRevisions operation. - */ -export type CheckRevisionsResponse = CheckRevisionsHeaders & { - /** - * The underlying HTTP response. - */ +/** Optional parameters. */ +export interface AppConfigurationCheckRevisionsOptionalParams + extends coreHttp.OperationOptions { + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** A filter used to match keys. */ + key?: string; + /** A filter used to match labels */ + label?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Enum6[]; +} + +/** Contains response data for the checkRevisions operation. */ +export type AppConfigurationCheckRevisionsResponse = AppConfigurationCheckRevisionsHeaders & { + /** The underlying HTTP response. */ _response: coreHttp.HttpResponse & { - /** - * The parsed HTTP response headers. - */ - parsedHeaders: CheckRevisionsHeaders; - }; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationCheckRevisionsHeaders; + }; }; + +/** Optional parameters. */ +export interface AppConfigurationGetKeysNextOptionalParams + extends coreHttp.OperationOptions { + /** A filter for the name of the returned keys. */ + name?: string; + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; +} + +/** Contains response data for the getKeysNext operation. */ +export type AppConfigurationGetKeysNextResponse = AppConfigurationGetKeysNextHeaders & + KeyListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ + bodyAsText: string; + + /** The response body as parsed JSON or XML */ + parsedBody: KeyListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetKeysNextHeaders; + }; + }; + +/** Optional parameters. */ +export interface AppConfigurationGetKeyValuesNextOptionalParams + extends coreHttp.OperationOptions { + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** A filter used to match keys. */ + key?: string; + /** A filter used to match labels */ + label?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Get6ItemsItem[]; +} + +/** Contains response data for the getKeyValuesNext operation. */ +export type AppConfigurationGetKeyValuesNextResponse = AppConfigurationGetKeyValuesNextHeaders & + KeyValueListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ + bodyAsText: string; + + /** The response body as parsed JSON or XML */ + parsedBody: KeyValueListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetKeyValuesNextHeaders; + }; + }; + +/** Optional parameters. */ +export interface AppConfigurationGetLabelsNextOptionalParams + extends coreHttp.OperationOptions { + /** A filter for the name of the returned labels. */ + name?: string; + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: string[]; +} + +/** Contains response data for the getLabelsNext operation. */ +export type AppConfigurationGetLabelsNextResponse = AppConfigurationGetLabelsNextHeaders & + LabelListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ + bodyAsText: string; + + /** The response body as parsed JSON or XML */ + parsedBody: LabelListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetLabelsNextHeaders; + }; + }; + +/** Optional parameters. */ +export interface AppConfigurationGetRevisionsNextOptionalParams + extends coreHttp.OperationOptions { + /** Instructs the server to return elements that appear after the element referred to by the specified token. */ + after?: string; + /** Requests the server to respond with the state of the resource at the specified time. */ + acceptDatetime?: string; + /** A filter used to match keys. */ + key?: string; + /** A filter used to match labels */ + label?: string; + /** Used to select what fields are present in the returned resource(s). */ + select?: Enum5[]; +} + +/** Contains response data for the getRevisionsNext operation. */ +export type AppConfigurationGetRevisionsNextResponse = AppConfigurationGetRevisionsNextHeaders & + KeyValueListResult & { + /** The underlying HTTP response. */ + _response: coreHttp.HttpResponse & { + /** The response body as text (string format) */ + bodyAsText: string; + + /** The response body as parsed JSON or XML */ + parsedBody: KeyValueListResult; + /** The parsed HTTP response headers. */ + parsedHeaders: AppConfigurationGetRevisionsNextHeaders; + }; + }; + +/** Optional parameters. */ +export interface AppConfigurationOptionalParams + extends coreHttp.ServiceClientOptions { + /** Used to guarantee real-time consistency between requests. */ + syncToken?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/appconfiguration/app-configuration/src/generated/src/models/mappers.ts b/sdk/appconfiguration/app-configuration/src/generated/src/models/mappers.ts index d229ec3a9886..e5ffef77ef9e 100644 --- a/sdk/appconfiguration/app-configuration/src/generated/src/models/mappers.ts +++ b/sdk/appconfiguration/app-configuration/src/generated/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. @@ -8,80 +8,25 @@ import * as coreHttp from "@azure/core-http"; - -export const Key: coreHttp.CompositeMapper = { - serializedName: "Key", - type: { - name: "Composite", - className: "Key", - modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const KeyValue: coreHttp.CompositeMapper = { - serializedName: "KeyValue", +export const KeyListResult: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "KeyValue", + className: "KeyListResult", modelProperties: { - key: { - required: true, - serializedName: "key", - type: { - name: "String" - } - }, - label: { - serializedName: "label", - type: { - name: "String" - } - }, - contentType: { - serializedName: "content_type", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - }, - lastModified: { - serializedName: "last_modified", - type: { - name: "DateTime" - } - }, - tags: { - serializedName: "tags", + items: { + serializedName: "items", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "Key" } } } }, - locked: { - serializedName: "locked", - type: { - name: "Boolean" - } - }, - etag: { - serializedName: "etag", + nextLink: { + serializedName: "@nextLink", type: { name: "String" } @@ -90,15 +35,14 @@ export const KeyValue: coreHttp.CompositeMapper = { } }; -export const Label: coreHttp.CompositeMapper = { - serializedName: "Label", +export const Key: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "Label", + className: "Key", modelProperties: { name: { - readOnly: true, serializedName: "name", + readOnly: true, type: { name: "String" } @@ -108,7 +52,6 @@ export const Label: coreHttp.CompositeMapper = { }; export const ErrorModel: coreHttp.CompositeMapper = { - serializedName: "Error", type: { name: "Composite", className: "ErrorModel", @@ -147,11 +90,10 @@ export const ErrorModel: coreHttp.CompositeMapper = { } }; -export const KeyListResult: coreHttp.CompositeMapper = { - serializedName: "KeyListResult", +export const KeyValueListResult: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "KeyListResult", + className: "KeyValueListResult", modelProperties: { items: { serializedName: "items", @@ -160,7 +102,7 @@ export const KeyListResult: coreHttp.CompositeMapper = { element: { type: { name: "Composite", - className: "Key" + className: "KeyValue" } } } @@ -175,26 +117,57 @@ export const KeyListResult: coreHttp.CompositeMapper = { } }; -export const KeyValueListResult: coreHttp.CompositeMapper = { - serializedName: "KeyValueListResult", +export const KeyValue: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "KeyValueListResult", + className: "KeyValue", modelProperties: { - items: { - serializedName: "items", + key: { + serializedName: "key", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyValue" - } - } + name: "String" } }, - nextLink: { - serializedName: "@nextLink", + label: { + serializedName: "label", + type: { + name: "String" + } + }, + contentType: { + serializedName: "content_type", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + lastModified: { + serializedName: "last_modified", + type: { + name: "DateTime" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + locked: { + serializedName: "locked", + type: { + name: "Boolean" + } + }, + etag: { + serializedName: "etag", type: { name: "String" } @@ -204,7 +177,6 @@ export const KeyValueListResult: coreHttp.CompositeMapper = { }; export const LabelListResult: coreHttp.CompositeMapper = { - serializedName: "LabelListResult", type: { name: "Composite", className: "LabelListResult", @@ -231,11 +203,26 @@ export const LabelListResult: coreHttp.CompositeMapper = { } }; -export const GetKeysHeaders: coreHttp.CompositeMapper = { - serializedName: "getkeys-headers", +export const Label: coreHttp.CompositeMapper = { + type: { + name: "Composite", + className: "Label", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationGetKeysHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "GetKeysHeaders", + className: "AppConfigurationGetKeysHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -247,11 +234,10 @@ export const GetKeysHeaders: coreHttp.CompositeMapper = { } }; -export const CheckKeysHeaders: coreHttp.CompositeMapper = { - serializedName: "checkkeys-headers", +export const AppConfigurationCheckKeysHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "CheckKeysHeaders", + className: "AppConfigurationCheckKeysHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -263,11 +249,10 @@ export const CheckKeysHeaders: coreHttp.CompositeMapper = { } }; -export const GetKeyValuesHeaders: coreHttp.CompositeMapper = { - serializedName: "getkeyvalues-headers", +export const AppConfigurationGetKeyValuesHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "GetKeyValuesHeaders", + className: "AppConfigurationGetKeyValuesHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -279,11 +264,10 @@ export const GetKeyValuesHeaders: coreHttp.CompositeMapper = { } }; -export const CheckKeyValuesHeaders: coreHttp.CompositeMapper = { - serializedName: "checkkeyvalues-headers", +export const AppConfigurationCheckKeyValuesHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "CheckKeyValuesHeaders", + className: "AppConfigurationCheckKeyValuesHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -295,11 +279,10 @@ export const CheckKeyValuesHeaders: coreHttp.CompositeMapper = { } }; -export const GetKeyValueHeaders: coreHttp.CompositeMapper = { - serializedName: "getkeyvalue-headers", +export const AppConfigurationGetKeyValueHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "GetKeyValueHeaders", + className: "AppConfigurationGetKeyValueHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -313,7 +296,7 @@ export const GetKeyValueHeaders: coreHttp.CompositeMapper = { name: "String" } }, - lastModifiedHeader: { + lastModified: { serializedName: "last-modified", type: { name: "String" @@ -323,11 +306,10 @@ export const GetKeyValueHeaders: coreHttp.CompositeMapper = { } }; -export const PutKeyValueHeaders: coreHttp.CompositeMapper = { - serializedName: "putkeyvalue-headers", +export const AppConfigurationPutKeyValueHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "PutKeyValueHeaders", + className: "AppConfigurationPutKeyValueHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -345,11 +327,10 @@ export const PutKeyValueHeaders: coreHttp.CompositeMapper = { } }; -export const DeleteKeyValueHeaders: coreHttp.CompositeMapper = { - serializedName: "deletekeyvalue-headers", +export const AppConfigurationDeleteKeyValueHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "DeleteKeyValueHeaders", + className: "AppConfigurationDeleteKeyValueHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -367,11 +348,10 @@ export const DeleteKeyValueHeaders: coreHttp.CompositeMapper = { } }; -export const CheckKeyValueHeaders: coreHttp.CompositeMapper = { - serializedName: "checkkeyvalue-headers", +export const AppConfigurationCheckKeyValueHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "CheckKeyValueHeaders", + className: "AppConfigurationCheckKeyValueHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -395,11 +375,10 @@ export const CheckKeyValueHeaders: coreHttp.CompositeMapper = { } }; -export const GetLabelsHeaders: coreHttp.CompositeMapper = { - serializedName: "getlabels-headers", +export const AppConfigurationGetLabelsHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "GetLabelsHeaders", + className: "AppConfigurationGetLabelsHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -411,11 +390,10 @@ export const GetLabelsHeaders: coreHttp.CompositeMapper = { } }; -export const CheckLabelsHeaders: coreHttp.CompositeMapper = { - serializedName: "checklabels-headers", +export const AppConfigurationCheckLabelsHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "CheckLabelsHeaders", + className: "AppConfigurationCheckLabelsHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -427,11 +405,10 @@ export const CheckLabelsHeaders: coreHttp.CompositeMapper = { } }; -export const PutLockHeaders: coreHttp.CompositeMapper = { - serializedName: "putlock-headers", +export const AppConfigurationPutLockHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "PutLockHeaders", + className: "AppConfigurationPutLockHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -449,11 +426,10 @@ export const PutLockHeaders: coreHttp.CompositeMapper = { } }; -export const DeleteLockHeaders: coreHttp.CompositeMapper = { - serializedName: "deletelock-headers", +export const AppConfigurationDeleteLockHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "DeleteLockHeaders", + className: "AppConfigurationDeleteLockHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -471,11 +447,70 @@ export const DeleteLockHeaders: coreHttp.CompositeMapper = { } }; -export const GetRevisionsHeaders: coreHttp.CompositeMapper = { - serializedName: "getrevisions-headers", +export const AppConfigurationGetRevisionsHeaders: coreHttp.CompositeMapper = { + type: { + name: "Composite", + className: "AppConfigurationGetRevisionsHeaders", + modelProperties: { + syncToken: { + serializedName: "sync-token", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationCheckRevisionsHeaders: coreHttp.CompositeMapper = { + type: { + name: "Composite", + className: "AppConfigurationCheckRevisionsHeaders", + modelProperties: { + syncToken: { + serializedName: "sync-token", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationGetKeysNextHeaders: coreHttp.CompositeMapper = { + type: { + name: "Composite", + className: "AppConfigurationGetKeysNextHeaders", + modelProperties: { + syncToken: { + serializedName: "sync-token", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationGetKeyValuesNextHeaders: coreHttp.CompositeMapper = { + type: { + name: "Composite", + className: "AppConfigurationGetKeyValuesNextHeaders", + modelProperties: { + syncToken: { + serializedName: "sync-token", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationGetLabelsNextHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "GetRevisionsHeaders", + className: "AppConfigurationGetLabelsNextHeaders", modelProperties: { syncToken: { serializedName: "sync-token", @@ -487,11 +522,10 @@ export const GetRevisionsHeaders: coreHttp.CompositeMapper = { } }; -export const CheckRevisionsHeaders: coreHttp.CompositeMapper = { - serializedName: "checkrevisions-headers", +export const AppConfigurationGetRevisionsNextHeaders: coreHttp.CompositeMapper = { type: { name: "Composite", - className: "CheckRevisionsHeaders", + className: "AppConfigurationGetRevisionsNextHeaders", modelProperties: { syncToken: { serializedName: "sync-token", diff --git a/sdk/appconfiguration/app-configuration/src/generated/src/models/parameters.ts b/sdk/appconfiguration/app-configuration/src/generated/src/models/parameters.ts index a75b1fb1adbf..3fe3aa6b1193 100644 --- a/sdk/appconfiguration/app-configuration/src/generated/src/models/parameters.ts +++ b/sdk/appconfiguration/app-configuration/src/generated/src/models/parameters.ts @@ -1,78 +1,110 @@ /* - * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as coreHttp from "@azure/core-http"; +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter, + QueryCollectionFormat +} from "@azure/core-http"; +import { KeyValue as KeyValueMapper } from "../models/mappers"; -export const acceptDatetime: coreHttp.OperationParameter = { - parameterPath: [ - "options", - "acceptDatetime" - ], +export const accept: OperationParameter = { + parameterPath: "accept", mapper: { - serializedName: "Accept-Datetime", + defaultValue: + "application/vnd.microsoft.appconfig.keyset+json, application/json, application/problem+json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; -export const after: coreHttp.OperationQueryParameter = { - parameterPath: [ - "options", - "after" - ], + +export const endpoint: OperationURLParameter = { + parameterPath: "endpoint", mapper: { - serializedName: "After", + serializedName: "endpoint", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const name: OperationQueryParameter = { + parameterPath: ["options", "name"], + mapper: { + serializedName: "name", + type: { + name: "String" + } + } +}; + +export const syncToken: OperationParameter = { + parameterPath: "syncToken", + mapper: { + serializedName: "Sync-Token", type: { name: "String" } } }; -export const apiVersion: coreHttp.OperationQueryParameter = { + +export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - required: true, serializedName: "api-version", + required: true, type: { name: "String" } } }; -export const ifMatch: coreHttp.OperationParameter = { - parameterPath: [ - "options", - "ifMatch" - ], + +export const after: OperationQueryParameter = { + parameterPath: ["options", "after"], mapper: { - serializedName: "If-Match", + serializedName: "After", type: { name: "String" } } }; -export const ifNoneMatch: coreHttp.OperationParameter = { - parameterPath: [ - "options", - "ifNoneMatch" - ], + +export const acceptDatetime: OperationParameter = { + parameterPath: ["options", "acceptDatetime"], mapper: { - serializedName: "If-None-Match", + serializedName: "Accept-Datetime", + type: { + name: "String" + } + } +}; + +export const accept1: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: + "application/vnd.microsoft.appconfig.kvset+json, application/json, application/problem+json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; -export const key0: coreHttp.OperationQueryParameter = { - parameterPath: [ - "options", - "key" - ], + +export const key: OperationQueryParameter = { + parameterPath: ["options", "key"], mapper: { serializedName: "key", type: { @@ -80,45 +112,95 @@ export const key0: coreHttp.OperationQueryParameter = { } } }; -export const key1: coreHttp.OperationURLParameter = { + +export const label: OperationQueryParameter = { + parameterPath: ["options", "label"], + mapper: { + serializedName: "label", + type: { + name: "String" + } + } +}; + +export const select: OperationQueryParameter = { + parameterPath: ["options", "select"], + mapper: { + serializedName: "$Select", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: QueryCollectionFormat.Csv +}; + +export const select1: OperationQueryParameter = { + parameterPath: ["options", "select"], + mapper: { + serializedName: "$Select", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: QueryCollectionFormat.Csv +}; + +export const accept2: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: + "application/vnd.microsoft.appconfig.kv+json, application/json, application/problem+json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const key1: OperationURLParameter = { parameterPath: "key", mapper: { - required: true, serializedName: "key", + required: true, type: { name: "String" } } }; -export const label: coreHttp.OperationQueryParameter = { - parameterPath: [ - "options", - "label" - ], + +export const ifMatch: OperationParameter = { + parameterPath: ["options", "ifMatch"], mapper: { - serializedName: "label", + serializedName: "If-Match", type: { name: "String" } } }; -export const name: coreHttp.OperationQueryParameter = { - parameterPath: [ - "options", - "name" - ], + +export const ifNoneMatch: OperationParameter = { + parameterPath: ["options", "ifNoneMatch"], mapper: { - serializedName: "name", + serializedName: "If-None-Match", type: { name: "String" } } }; -export const select: coreHttp.OperationQueryParameter = { - parameterPath: [ - "options", - "select" - ], + +export const select2: OperationQueryParameter = { + parameterPath: ["options", "select"], mapper: { serializedName: "$Select", type: { @@ -130,14 +212,113 @@ export const select: coreHttp.OperationQueryParameter = { } } }, - collectionFormat: coreHttp.QueryCollectionFormat.Csv + collectionFormat: QueryCollectionFormat.Csv }; -export const syncToken: coreHttp.OperationParameter = { - parameterPath: "syncToken", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - serializedName: "Sync-Token", + defaultValue: "application/vnd.microsoft.appconfig.kv+json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const entity: OperationParameter = { + parameterPath: ["options", "entity"], + mapper: KeyValueMapper +}; + +export const select3: OperationQueryParameter = { + parameterPath: ["options", "select"], + mapper: { + serializedName: "$Select", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: QueryCollectionFormat.Csv +}; + +export const accept3: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: + "application/vnd.microsoft.appconfig.labelset+json, application/json, application/problem+json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; + +export const select4: OperationQueryParameter = { + parameterPath: ["options", "select"], + mapper: { + serializedName: "$Select", + type: { + name: "Sequence", + element: { + defaultValue: "name", + isConstant: true, + type: { + name: "String" + } + } + } + }, + collectionFormat: QueryCollectionFormat.Csv +}; + +export const select5: OperationQueryParameter = { + parameterPath: ["options", "select"], + mapper: { + serializedName: "$Select", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: QueryCollectionFormat.Csv +}; + +export const select6: OperationQueryParameter = { + parameterPath: ["options", "select"], + mapper: { + serializedName: "$Select", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + collectionFormat: QueryCollectionFormat.Csv +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; diff --git a/sdk/appconfiguration/app-configuration/swagger/swagger.md b/sdk/appconfiguration/app-configuration/swagger/swagger.md index e72064232619..9bc26279112a 100644 --- a/sdk/appconfiguration/app-configuration/swagger/swagger.md +++ b/sdk/appconfiguration/app-configuration/swagger/swagger.md @@ -11,13 +11,16 @@ add-credentials: true generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated -# pull down the swagger file for the AppConfiguration API -input-file: ./appconfiguration.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/appconfiguration.json model-date-time-as-string: false optional-response-headers: true sample-generation: false -# need this or a later version so we generate code using @azure/core-http -use: '@microsoft.azure/autorest.typescript@5.0.0' +use-extension: + "@autorest/typescript": "6.0.0-dev.20210111.1" +disable-async-iterators: true +api-version-parameter: choice +v3: true +hide-clients: true ``` ### Patch endpoints for exception handling @@ -45,4 +48,50 @@ directive: transform: > $.required = $.required || []; $.required.push('key'); -``` \ No newline at end of file +``` + +### Add 304 response to GetKeyValueOperation +``` yaml +directive: +- from: swagger-document + where: $["paths"]["/kv/{key}"]["get"]["responses"] + transform: > + $["304"] = {}; + $["304"]["description"] = "Response code 304"; + $["304"]["headers"] = {} + + $["304"]["headers"]["Sync-Token"] = {}; + $["304"]["headers"]["Sync-Token"]["description"] = "Enables real-time consistency between requests by providing the returned value in the next request made to the server."; + $["304"]["headers"]["Sync-Token"]["type"] = "string"; + + $["304"]["headers"]["ETag"] = {}; + $["304"]["headers"]["ETag"]["description"] = "An identifier representing the returned state of the resource."; + $["304"]["headers"]["ETag"]["type"] = "string"; + + $["304"]["headers"]["Last-Modified"] = {}; + $["304"]["headers"]["Last-Modified"]["description"] = "A UTC datetime that specifies the last time the resource was modified."; + $["304"]["headers"]["Last-Modified"]["type"] = "string"; +``` + +### Add 304 response to CheckKeyValueOperation +``` yaml +directive: +- from: swagger-document + where: $["paths"]["/kv/{key}"]["head"]["responses"] + transform: > + $["304"] = {}; + $["304"]["description"] = "Response code 304"; + $["304"]["headers"] = {} + + $["304"]["headers"]["Sync-Token"] = {}; + $["304"]["headers"]["Sync-Token"]["description"] = "Enables real-time consistency between requests by providing the returned value in the next request made to the server."; + $["304"]["headers"]["Sync-Token"]["type"] = "string"; + + $["304"]["headers"]["ETag"] = {}; + $["304"]["headers"]["ETag"]["description"] = "An identifier representing the returned state of the resource."; + $["304"]["headers"]["ETag"]["type"] = "string"; + + $["304"]["headers"]["Last-Modified"] = {}; + $["304"]["headers"]["Last-Modified"]["description"] = "A UTC datetime that specifies the last time the resource was modified."; + $["304"]["headers"]["Last-Modified"]["type"] = "string"; +```