diff --git a/sdk/search/arm-search/LICENSE.txt b/sdk/search/arm-search/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/search/arm-search/LICENSE.txt +++ b/sdk/search/arm-search/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/search/arm-search/README.md b/sdk/search/arm-search/README.md index 8a1589580eac..d61fc34427cc 100644 --- a/sdk/search/arm-search/README.md +++ b/sdk/search/arm-search/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for SearchManagementClient. ### How to Install -``` +```bash npm install @azure/arm-search ``` @@ -19,13 +19,14 @@ npm install @azure/arm-search ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -47,7 +48,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -95,5 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fsearch%2Farm-search%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/search/arm-search/README.png) diff --git a/sdk/search/arm-search/package.json b/sdk/search/arm-search/package.json index ebdb47b0abe1..e31f54362800 100644 --- a/sdk/search/arm-search/package.json +++ b/sdk/search/arm-search/package.json @@ -4,9 +4,9 @@ "description": "SearchManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/searchManagementClient.js", "types": "./esm/searchManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/search/arm-search", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/search/arm-search", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/search/arm-search/rollup.config.js b/sdk/search/arm-search/rollup.config.js index ac4322411e02..742effe13771 100644 --- a/sdk/search/arm-search/rollup.config.js +++ b/sdk/search/arm-search/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/searchManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/searchManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-search.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/search/arm-search/src/models/adminKeysMappers.ts b/sdk/search/arm-search/src/models/adminKeysMappers.ts index 85061c002478..b0a932b36ae8 100644 --- a/sdk/search/arm-search/src/models/adminKeysMappers.ts +++ b/sdk/search/arm-search/src/models/adminKeysMappers.ts @@ -1,15 +1,12 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { AdminKeyResult, CloudError } from "../models/mappers"; - diff --git a/sdk/search/arm-search/src/models/index.ts b/sdk/search/arm-search/src/models/index.ts index 1c719747720d..bc6c85292d30 100644 --- a/sdk/search/arm-search/src/models/index.ts +++ b/sdk/search/arm-search/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,562 +11,419 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing CheckNameAvailabilityInput. * Input of check name availability API. - * */ export interface CheckNameAvailabilityInput { /** - * @member {string} name The Search service name to validate. Search service - * names must only contain lowercase letters, digits or dashes, cannot use - * dash as the first two or last one characters, cannot contain consecutive - * dashes, and must be between 2 and 60 characters in length. + * The Search service name to validate. Search service names must only contain lowercase letters, + * digits or dashes, cannot use dash as the first two or last one characters, cannot contain + * consecutive dashes, and must be between 2 and 60 characters in length. */ name: string; } /** - * @interface - * An interface representing CheckNameAvailabilityOutput. * Output of check name availability API. - * */ export interface CheckNameAvailabilityOutput { /** - * @member {boolean} [isNameAvailable] A value indicating whether the name is - * available. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A value indicating whether the name is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isNameAvailable?: boolean; /** - * @member {UnavailableNameReason} [reason] The reason why the name is not - * available. 'Invalid' indicates the name provided does not match the naming - * requirements (incorrect length, unsupported characters, etc.). - * 'AlreadyExists' indicates that the name is already in use and is therefore - * unavailable. Possible values include: 'Invalid', 'AlreadyExists' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reason why the name is not available. 'Invalid' indicates the name provided does not match + * the naming requirements (incorrect length, unsupported characters, etc.). 'AlreadyExists' + * indicates that the name is already in use and is therefore unavailable. Possible values + * include: 'Invalid', 'AlreadyExists' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reason?: UnavailableNameReason; /** - * @member {string} [message] A message that explains why the name is invalid - * and provides resource naming requirements. Available only if 'Invalid' is - * returned in the 'reason' property. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * A message that explains why the name is invalid and provides resource naming requirements. + * Available only if 'Invalid' is returned in the 'reason' property. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface - * An interface representing AdminKeyResult. - * Response containing the primary and secondary admin API keys for a given - * Azure Search service. - * + * Response containing the primary and secondary admin API keys for a given Azure Search service. */ export interface AdminKeyResult { /** - * @member {string} [primaryKey] The primary admin API key of the Search - * service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The primary admin API key of the Search service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly primaryKey?: string; /** - * @member {string} [secondaryKey] The secondary admin API key of the Search - * service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The secondary admin API key of the Search service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly secondaryKey?: string; } /** - * @interface - * An interface representing QueryKey. - * Describes an API key for a given Azure Search service that has permissions - * for query operations only. - * + * Describes an API key for a given Azure Search service that has permissions for query operations + * only. */ export interface QueryKey { /** - * @member {string} [name] The name of the query API key; may be empty. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the query API key; may be empty. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [key] The value of the query API key. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The value of the query API key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly key?: string; } /** - * @interface - * An interface representing Sku. - * Defines the SKU of an Azure Search Service, which determines price tier and - * capacity limits. - * + * Defines the SKU of an Azure Search Service, which determines price tier and capacity limits. */ export interface Sku { /** - * @member {SkuName} [name] The SKU of the Search service. Valid values - * include: 'free': Shared service. 'basic': Dedicated service with up to 3 - * replicas. 'standard': Dedicated service with up to 12 partitions and 12 - * replicas. 'standard2': Similar to standard, but with more capacity per - * search unit. 'standard3': Offers maximum capacity per search unit with up - * to 12 partitions and 12 replicas (or up to 3 partitions with more indexes - * if you also set the hostingMode property to 'highDensity'). Possible - * values include: 'free', 'basic', 'standard', 'standard2', 'standard3' + * The SKU of the Search service. Valid values include: 'free': Shared service. 'basic': + * Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 + * partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per + * search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 + * replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to + * 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. + * 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. Possible values + * include: 'free', 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', + * 'storage_optimized_l2' */ name?: SkuName; } /** - * @interface - * An interface representing Resource. * Base type for all Azure resources. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] The ID of the resource. This can be used with the - * Azure Resource Manager to link resources together. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ID of the resource. This can be used with the Azure Resource Manager to link resources + * together. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [location] The geographic location of the resource. This - * must be one of the supported and registered Azure Geo Regions (for - * example, West US, East US, Southeast Asia, and so forth). This property is - * required when creating a new resource. + * The geographic location of the resource. This must be one of the supported and registered + * Azure Geo Regions (for example, West US, East US, Southeast Asia, and so forth). This property + * is required when creating a new resource. */ location?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Tags to help - * categorize the resource in the Azure portal. + * Tags to help categorize the resource in the Azure portal. */ tags?: { [propertyName: string]: string }; /** - * @member {Identity} [identity] The identity of the resource. + * The identity of the resource. */ identity?: Identity; } /** - * @interface - * An interface representing SearchService. * Describes an Azure Search service and its current state. - * - * @extends Resource */ export interface SearchService extends Resource { /** - * @member {number} [replicaCount] The number of replicas in the Search - * service. If specified, it must be a value between 1 and 12 inclusive for - * standard SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1 - * . + * The number of replicas in the Search service. If specified, it must be a value between 1 and + * 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1. */ replicaCount?: number; /** - * @member {number} [partitionCount] The number of partitions in the Search - * service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than - * 1 are only valid for standard SKUs. For 'standard3' services with - * hostingMode set to 'highDensity', the allowed values are between 1 and 3. - * Default value: 1 . + * The number of partitions in the Search service; if specified, it can be 1, 2, 3, 4, 6, or 12. + * Values greater than 1 are only valid for standard SKUs. For 'standard3' services with + * hostingMode set to 'highDensity', the allowed values are between 1 and 3. Default value: 1. */ partitionCount?: number; /** - * @member {HostingMode} [hostingMode] Applicable only for the standard3 SKU. - * You can set this property to enable up to 3 high density partitions that - * allow up to 1000 indexes, which is much higher than the maximum indexes - * allowed for any other SKU. For the standard3 SKU, the value is either - * 'default' or 'highDensity'. For all other SKUs, this value must be - * 'default'. Possible values include: 'default', 'highDensity'. Default - * value: 'default' . + * Applicable only for the standard3 SKU. You can set this property to enable up to 3 high + * density partitions that allow up to 1000 indexes, which is much higher than the maximum + * indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or + * 'highDensity'. For all other SKUs, this value must be 'default'. Possible values include: + * 'default', 'highDensity'. Default value: 'default'. */ hostingMode?: HostingMode; /** - * @member {SearchServiceStatus} [status] The status of the Search service. - * Possible values include: 'running': The Search service is running and no - * provisioning operations are underway. 'provisioning': The Search service - * is being provisioned or scaled up or down. 'deleting': The Search service - * is being deleted. 'degraded': The Search service is degraded. This can - * occur when the underlying search units are not healthy. The Search service - * is most likely operational, but performance might be slow and some - * requests might be dropped. 'disabled': The Search service is disabled. In - * this state, the service will reject all API requests. 'error': The Search - * service is in an error state. If your service is in the degraded, - * disabled, or error states, it means the Azure Search team is actively - * investigating the underlying issue. Dedicated services in these states are - * still chargeable based on the number of search units provisioned. Possible - * values include: 'running', 'provisioning', 'deleting', 'degraded', - * 'disabled', 'error' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The status of the Search service. Possible values include: 'running': The Search service is + * running and no provisioning operations are underway. 'provisioning': The Search service is + * being provisioned or scaled up or down. 'deleting': The Search service is being deleted. + * 'degraded': The Search service is degraded. This can occur when the underlying search units + * are not healthy. The Search service is most likely operational, but performance might be slow + * and some requests might be dropped. 'disabled': The Search service is disabled. In this state, + * the service will reject all API requests. 'error': The Search service is in an error state. If + * your service is in the degraded, disabled, or error states, it means the Azure Search team is + * actively investigating the underlying issue. Dedicated services in these states are still + * chargeable based on the number of search units provisioned. Possible values include: + * 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: SearchServiceStatus; /** - * @member {string} [statusDetails] The details of the Search service status. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The details of the Search service status. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly statusDetails?: string; /** - * @member {ProvisioningState} [provisioningState] The state of the last - * provisioning operation performed on the Search service. Provisioning is an - * intermediate state that occurs while service capacity is being - * established. After capacity is set up, provisioningState changes to either - * 'succeeded' or 'failed'. Client applications can poll provisioning status - * (the recommended polling interval is from 30 seconds to one minute) by - * using the Get Search Service operation to see when an operation is - * completed. If you are using the free service, this value tends to come - * back as 'succeeded' directly in the call to Create Search service. This is - * because the free service uses capacity that is already set up. Possible - * values include: 'succeeded', 'provisioning', 'failed' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The state of the last provisioning operation performed on the Search service. Provisioning is + * an intermediate state that occurs while service capacity is being established. After capacity + * is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications + * can poll provisioning status (the recommended polling interval is from 30 seconds to one + * minute) by using the Get Search Service operation to see when an operation is completed. If + * you are using the free service, this value tends to come back as 'succeeded' directly in the + * call to Create Search service. This is because the free service uses capacity that is already + * set up. Possible values include: 'succeeded', 'provisioning', 'failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; /** - * @member {Sku} [sku] The SKU of the Search Service, which determines price - * tier and capacity limits. This property is required when creating a new - * Search Service. + * The SKU of the Search Service, which determines price tier and capacity limits. This property + * is required when creating a new Search Service. */ sku?: Sku; } /** - * @interface - * An interface representing Identity. * Identity for the resource. - * */ export interface Identity { /** - * @member {string} [principalId] The principal ID of resource identity. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly principalId?: string; /** - * @member {string} [tenantId] The tenant ID of resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tenantId?: string; + /** + * The identity type. Possible values include: 'None', 'SystemAssigned' + */ + type: IdentityType; } /** - * @interface - * An interface representing OperationDisplay. * The object that describes the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] The friendly name of the resource provider. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The friendly name of the resource provider. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provider?: string; /** - * @member {string} [operation] The operation type: read, write, delete, - * listKeys/action, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The operation type: read, write, delete, listKeys/action, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly operation?: string; /** - * @member {string} [resource] The resource type on which the operation is - * performed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type on which the operation is performed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resource?: string; /** - * @member {string} [description] The friendly name of the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The friendly name of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly description?: string; } /** - * @interface - * An interface representing Operation. * Describes a REST API operation. - * */ export interface Operation { /** - * @member {string} [name] The name of the operation. This name is of the - * form {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the operation. This name is of the form {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {OperationDisplay} [display] The object that describes the - * operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The object that describes the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly display?: OperationDisplay; } /** - * @interface - * An interface representing SearchManagementRequestOptions. * Additional parameters for a set of operations. - * */ export interface SearchManagementRequestOptions { /** - * @member {string} [clientRequestId] A client-generated GUID value that - * identifies this request. If specified, this will be included in response - * information as a way to track the request. + * A client-generated GUID value that identifies this request. If specified, this will be + * included in response information as a way to track the request. */ clientRequestId?: string; } /** - * @interface - * An interface representing AdminKeysGetOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface AdminKeysGetOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing AdminKeysRegenerateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface AdminKeysRegenerateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing QueryKeysCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface QueryKeysCreateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing QueryKeysListBySearchServiceOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface QueryKeysListBySearchServiceOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing QueryKeysDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface QueryKeysDeleteMethodOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing ServicesCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ServicesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing ServicesUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ServicesUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing ServicesGetOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ServicesGetOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing ServicesDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ServicesDeleteMethodOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing ServicesListByResourceGroupOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ServicesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing ServicesCheckNameAvailabilityOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase + */ +export interface ServicesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. */ export interface ServicesCheckNameAvailabilityOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing ServicesBeginCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ServicesBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface * An interface representing SearchManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface SearchManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the OperationListResult. - * The result of the request to list REST API operations. It contains a list of - * operations and a URL to get the next set of results. - * + * The result of the request to list REST API operations. It contains a list of operations and a + * URL to get the next set of results. * @extends Array */ export interface OperationListResult extends Array { /** - * @member {string} [nextLink] The URL to get the next set of operation list - * results, if any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The URL to get the next set of operation list results, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the ListQueryKeysResult. * Response containing the query API keys for a given Azure Search service. - * * @extends Array */ export interface ListQueryKeysResult extends Array { @@ -576,9 +431,7 @@ export interface ListQueryKeysResult extends Array { /** * @interface - * An interface representing the SearchServiceListResult. * Response containing a list of Azure Search services. - * * @extends Array */ export interface SearchServiceListResult extends Array { @@ -594,11 +447,12 @@ export type UnavailableNameReason = 'Invalid' | 'AlreadyExists'; /** * Defines values for SkuName. - * Possible values include: 'free', 'basic', 'standard', 'standard2', 'standard3' + * Possible values include: 'free', 'basic', 'standard', 'standard2', 'standard3', + * 'storage_optimized_l1', 'storage_optimized_l2' * @readonly * @enum {string} */ -export type SkuName = 'free' | 'basic' | 'standard' | 'standard2' | 'standard3'; +export type SkuName = 'free' | 'basic' | 'standard' | 'standard2' | 'standard3' | 'storage_optimized_l1' | 'storage_optimized_l2'; /** * Defines values for HostingMode. @@ -624,6 +478,14 @@ export type SearchServiceStatus = 'running' | 'provisioning' | 'deleting' | 'deg */ export type ProvisioningState = 'succeeded' | 'provisioning' | 'failed'; +/** + * Defines values for IdentityType. + * Possible values include: 'None', 'SystemAssigned' + * @readonly + * @enum {string} + */ +export type IdentityType = 'None' | 'SystemAssigned'; + /** * Defines values for AdminKeyKind. * Possible values include: 'primary', 'secondary' @@ -644,6 +506,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -663,6 +526,7 @@ export type AdminKeysGetResponse = AdminKeyResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -682,6 +546,7 @@ export type AdminKeysRegenerateResponse = AdminKeyResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -701,6 +566,7 @@ export type QueryKeysCreateResponse = QueryKey & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -720,6 +586,7 @@ export type QueryKeysListBySearchServiceResponse = ListQueryKeysResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -739,6 +606,7 @@ export type ServicesCreateOrUpdateResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -758,6 +626,7 @@ export type ServicesUpdateResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -777,6 +646,7 @@ export type ServicesGetResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -796,6 +666,27 @@ export type ServicesListByResourceGroupResponse = SearchServiceListResult & { * The response body as text (string format) */ bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SearchServiceListResult; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type ServicesListBySubscriptionResponse = SearchServiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -815,6 +706,7 @@ export type ServicesCheckNameAvailabilityResponse = CheckNameAvailabilityOutput * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -834,6 +726,7 @@ export type ServicesBeginCreateOrUpdateResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/search/arm-search/src/models/mappers.ts b/sdk/search/arm-search/src/models/mappers.ts index aa0475f04b92..a29cfb9f066d 100644 --- a/sdk/search/arm-search/src/models/mappers.ts +++ b/sdk/search/arm-search/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -134,7 +132,9 @@ export const Sku: msRest.CompositeMapper = { "basic", "standard", "standard2", - "standard3" + "standard3", + "storage_optimized_l1", + "storage_optimized_l2" ] } } @@ -304,11 +304,13 @@ export const Identity: msRest.CompositeMapper = { }, type: { required: true, - isConstant: true, serializedName: "type", - defaultValue: 'SystemAssigned', type: { - name: "String" + name: "Enum", + allowedValues: [ + "None", + "SystemAssigned" + ] } } } diff --git a/sdk/search/arm-search/src/models/operationsMappers.ts b/sdk/search/arm-search/src/models/operationsMappers.ts index 2edcc577920e..689688180be7 100644 --- a/sdk/search/arm-search/src/models/operationsMappers.ts +++ b/sdk/search/arm-search/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + CloudError, Operation, OperationDisplay, - CloudError + OperationListResult } from "../models/mappers"; - diff --git a/sdk/search/arm-search/src/models/queryKeysMappers.ts b/sdk/search/arm-search/src/models/queryKeysMappers.ts index a6a9332bfb8e..1e21032617c2 100644 --- a/sdk/search/arm-search/src/models/queryKeysMappers.ts +++ b/sdk/search/arm-search/src/models/queryKeysMappers.ts @@ -1,16 +1,13 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - QueryKey, CloudError, - ListQueryKeysResult + ListQueryKeysResult, + QueryKey } from "../models/mappers"; - diff --git a/sdk/search/arm-search/src/models/servicesMappers.ts b/sdk/search/arm-search/src/models/servicesMappers.ts index 5e7fcfcfc601..3574cf94db12 100644 --- a/sdk/search/arm-search/src/models/servicesMappers.ts +++ b/sdk/search/arm-search/src/models/servicesMappers.ts @@ -1,22 +1,19 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - SearchService, - Resource, BaseResource, - Identity, - Sku, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, CloudError, + Identity, + Resource, + SearchService, SearchServiceListResult, - CheckNameAvailabilityInput, - CheckNameAvailabilityOutput + Sku } from "../models/mappers"; - diff --git a/sdk/search/arm-search/src/operations/services.ts b/sdk/search/arm-search/src/operations/services.ts index a1c86103d7f8..1de1adb5179a 100644 --- a/sdk/search/arm-search/src/operations/services.ts +++ b/sdk/search/arm-search/src/operations/services.ts @@ -193,6 +193,30 @@ export class Services { callback) as Promise; } + /** + * Gets a list of all Search services in the given subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.ServicesListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.ServicesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.ServicesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + /** * Checks whether or not the given Search service name is available for use. Search service names * must be globally unique since they are part of the service URI @@ -369,6 +393,30 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Search/searchServices", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.SearchServiceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/providers/Microsoft.Search/checkNameAvailability", diff --git a/sdk/search/arm-search/src/searchManagementClientContext.ts b/sdk/search/arm-search/src/searchManagementClientContext.ts index ab46edfae202..1bc6d926c841 100644 --- a/sdk/search/arm-search/src/searchManagementClientContext.ts +++ b/sdk/search/arm-search/src/searchManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-search"; -const packageVersion = "0.1.0"; +const packageVersion = "1.3.0"; export class SearchManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/search/arm-search/tsconfig.json b/sdk/search/arm-search/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/search/arm-search/tsconfig.json +++ b/sdk/search/arm-search/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true