diff --git a/sdk/search/arm-search/LICENSE.txt b/sdk/search/arm-search/LICENSE.txt index a70e8cf66038..2d3163745319 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) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/search/arm-search/README.md b/sdk/search/arm-search/README.md index 159fd0119ef9..e6cc2a6274d5 100644 --- a/sdk/search/arm-search/README.md +++ b/sdk/search/arm-search/README.md @@ -1,11 +1,11 @@ ## Azure SearchManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SearchManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for SearchManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-search @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new SearchManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { console.log("The result is:"); console.log(result); @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmSearch.SearchManagementClient(creds, subscriptionId); client.operations.list().then((result) => { diff --git a/sdk/search/arm-search/package.json b/sdk/search/arm-search/package.json index fb90a3506f66..0166196a56c6 100644 --- a/sdk/search/arm-search/package.json +++ b/sdk/search/arm-search/package.json @@ -4,10 +4,10 @@ "description": "SearchManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.4.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -22,17 +22,18 @@ "types": "./esm/searchManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "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/main/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", @@ -44,6 +45,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/search/arm-search/rollup.config.js b/sdk/search/arm-search/rollup.config.js index ac4322411e02..10646c6135f1 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", @@ -15,17 +21,17 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * 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..a21492beb900 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. + * 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. */ 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..f099311cebb0 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. + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,575 +11,1006 @@ 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 Cognitive 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 Cognitive 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 Cognitive 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 + * The private endpoint resource from Microsoft.Network provider. + */ +export interface PrivateEndpointConnectionPropertiesPrivateEndpoint { + /** + * The resource id of the private endpoint resource from Microsoft.Network provider. + */ + id?: string; +} + +/** + * Describes the current state of an existing Private Link Service connection to the Azure Private + * Endpoint. + */ +export interface PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState { + /** + * Status of the the private link service connection. Can be Pending, Approved, Rejected, or + * Disconnected. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + */ + status?: PrivateLinkServiceConnectionStatus; + /** + * The description for the private link service connection state. + */ + description?: string; + /** + * A description of any extra actions that may be required. Default value: 'None'. + */ + actionsRequired?: string; +} + +/** + * Describes the properties of an existing Private Endpoint connection to the Azure Cognitive + * Search service. + */ +export interface PrivateEndpointConnectionProperties { + /** + * The private endpoint resource from Microsoft.Network provider. + */ + privateEndpoint?: PrivateEndpointConnectionPropertiesPrivateEndpoint; + /** + * Describes the current state of an existing Private Link Service connection to the Azure + * Private Endpoint. + */ + privateLinkServiceConnectionState?: PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState; +} + +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ 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.** + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ 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 type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; +} + +/** + * Describes an existing Private Endpoint connection to the Azure Cognitive Search service. + */ +export interface PrivateEndpointConnection extends Resource { /** - * @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. + * Describes the properties of an existing Private Endpoint connection to the Azure Cognitive + * Search service. */ - location?: string; + properties?: PrivateEndpointConnectionProperties; +} + +/** + * The IP restriction rule of the Azure Cognitive Search service. + */ +export interface IpRule { + /** + * Value corresponding to a single IPv4 address (eg., 123.1.2.3) or an IP range in CIDR format + * (eg., 123.1.2.3/24) to be allowed. + */ + value?: string; +} + +/** + * Network specific rules that determine how the Azure Cognitive Search service may be reached. + */ +export interface NetworkRuleSet { + /** + * A list of IP restriction rules that defines the inbound network(s) with allowing access to the + * search service endpoint. At the meantime, all other public IP networks are blocked by the + * firewall. These restriction rules are applied only when the 'publicNetworkAccess' of the + * search service is 'enabled'; otherwise, traffic over public interface is not allowed even with + * any public IP rules, and private endpoint connections would be the exclusive access method. + */ + ipRules?: IpRule[]; +} + +/** + * Describes the properties of an existing Shared Private Link Resource managed by the Azure + * Cognitive Search service. + */ +export interface SharedPrivateLinkResourceProperties { + /** + * The resource id of the resource the shared private link resource is for. + */ + privateLinkResourceId?: string; + /** + * The group id from the provider of resource the shared private link resource is for. + */ + groupId?: string; + /** + * The request message for requesting approval of the shared private link resource. + */ + requestMessage?: string; + /** + * Optional. Can be used to specify the Azure Resource Manager location of the resource to which + * a shared private link is to be created. This is only required for those resources whose DNS + * configuration are regional (such as Azure Kubernetes Service). + */ + resourceRegion?: string; + /** + * Status of the shared private link resource. Can be Pending, Approved, Rejected or + * Disconnected. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + */ + status?: SharedPrivateLinkResourceStatus; + /** + * The provisioning state of the shared private link resource. Can be Updating, Deleting, Failed, + * Succeeded or Incomplete. Possible values include: 'Updating', 'Deleting', 'Failed', + * 'Succeeded', 'Incomplete' + */ + provisioningState?: SharedPrivateLinkResourceProvisioningState; +} + +/** + * Describes a Shared Private Link Resource managed by the Azure Cognitive Search service. + */ +export interface SharedPrivateLinkResource extends Resource { + /** + * Describes the properties of a Shared Private Link Resource managed by the Azure Cognitive + * Search service. + */ + properties?: SharedPrivateLinkResourceProperties; +} + +/** + * Describes the properties of a resource type that has been onboarded to private link service, + * supported by Azure Cognitive Search. + */ +export interface ShareablePrivateLinkResourceProperties { + /** + * The resource provider type for the resource that has been onboarded to private link service, + * supported by Azure Cognitive Search. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The resource provider group id for the resource that has been onboarded to private link + * service, supported by Azure Cognitive Search. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The description of the resource type that has been onboarded to private link service, + * supported by Azure Cognitive Search. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} + +/** + * Describes an resource type that has been onboarded to private link service, supported by Azure + * Cognitive Search. + */ +export interface ShareablePrivateLinkResourceType { + /** + * The name of the resource type that has been onboarded to private link service, supported by + * Azure Cognitive Search. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Describes the properties of a resource type that has been onboarded to private link service, + * supported by Azure Cognitive Search. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: ShareablePrivateLinkResourceProperties; +} + +/** + * Describes the properties of a supported private link resource for the Azure Cognitive Search + * service. For a given API version, this represents the 'supported' groupIds when creating a + * shared private link resource. + */ +export interface PrivateLinkResourceProperties { + /** + * The group ID of the private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The list of required members of the private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The list of required DNS zone names of the private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredZoneNames?: string[]; + /** + * The list of resources that are onboarded to private link service, that are supported by Azure + * Cognitive Search. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly shareablePrivateLinkResourceTypes?: ShareablePrivateLinkResourceType[]; +} + +/** + * Describes a supported private link resource for the Azure Cognitive Search service. + */ +export interface PrivateLinkResource extends Resource { + /** + * Describes the properties of a supported private link resource for the Azure Cognitive Search + * service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly properties?: PrivateLinkResourceProperties; +} + +/** + * Identity for the resource. + */ +export interface Identity { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * 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; +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { /** - * @member {{ [propertyName: string]: string }} [tags] Tags to help - * categorize the resource in the Azure portal. + * Resource tags. */ tags?: { [propertyName: string]: string }; /** - * @member {Identity} [identity] The identity of the resource. + * The geo-location where the resource lives */ - identity?: Identity; + location: string; } /** - * @interface - * An interface representing SearchService. - * Describes an Azure Search service and its current state. - * - * @extends Resource + * Describes an Azure Cognitive Search service and its current state. */ -export interface SearchService extends Resource { +export interface SearchService extends TrackedResource { /** - * @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.** + * This value can be set to 'enabled' to avoid breaking changes on existing customer resources + * and templates. If set to 'disabled', traffic over public interface is not allowed, and private + * endpoint connections would be the exclusive access method. Possible values include: 'enabled', + * 'disabled'. Default value: 'enabled'. + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * 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 Cognitive + * 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. + * Network specific rules that determine how the Azure Cognitive Search service may be reached. + */ + networkRuleSet?: NetworkRuleSet; + /** + * The list of private endpoint connections to the Azure Cognitive Search service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The list of shared private link resources managed by the Azure Cognitive Search service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + /** + * 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; + /** + * The identity of the resource. + */ + identity?: Identity; } /** - * @interface - * An interface representing Identity. - * Identity for the resource. - * + * The parameters used to update an Azure Cognitive Search service. */ -export interface Identity { +export interface SearchServiceUpdate extends Resource { /** - * @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 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. */ - readonly principalId?: string; + replicaCount?: number; /** - * @member {string} [tenantId] The tenant ID of resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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. */ - readonly tenantId?: string; + partitionCount?: number; + /** + * 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; + /** + * This value can be set to 'enabled' to avoid breaking changes on existing customer resources + * and templates. If set to 'disabled', traffic over public interface is not allowed, and private + * endpoint connections would be the exclusive access method. Possible values include: 'enabled', + * 'disabled'. Default value: 'enabled'. + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * 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 Cognitive + * 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; + /** + * 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; + /** + * 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; + /** + * Network specific rules that determine how the Azure Cognitive Search service may be reached. + */ + networkRuleSet?: NetworkRuleSet; + /** + * The list of private endpoint connections to the Azure Cognitive Search service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The list of shared private link resources managed by the Azure Cognitive Search service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + /** + * 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; + /** + * 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; + /** + * Tags to help categorize the resource in the Azure portal. + */ + tags?: { [propertyName: string]: string }; + /** + * The identity of the resource. + */ + identity?: Identity; +} + +/** + * The details of a long running asynchronous shared private link resource operation + */ +export interface AsyncOperationResult { + /** + * The current status of the long running asynchronous shared private link resource operation. + * Possible values include: 'Running', 'Succeeded', 'Failed' + */ + status?: SharedPrivateLinkResourceAsyncOperationResult; } /** - * @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. + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** * 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 QueryKeysListBySearchServiceNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. */ 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 ServicesCheckNameAvailabilityOptionalParams extends msRest.RequestOptionsBase { +export interface ServicesListBySubscriptionOptionalParams 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 { +export interface ServicesCheckNameAvailabilityOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SearchManagementRequestOptions} [searchManagementRequestOptions] * Additional parameters for the operation */ searchManagementRequestOptions?: SearchManagementRequestOptions; } /** - * @interface - * An interface representing SearchManagementClientOptions. - * @extends AzureServiceClientOptions + * Optional Parameters. */ -export interface SearchManagementClientOptions extends AzureServiceClientOptions { +export interface ServicesBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [baseUri] + * Additional parameters for the operation */ - baseUri?: string; + searchManagementRequestOptions?: SearchManagementRequestOptions; } +/** + * Optional Parameters. + */ +export interface ServicesListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface ServicesListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface PrivateLinkResourcesListSupportedOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionsUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionsGetOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionsListByServiceOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface PrivateEndpointConnectionsListByServiceNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface SharedPrivateLinkResourcesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface SharedPrivateLinkResourcesGetOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface SharedPrivateLinkResourcesDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface SharedPrivateLinkResourcesListByServiceOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface SharedPrivateLinkResourcesBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface SharedPrivateLinkResourcesBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * Optional Parameters. + */ +export interface SharedPrivateLinkResourcesListByServiceNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Additional parameters for the operation + */ + searchManagementRequestOptions?: SearchManagementRequestOptions; +} + +/** + * An interface representing SearchManagementClientOptions. + */ +export interface SearchManagementClientOptions extends AzureServiceClientOptions { + 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. - * + * Response containing the query API keys for a given Azure Cognitive Search service. * @extends Array */ export interface ListQueryKeysResult extends Array { + /** + * Request URL that can be used to query next page of query keys. Returned when the total number + * of requested query keys exceed maximum page size. + */ + readonly nextLink?: string; } /** * @interface - * An interface representing the SearchServiceListResult. - * Response containing a list of Azure Search services. - * + * Response containing a list of Azure Cognitive Search services. * @extends Array */ export interface SearchServiceListResult extends Array { + /** + * Request URL that can be used to query next page of search services. Returned when the total + * number of requested search services exceed maximum page size. + */ + readonly nextLink?: string; +} + +/** + * @interface + * Response containing a list of supported Private Link Resources. + * @extends Array + */ +export interface PrivateLinkResourcesResult extends Array { +} + +/** + * @interface + * Response containing a list of Private Endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * Request URL that can be used to query next page of private endpoint connections. Returned when + * the total number of requested private endpoint connections exceed maximum page size. + */ + readonly nextLink?: string; +} + +/** + * @interface + * Response containing a list of Shared Private Link Resources. + * @extends Array + */ +export interface SharedPrivateLinkResourceListResult extends Array { + /** + * The URL to get the next set of shared private link resources, if there are any. + */ + nextLink?: string; } /** @@ -594,11 +1023,36 @@ 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 PrivateLinkServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for SharedPrivateLinkResourceStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type SharedPrivateLinkResourceStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for SharedPrivateLinkResourceProvisioningState. + * Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded', 'Incomplete' + * @readonly + * @enum {string} + */ +export type SharedPrivateLinkResourceProvisioningState = 'Updating' | 'Deleting' | 'Failed' | 'Succeeded' | 'Incomplete'; /** * Defines values for HostingMode. @@ -608,6 +1062,14 @@ export type SkuName = 'free' | 'basic' | 'standard' | 'standard2' | 'standard3'; */ export type HostingMode = 'default' | 'highDensity'; +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'enabled', 'disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'enabled' | 'disabled'; + /** * Defines values for SearchServiceStatus. * Possible values include: 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' @@ -624,6 +1086,22 @@ 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 SharedPrivateLinkResourceAsyncOperationResult. + * Possible values include: 'Running', 'Succeeded', 'Failed' + * @readonly + * @enum {string} + */ +export type SharedPrivateLinkResourceAsyncOperationResult = 'Running' | 'Succeeded' | 'Failed'; + /** * Defines values for AdminKeyKind. * Possible values include: 'primary', 'secondary' @@ -644,6 +1122,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -663,6 +1142,7 @@ export type AdminKeysGetResponse = AdminKeyResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -682,6 +1162,7 @@ export type AdminKeysRegenerateResponse = AdminKeyResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -701,6 +1182,7 @@ export type QueryKeysCreateResponse = QueryKey & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -720,6 +1202,27 @@ export type QueryKeysListBySearchServiceResponse = ListQueryKeysResult & { * The response body as text (string format) */ bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListQueryKeysResult; + }; +}; + +/** + * Contains response data for the listBySearchServiceNext operation. + */ +export type QueryKeysListBySearchServiceNextResponse = ListQueryKeysResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -739,6 +1242,7 @@ export type ServicesCreateOrUpdateResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -758,6 +1262,7 @@ export type ServicesUpdateResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -777,6 +1282,7 @@ export type ServicesGetResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -796,6 +1302,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 +1342,7 @@ export type ServicesCheckNameAvailabilityResponse = CheckNameAvailabilityOutput * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -834,9 +1362,270 @@ export type ServicesBeginCreateOrUpdateResponse = SearchService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ parsedBody: SearchService; }; }; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ServicesListByResourceGroupNextResponse = 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 + */ + parsedBody: SearchServiceListResult; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type ServicesListBySubscriptionNextResponse = 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 + */ + parsedBody: SearchServiceListResult; + }; +}; + +/** + * Contains response data for the listSupported operation. + */ +export type PrivateLinkResourcesListSupportedResponse = PrivateLinkResourcesResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourcesResult; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type PrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type PrivateEndpointConnectionsDeleteMethodResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByService operation. + */ +export type PrivateEndpointConnectionsListByServiceResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the listByServiceNext operation. + */ +export type PrivateEndpointConnectionsListByServiceNextResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type SharedPrivateLinkResourcesCreateOrUpdateResponse = SharedPrivateLinkResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SharedPrivateLinkResourcesGetResponse = SharedPrivateLinkResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResource; + }; +}; + +/** + * Contains response data for the listByService operation. + */ +export type SharedPrivateLinkResourcesListByServiceResponse = SharedPrivateLinkResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type SharedPrivateLinkResourcesBeginCreateOrUpdateResponse = SharedPrivateLinkResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResource; + }; +}; + +/** + * Contains response data for the listByServiceNext operation. + */ +export type SharedPrivateLinkResourcesListByServiceNextResponse = SharedPrivateLinkResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedPrivateLinkResourceListResult; + }; +}; diff --git a/sdk/search/arm-search/src/models/mappers.ts b/sdk/search/arm-search/src/models/mappers.ts index aa0475f04b92..687178c83f80 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. + * 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 { 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" ] } } @@ -142,6 +142,81 @@ export const Sku: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnectionPropertiesPrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionProperties_privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointConnectionPropertiesPrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionProperties_privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Pending", + "Approved", + "Rejected", + "Disconnected" + ] + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + defaultValue: 'None', + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointConnectionPropertiesPrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -150,42 +225,480 @@ export const Resource: msRest.CompositeMapper = { modelProperties: { id: { readOnly: true, - serializedName: "id", + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + } + } + } +}; + +export const IpRule: msRest.CompositeMapper = { + serializedName: "IpRule", + type: { + name: "Composite", + className: "IpRule", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkRuleSet: msRest.CompositeMapper = { + serializedName: "NetworkRuleSet", + type: { + name: "Composite", + className: "NetworkRuleSet", + modelProperties: { + ipRules: { + serializedName: "ipRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpRule" + } + } + } + } + } + } +}; + +export const SharedPrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "SharedPrivateLinkResourceProperties", + type: { + name: "Composite", + className: "SharedPrivateLinkResourceProperties", + modelProperties: { + privateLinkResourceId: { + serializedName: "privateLinkResourceId", + type: { + name: "String" + } + }, + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + requestMessage: { + serializedName: "requestMessage", + type: { + name: "String" + } + }, + resourceRegion: { + serializedName: "resourceRegion", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Pending", + "Approved", + "Rejected", + "Disconnected" + ] + } + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "Enum", + allowedValues: [ + "Updating", + "Deleting", + "Failed", + "Succeeded", + "Incomplete" + ] + } + } + } + } +}; + +export const SharedPrivateLinkResource: msRest.CompositeMapper = { + serializedName: "SharedPrivateLinkResource", + type: { + name: "Composite", + className: "SharedPrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SharedPrivateLinkResourceProperties" + } + } + } + } +}; + +export const ShareablePrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "ShareablePrivateLinkResourceProperties", + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceProperties", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + groupId: { + readOnly: true, + serializedName: "groupId", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ShareablePrivateLinkResourceType: msRest.CompositeMapper = { + serializedName: "ShareablePrivateLinkResourceType", + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceType", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceProperties" + } + } + } + } +}; + +export const PrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceProperties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + readOnly: true, + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + readOnly: true, + serializedName: "requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + shareablePrivateLinkResourceTypes: { + readOnly: true, + serializedName: "shareablePrivateLinkResourceTypes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ShareablePrivateLinkResourceType" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + readOnly: true, + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties" + } + } + } + } +}; + +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "None", + "SystemAssigned" + ] + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const SearchService: msRest.CompositeMapper = { + serializedName: "SearchService", + type: { + name: "Composite", + className: "SearchService", + modelProperties: { + ...TrackedResource.type.modelProperties, + replicaCount: { + serializedName: "properties.replicaCount", + defaultValue: 1, + constraints: { + InclusiveMaximum: 12, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + partitionCount: { + serializedName: "properties.partitionCount", + defaultValue: 1, + constraints: { + InclusiveMaximum: 12, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + hostingMode: { + serializedName: "properties.hostingMode", + defaultValue: 'default', + type: { + name: "Enum", + allowedValues: [ + "default", + "highDensity" + ] + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + defaultValue: 'enabled', + type: { + name: "Enum", + allowedValues: [ + "enabled", + "disabled" + ] + } + }, + status: { + readOnly: true, + serializedName: "properties.status", type: { - name: "String" + name: "Enum", + allowedValues: [ + "running", + "provisioning", + "deleting", + "degraded", + "disabled", + "error" + ] } }, - name: { + statusDetails: { readOnly: true, - serializedName: "name", + serializedName: "properties.statusDetails", type: { name: "String" } }, - type: { + provisioningState: { readOnly: true, - serializedName: "type", + serializedName: "properties.provisioningState", type: { - name: "String" + name: "Enum", + allowedValues: [ + "succeeded", + "provisioning", + "failed" + ] } }, - location: { - serializedName: "location", + networkRuleSet: { + serializedName: "properties.networkRuleSet", type: { - name: "String" + name: "Composite", + className: "NetworkRuleSet" } }, - tags: { - serializedName: "tags", + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "PrivateEndpointConnection" } } } }, + sharedPrivateLinkResources: { + readOnly: true, + serializedName: "properties.sharedPrivateLinkResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource" + } + } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, identity: { serializedName: "identity", type: { @@ -197,11 +710,11 @@ export const Resource: msRest.CompositeMapper = { } }; -export const SearchService: msRest.CompositeMapper = { - serializedName: "SearchService", +export const SearchServiceUpdate: msRest.CompositeMapper = { + serializedName: "SearchServiceUpdate", type: { name: "Composite", - className: "SearchService", + className: "SearchServiceUpdate", modelProperties: { ...Resource.type.modelProperties, replicaCount: { @@ -237,6 +750,17 @@ export const SearchService: msRest.CompositeMapper = { ] } }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + defaultValue: 'enabled', + type: { + name: "Enum", + allowedValues: [ + "enabled", + "disabled" + ] + } + }, status: { readOnly: true, serializedName: "properties.status", @@ -271,42 +795,82 @@ export const SearchService: msRest.CompositeMapper = { ] } }, + networkRuleSet: { + serializedName: "properties.networkRuleSet", + type: { + name: "Composite", + className: "NetworkRuleSet" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + sharedPrivateLinkResources: { + readOnly: true, + serializedName: "properties.sharedPrivateLinkResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource" + } + } + } + }, sku: { serializedName: "sku", type: { name: "Composite", className: "Sku" } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } } } } }; -export const Identity: msRest.CompositeMapper = { - serializedName: "Identity", +export const AsyncOperationResult: msRest.CompositeMapper = { + serializedName: "AsyncOperationResult", type: { name: "Composite", - className: "Identity", + className: "AsyncOperationResult", modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", - type: { - name: "String" - } - }, - tenantId: { - readOnly: true, - serializedName: "tenantId", - type: { - name: "String" - } - }, - type: { - required: true, - isConstant: true, - serializedName: "type", - defaultValue: 'SystemAssigned', + status: { + serializedName: "status", type: { name: "String" } @@ -378,6 +942,35 @@ export const Operation: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + export const SearchManagementRequestOptions: msRest.CompositeMapper = { type: { name: "Composite", @@ -433,6 +1026,13 @@ export const ListQueryKeysResult: msRest.CompositeMapper = { } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } } } } @@ -456,6 +1056,95 @@ export const SearchServiceListResult: msRest.CompositeMapper = { } } } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourcesResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourcesResult", + type: { + name: "Composite", + className: "PrivateLinkResourcesResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SharedPrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "SharedPrivateLinkResourceListResult", + type: { + name: "Composite", + className: "SharedPrivateLinkResourceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } diff --git a/sdk/search/arm-search/src/models/operationsMappers.ts b/sdk/search/arm-search/src/models/operationsMappers.ts index 2edcc577920e..938d3e665a23 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. + * 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. */ export { - OperationListResult, + CloudError, Operation, OperationDisplay, - CloudError + OperationListResult } from "../models/mappers"; - diff --git a/sdk/search/arm-search/src/models/parameters.ts b/sdk/search/arm-search/src/models/parameters.ts index 1cfb7d35c69b..c50cf166f199 100644 --- a/sdk/search/arm-search/src/models/parameters.ts +++ b/sdk/search/arm-search/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -77,6 +76,27 @@ export const name: msRest.OperationURLParameter = { } } }; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -97,6 +117,16 @@ export const searchServiceName: msRest.OperationURLParameter = { } } }; +export const sharedPrivateLinkResourceName: msRest.OperationURLParameter = { + parameterPath: "sharedPrivateLinkResourceName", + mapper: { + required: true, + serializedName: "sharedPrivateLinkResourceName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/search/arm-search/src/models/privateEndpointConnectionsMappers.ts b/sdk/search/arm-search/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..dc11ab751d6f --- /dev/null +++ b/sdk/search/arm-search/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudError, + Identity, + IpRule, + NetworkRuleSet, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointConnectionProperties, + PrivateEndpointConnectionPropertiesPrivateEndpoint, + PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, + PrivateLinkResource, + PrivateLinkResourceProperties, + ProxyResource, + Resource, + SearchService, + SearchServiceUpdate, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SharedPrivateLinkResourceProperties, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/search/arm-search/src/models/privateLinkResourcesMappers.ts b/sdk/search/arm-search/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..02b5fe90249f --- /dev/null +++ b/sdk/search/arm-search/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudError, + Identity, + IpRule, + NetworkRuleSet, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateEndpointConnectionPropertiesPrivateEndpoint, + PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkResourcesResult, + ProxyResource, + Resource, + SearchService, + SearchServiceUpdate, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SharedPrivateLinkResourceProperties, + Sku, + TrackedResource +} 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..97b70b8f7abe 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. + * 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. */ 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..eacadf42c3f5 100644 --- a/sdk/search/arm-search/src/models/servicesMappers.ts +++ b/sdk/search/arm-search/src/models/servicesMappers.ts @@ -1,22 +1,35 @@ /* - * 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. */ export { - SearchService, - Resource, + AzureEntityResource, BaseResource, - Identity, - Sku, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, CloudError, + Identity, + IpRule, + NetworkRuleSet, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateEndpointConnectionPropertiesPrivateEndpoint, + PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, + PrivateLinkResource, + PrivateLinkResourceProperties, + ProxyResource, + Resource, + SearchService, SearchServiceListResult, - CheckNameAvailabilityInput, - CheckNameAvailabilityOutput + SearchServiceUpdate, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SharedPrivateLinkResourceProperties, + Sku, + TrackedResource } from "../models/mappers"; - diff --git a/sdk/search/arm-search/src/models/sharedPrivateLinkResourcesMappers.ts b/sdk/search/arm-search/src/models/sharedPrivateLinkResourcesMappers.ts new file mode 100644 index 000000000000..5d1b7b30f339 --- /dev/null +++ b/sdk/search/arm-search/src/models/sharedPrivateLinkResourcesMappers.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudError, + Identity, + IpRule, + NetworkRuleSet, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateEndpointConnectionPropertiesPrivateEndpoint, + PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, + PrivateLinkResource, + PrivateLinkResourceProperties, + ProxyResource, + Resource, + SearchService, + SearchServiceUpdate, + ShareablePrivateLinkResourceProperties, + ShareablePrivateLinkResourceType, + SharedPrivateLinkResource, + SharedPrivateLinkResourceListResult, + SharedPrivateLinkResourceProperties, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/search/arm-search/src/operations/adminKeys.ts b/sdk/search/arm-search/src/operations/adminKeys.ts index c94d586cf2d4..dc14d312efa7 100644 --- a/sdk/search/arm-search/src/operations/adminKeys.ts +++ b/sdk/search/arm-search/src/operations/adminKeys.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,11 +26,11 @@ export class AdminKeys { } /** - * Gets the primary and secondary admin API keys for the specified Azure Search service. + * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param [options] The optional parameters * @returns Promise */ @@ -39,16 +38,16 @@ export class AdminKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param callback The callback */ get(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param options The optional parameters * @param callback The callback */ @@ -69,8 +68,8 @@ export class AdminKeys { * time. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and * 'secondary'. Possible values include: 'primary', 'secondary' * @param [options] The optional parameters @@ -80,8 +79,8 @@ export class AdminKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and * 'secondary'. Possible values include: 'primary', 'secondary' * @param callback The callback @@ -90,8 +89,8 @@ export class AdminKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and * 'secondary'. Possible values include: 'primary', 'secondary' * @param options The optional parameters diff --git a/sdk/search/arm-search/src/operations/index.ts b/sdk/search/arm-search/src/operations/index.ts index 2e6d77c43e30..058e45b1e03e 100644 --- a/sdk/search/arm-search/src/operations/index.ts +++ b/sdk/search/arm-search/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,3 +11,6 @@ export * from "./operations"; export * from "./adminKeys"; export * from "./queryKeys"; export * from "./services"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; +export * from "./sharedPrivateLinkResources"; diff --git a/sdk/search/arm-search/src/operations/operations.ts b/sdk/search/arm-search/src/operations/operations.ts index cd480c58ff6d..b93a395067cb 100644 --- a/sdk/search/arm-search/src/operations/operations.ts +++ b/sdk/search/arm-search/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/search/arm-search/src/operations/privateEndpointConnections.ts b/sdk/search/arm-search/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..fc1d78929cda --- /dev/null +++ b/sdk/search/arm-search/src/operations/privateEndpointConnections.ts @@ -0,0 +1,375 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { SearchManagementClientContext } from "../searchManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: SearchManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {SearchManagementClientContext} client Reference to the service client. + */ + constructor(client: SearchManagementClientContext) { + this.client = client; + } + + /** + * Updates a Private Endpoint connection to the search service in the given resource group. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param privateEndpointConnection The definition of the private endpoint connection to update. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: Models.PrivateEndpointConnectionsUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param privateEndpointConnection The definition of the private endpoint connection to update. + * @param callback The callback + */ + update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param privateEndpointConnection The definition of the private endpoint connection to update. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options: Models.PrivateEndpointConnectionsUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: Models.PrivateEndpointConnectionsUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + searchServiceName, + privateEndpointConnectionName, + privateEndpointConnection, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets the details of the private endpoint connection to the search service in the given resource + * group. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsGetOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param callback The callback + */ + get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options: Models.PrivateEndpointConnectionsGetOptionalParams, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + searchServiceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Disconnects the private endpoint connection and deletes it from the search service. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsDeleteMethodOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure + * Cognitive Search service with the specified resource group. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options: Models.PrivateEndpointConnectionsDeleteMethodOptionalParams, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, searchServiceName: string, privateEndpointConnectionName: string, options?: Models.PrivateEndpointConnectionsDeleteMethodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + searchServiceName, + privateEndpointConnectionName, + options + }, + deleteMethodOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all private endpoint connections in the given service. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByService(resourceGroupName: string, searchServiceName: string, options?: Models.PrivateEndpointConnectionsListByServiceOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param callback The callback + */ + listByService(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByService(resourceGroupName: string, searchServiceName: string, options: Models.PrivateEndpointConnectionsListByServiceOptionalParams, callback: msRest.ServiceCallback): void; + listByService(resourceGroupName: string, searchServiceName: string, options?: Models.PrivateEndpointConnectionsListByServiceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + searchServiceName, + options + }, + listByServiceOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all private endpoint connections in the given service. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServiceNext(nextPageLink: string, options?: Models.PrivateEndpointConnectionsListByServiceNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServiceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServiceNext(nextPageLink: string, options: Models.PrivateEndpointConnectionsListByServiceNextOptionalParams, callback: msRest.ServiceCallback): void; + listByServiceNext(nextPageLink: string, options?: Models.PrivateEndpointConnectionsListByServiceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServiceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.searchServiceName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + requestBody: { + parameterPath: "privateEndpointConnection", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.searchServiceName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.searchServiceName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 404: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.searchServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServiceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/search/arm-search/src/operations/privateLinkResources.ts b/sdk/search/arm-search/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..019252d91265 --- /dev/null +++ b/sdk/search/arm-search/src/operations/privateLinkResources.ts @@ -0,0 +1,93 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { SearchManagementClientContext } from "../searchManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: SearchManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {SearchManagementClientContext} client Reference to the service client. + */ + constructor(client: SearchManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of all supported private link resource types for the given service. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listSupported(resourceGroupName: string, searchServiceName: string, options?: Models.PrivateLinkResourcesListSupportedOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param callback The callback + */ + listSupported(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param options The optional parameters + * @param callback The callback + */ + listSupported(resourceGroupName: string, searchServiceName: string, options: Models.PrivateLinkResourcesListSupportedOptionalParams, callback: msRest.ServiceCallback): void; + listSupported(resourceGroupName: string, searchServiceName: string, options?: Models.PrivateLinkResourcesListSupportedOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + searchServiceName, + options + }, + listSupportedOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listSupportedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.searchServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourcesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/search/arm-search/src/operations/queryKeys.ts b/sdk/search/arm-search/src/operations/queryKeys.ts index 3fe1409cc4bf..7976725e218a 100644 --- a/sdk/search/arm-search/src/operations/queryKeys.ts +++ b/sdk/search/arm-search/src/operations/queryKeys.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,12 +26,12 @@ export class QueryKeys { } /** - * Generates a new query key for the specified Search service. You can create up to 50 query keys + * Generates a new query key for the specified search service. You can create up to 50 query keys * per service. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param name The name of the new query API key. * @param [options] The optional parameters * @returns Promise @@ -41,8 +40,8 @@ export class QueryKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param name The name of the new query API key. * @param callback The callback */ @@ -50,8 +49,8 @@ export class QueryKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param name The name of the new query API key. * @param options The optional parameters * @param callback The callback @@ -70,11 +69,11 @@ export class QueryKeys { } /** - * Returns the list of query API keys for the given Azure Search service. + * Returns the list of query API keys for the given Azure Cognitive Search service. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param [options] The optional parameters * @returns Promise */ @@ -82,16 +81,16 @@ export class QueryKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param callback The callback */ listBySearchService(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param options The optional parameters * @param callback The callback */ @@ -112,8 +111,8 @@ export class QueryKeys { * for regenerating a query key is to delete and then recreate it. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param key The query key to be deleted. Query keys are identified by value, not by name. * @param [options] The optional parameters * @returns Promise @@ -122,8 +121,8 @@ export class QueryKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param key The query key to be deleted. Query keys are identified by value, not by name. * @param callback The callback */ @@ -131,8 +130,8 @@ export class QueryKeys { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param key The query key to be deleted. Query keys are identified by value, not by name. * @param options The optional parameters * @param callback The callback @@ -149,6 +148,34 @@ export class QueryKeys { deleteMethodOperationSpec, callback); } + + /** + * Returns the list of query API keys for the given Azure Cognitive Search service. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySearchServiceNext(nextPageLink: string, options?: Models.QueryKeysListBySearchServiceNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySearchServiceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySearchServiceNext(nextPageLink: string, options: Models.QueryKeysListBySearchServiceNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySearchServiceNext(nextPageLink: string, options?: Models.QueryKeysListBySearchServiceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySearchServiceNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -181,7 +208,7 @@ const createOperationSpec: msRest.OperationSpec = { }; const listBySearchServiceOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", + httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys", urlParameters: [ Parameters.resourceGroupName, @@ -232,3 +259,28 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listBySearchServiceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.ListQueryKeysResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/search/arm-search/src/operations/services.ts b/sdk/search/arm-search/src/operations/services.ts index a1c86103d7f8..e0626a9933b3 100644 --- a/sdk/search/arm-search/src/operations/services.ts +++ b/sdk/search/arm-search/src/operations/services.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -28,17 +27,17 @@ export class Services { } /** - * Creates or updates a Search service in the given resource group. If the Search service already + * Creates or updates a search service in the given resource group. If the search service already * exists, all properties will be updated with the given values. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service to create or update. 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. Search service names must be globally unique since they are part of the - * service URI (https://.search.windows.net). You cannot change the service name after the - * service is created. - * @param service The definition of the Search service to create or update. + * @param searchServiceName The name of the Azure Cognitive Search service to create or update. + * 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. Search service names must be globally unique since they are part of + * the service URI (https://.search.windows.net). You cannot change the service name after + * the service is created. + * @param service The definition of the search service to create or update. * @param [options] The optional parameters * @returns Promise */ @@ -48,33 +47,33 @@ export class Services { } /** - * Updates an existing Search service in the given resource group. + * Updates an existing search service in the given resource group. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service to update. - * @param service The definition of the Search service to update. + * @param searchServiceName The name of the Azure Cognitive Search service to update. + * @param service The definition of the search service to update. * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, searchServiceName: string, service: Models.SearchService, options?: Models.ServicesUpdateOptionalParams): Promise; + update(resourceGroupName: string, searchServiceName: string, service: Models.SearchServiceUpdate, options?: Models.ServicesUpdateOptionalParams): Promise; /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service to update. - * @param service The definition of the Search service to update. + * @param searchServiceName The name of the Azure Cognitive Search service to update. + * @param service The definition of the search service to update. * @param callback The callback */ - update(resourceGroupName: string, searchServiceName: string, service: Models.SearchService, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, searchServiceName: string, service: Models.SearchServiceUpdate, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service to update. - * @param service The definition of the Search service to update. + * @param searchServiceName The name of the Azure Cognitive Search service to update. + * @param service The definition of the search service to update. * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, searchServiceName: string, service: Models.SearchService, options: Models.ServicesUpdateOptionalParams, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, searchServiceName: string, service: Models.SearchService, options?: Models.ServicesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, searchServiceName: string, service: Models.SearchServiceUpdate, options: Models.ServicesUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, searchServiceName: string, service: Models.SearchServiceUpdate, options?: Models.ServicesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -87,11 +86,11 @@ export class Services { } /** - * Gets the Search service with the given name in the given resource group. + * Gets the search service with the given name in the given resource group. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param [options] The optional parameters * @returns Promise */ @@ -99,16 +98,16 @@ export class Services { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param callback The callback */ get(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param options The optional parameters * @param callback The callback */ @@ -125,11 +124,11 @@ export class Services { } /** - * Deletes a Search service in the given resource group, along with its associated resources. + * Deletes a search service in the given resource group, along with its associated resources. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param [options] The optional parameters * @returns Promise */ @@ -137,16 +136,16 @@ export class Services { /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param callback The callback */ deleteMethod(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service associated with the specified - * resource group. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. * @param options The optional parameters * @param callback The callback */ @@ -163,7 +162,7 @@ export class Services { } /** - * Gets a list of all Search services in the given resource group. + * Gets a list of all search services in the given resource group. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. * @param [options] The optional parameters @@ -194,10 +193,34 @@ export class Services { } /** - * Checks whether or not the given Search service name is available for use. Search service names + * 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 * (https://.search.windows.net). - * @param name The Search service name to validate. Search service names must only contain + * @param 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. * @param [options] The optional parameters @@ -205,14 +228,14 @@ export class Services { */ checkNameAvailability(name: string, options?: Models.ServicesCheckNameAvailabilityOptionalParams): Promise; /** - * @param name The Search service name to validate. Search service names must only contain + * @param 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. * @param callback The callback */ checkNameAvailability(name: string, callback: msRest.ServiceCallback): void; /** - * @param name The Search service name to validate. Search service names must only contain + * @param 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. * @param options The optional parameters @@ -230,17 +253,17 @@ export class Services { } /** - * Creates or updates a Search service in the given resource group. If the Search service already + * Creates or updates a search service in the given resource group. If the search service already * exists, all properties will be updated with the given values. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. - * @param searchServiceName The name of the Azure Search service to create or update. 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. Search service names must be globally unique since they are part of the - * service URI (https://.search.windows.net). You cannot change the service name after the - * service is created. - * @param service The definition of the Search service to create or update. + * @param searchServiceName The name of the Azure Cognitive Search service to create or update. + * 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. Search service names must be globally unique since they are part of + * the service URI (https://.search.windows.net). You cannot change the service name after + * the service is created. + * @param service The definition of the search service to create or update. * @param [options] The optional parameters * @returns Promise */ @@ -255,6 +278,62 @@ export class Services { beginCreateOrUpdateOperationSpec, options); } + + /** + * Gets a list of all search services in the given resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: Models.ServicesListByResourceGroupNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: Models.ServicesListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.ServicesListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of all search services in the given subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: Models.ServicesListBySubscriptionNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: Models.ServicesListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: Models.ServicesListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -277,7 +356,7 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "service", mapper: { - ...Mappers.SearchService, + ...Mappers.SearchServiceUpdate, required: true } }, @@ -369,6 +448,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", @@ -437,3 +540,53 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.SearchServiceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.SearchServiceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/search/arm-search/src/operations/sharedPrivateLinkResources.ts b/sdk/search/arm-search/src/operations/sharedPrivateLinkResources.ts new file mode 100644 index 000000000000..68e35e62cae6 --- /dev/null +++ b/sdk/search/arm-search/src/operations/sharedPrivateLinkResources.ts @@ -0,0 +1,367 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sharedPrivateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { SearchManagementClientContext } from "../searchManagementClientContext"; + +/** Class representing a SharedPrivateLinkResources. */ +export class SharedPrivateLinkResources { + private readonly client: SearchManagementClientContext; + + /** + * Create a SharedPrivateLinkResources. + * @param {SearchManagementClientContext} client Reference to the service client. + */ + constructor(client: SearchManagementClientContext) { + this.client = client; + } + + /** + * Initiates the creation or update of a shared private link resource managed by the search service + * in the given resource group. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the + * Azure Cognitive Search service within the specified resource group. + * @param sharedPrivateLinkResource The definition of the shared private link resource to create or + * update. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, sharedPrivateLinkResource: Models.SharedPrivateLinkResource, options?: Models.SharedPrivateLinkResourcesCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(resourceGroupName,searchServiceName,sharedPrivateLinkResourceName,sharedPrivateLinkResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets the details of the shared private link resource managed by the search service in the given + * resource group. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the + * Azure Cognitive Search service within the specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: Models.SharedPrivateLinkResourcesGetOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the + * Azure Cognitive Search service within the specified resource group. + * @param callback The callback + */ + get(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the + * Azure Cognitive Search service within the specified resource group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options: Models.SharedPrivateLinkResourcesGetOptionalParams, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: Models.SharedPrivateLinkResourcesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + searchServiceName, + sharedPrivateLinkResourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Initiates the deletion of the shared private link resource from the search service. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the + * Azure Cognitive Search service within the specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: Models.SharedPrivateLinkResourcesDeleteMethodOptionalParams): Promise { + return this.beginDeleteMethod(resourceGroupName,searchServiceName,sharedPrivateLinkResourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a list of all shared private link resources managed by the given service. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByService(resourceGroupName: string, searchServiceName: string, options?: Models.SharedPrivateLinkResourcesListByServiceOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param callback The callback + */ + listByService(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByService(resourceGroupName: string, searchServiceName: string, options: Models.SharedPrivateLinkResourcesListByServiceOptionalParams, callback: msRest.ServiceCallback): void; + listByService(resourceGroupName: string, searchServiceName: string, options?: Models.SharedPrivateLinkResourcesListByServiceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + searchServiceName, + options + }, + listByServiceOperationSpec, + callback) as Promise; + } + + /** + * Initiates the creation or update of a shared private link resource managed by the search service + * in the given resource group. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the + * Azure Cognitive Search service within the specified resource group. + * @param sharedPrivateLinkResource The definition of the shared private link resource to create or + * update. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, sharedPrivateLinkResource: Models.SharedPrivateLinkResource, options?: Models.SharedPrivateLinkResourcesBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + searchServiceName, + sharedPrivateLinkResourceName, + sharedPrivateLinkResource, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Initiates the deletion of the shared private link resource from the search service. + * @param resourceGroupName The name of the resource group within the current subscription. You can + * obtain this value from the Azure Resource Manager API or the portal. + * @param searchServiceName The name of the Azure Cognitive Search service associated with the + * specified resource group. + * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the + * Azure Cognitive Search service within the specified resource group. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, searchServiceName: string, sharedPrivateLinkResourceName: string, options?: Models.SharedPrivateLinkResourcesBeginDeleteMethodOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + searchServiceName, + sharedPrivateLinkResourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of all shared private link resources managed by the given service. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByServiceNext(nextPageLink: string, options?: Models.SharedPrivateLinkResourcesListByServiceNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByServiceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByServiceNext(nextPageLink: string, options: Models.SharedPrivateLinkResourcesListByServiceNextOptionalParams, callback: msRest.ServiceCallback): void; + listByServiceNext(nextPageLink: string, options?: Models.SharedPrivateLinkResourcesListByServiceNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByServiceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.searchServiceName, + Parameters.sharedPrivateLinkResourceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServiceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.searchServiceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.searchServiceName, + Parameters.sharedPrivateLinkResourceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + requestBody: { + parameterPath: "sharedPrivateLinkResource", + mapper: { + ...Mappers.SharedPrivateLinkResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResource + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.searchServiceName, + Parameters.sharedPrivateLinkResourceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 202: {}, + 204: {}, + 404: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByServiceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage, + Parameters.clientRequestId + ], + responses: { + 200: { + bodyMapper: Mappers.SharedPrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/search/arm-search/src/searchManagementClient.ts b/sdk/search/arm-search/src/searchManagementClient.ts index f103244dae59..8ba4042a400a 100644 --- a/sdk/search/arm-search/src/searchManagementClient.ts +++ b/sdk/search/arm-search/src/searchManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -22,6 +21,9 @@ class SearchManagementClient extends SearchManagementClientContext { adminKeys: operations.AdminKeys; queryKeys: operations.QueryKeys; services: operations.Services; + privateLinkResources: operations.PrivateLinkResources; + privateEndpointConnections: operations.PrivateEndpointConnections; + sharedPrivateLinkResources: operations.SharedPrivateLinkResources; /** * Initializes a new instance of the SearchManagementClient class. @@ -41,6 +43,9 @@ class SearchManagementClient extends SearchManagementClientContext { this.adminKeys = new operations.AdminKeys(this); this.queryKeys = new operations.QueryKeys(this); this.services = new operations.Services(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.sharedPrivateLinkResources = new operations.SharedPrivateLinkResources(this); } } diff --git a/sdk/search/arm-search/src/searchManagementClientContext.ts b/sdk/search/arm-search/src/searchManagementClientContext.ts index 32e5508eb276..ab03be6706d9 100644 --- a/sdk/search/arm-search/src/searchManagementClientContext.ts +++ b/sdk/search/arm-search/src/searchManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-search"; const packageVersion = "1.4.0"; @@ -44,14 +43,14 @@ export class SearchManagementClientContext extends msRestAzure.AzureServiceClien if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2015-08-19'; + this.apiVersion = '2020-08-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -59,10 +58,10 @@ export class SearchManagementClientContext extends msRestAzure.AzureServiceClien this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } 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