Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-cognitiveservices] [Cognitive Services] s360 alarm: add location to PrivateEndpointConnection #3747

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/cognitiveservices/arm-cognitiveservices/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft
Copyright (c) 2021 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 4 additions & 5 deletions sdk/cognitiveservices/arm-cognitiveservices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-cognitiveservices

### How to use

#### nodejs - Authentication, client creation and getProperties accounts as an example written in TypeScript.
#### nodejs - client creation and getProperties accounts as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { CognitiveServicesManagementClient, CognitiveServicesManagementModels, CognitiveServicesManagementMappers } from "@azure/arm-cognitiveservices";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { CognitiveServicesManagementClient } = require("@azure/arm-cognitiveservices");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -143,7 +142,7 @@ const checkSkuAvailabilityOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CheckSkuAvailabilityResultList
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.ErrorModel
}
},
serializer
Expand Down Expand Up @@ -176,7 +175,7 @@ const checkDomainAvailabilityOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.CheckDomainAvailabilityResult
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.ErrorModel
}
},
serializer
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -37,7 +36,7 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS
if (!options) {
options = {};
}
if (!options.userAgent) {
if(!options.userAgent) {
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}
Expand All @@ -52,10 +51,10 @@ export class CognitiveServicesManagementClientContext extends msRestAzure.AzureS
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;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -15,6 +15,7 @@ export {
CognitiveServicesAccountKeys,
CognitiveServicesAccountListResult,
CognitiveServicesAccountProperties,
CognitiveServicesAccountSkuChangeInfo,
CognitiveServicesResourceAndSku,
Encryption,
ErrorBody,
Expand Down
132 changes: 118 additions & 14 deletions sdk/cognitiveservices/arm-cognitiveservices/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand All @@ -21,7 +21,7 @@ export interface Sku {
name: string;
/**
* Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard',
* 'Premium'
* 'Premium', 'Enterprise'
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly tier?: SkuTier;
Expand All @@ -41,6 +41,27 @@ export interface SkuCapability {
value?: string;
}

/**
* Sku change info of account.
*/
export interface CognitiveServicesAccountSkuChangeInfo {
/**
* Gets the count of downgrades.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly countOfDowngrades?: number;
/**
* Gets the count of upgrades after downgrades.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly countOfUpgradesAfterDowngrades?: number;
/**
* Gets the last change date.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly lastChangeDate?: string;
}

/**
* A rule governing the accessibility from a specific ip address or ip range.
*/
Expand Down Expand Up @@ -161,7 +182,7 @@ export interface PrivateLinkServiceConnectionState {
/**
* A message indicating if changes on the service provider require any updates on the consumer.
*/
actionRequired?: string;
actionsRequired?: string;
}

/**
Expand All @@ -184,11 +205,12 @@ export interface PrivateEndpointConnectionProperties {
}

/**
* An interface representing Resource.
* Common fields that are returned in the response for all Azure Resource Manager resources
* @summary Resource
*/
export interface Resource extends BaseResource {
/**
* Fully qualified resource Id for the resource. Ex -
* Fully qualified resource ID for the resource. Ex -
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
Expand All @@ -199,8 +221,8 @@ export interface Resource extends BaseResource {
*/
readonly name?: string;
/**
* The type of the resource. Ex- Microsoft.Compute/virtualMachines or
* Microsoft.Storage/storageAccounts.
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
* "Microsoft.Storage/storageAccounts"
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
Expand All @@ -214,6 +236,15 @@ export interface PrivateEndpointConnection extends Resource {
* Resource properties.
*/
properties?: PrivateEndpointConnectionProperties;
/**
* Entity Tag
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly etag?: string;
/**
* The location of the private endpoint connection
*/
location?: string;
}

/**
Expand All @@ -224,6 +255,14 @@ export interface CognitiveServicesAccountApiProperties {
* (QnAMaker Only) The runtime endpoint of QnAMaker.
*/
qnaRuntimeEndpoint?: string;
/**
* (QnAMaker Only) The Azure Search endpoint key of QnAMaker.
*/
qnaAzureSearchEndpointKey?: string;
/**
* (QnAMaker Only) The Azure Search endpoint id of QnAMaker.
*/
qnaAzureSearchEndpointId?: string;
/**
* (Bing Search Only) The flag to enable statistics of Bing Search.
*/
Expand All @@ -236,6 +275,22 @@ export interface CognitiveServicesAccountApiProperties {
* (Personalization Only) The storage account connection string.
*/
storageAccountConnectionString?: string;
/**
* (Metrics Advisor Only) The Azure AD Client Id (Application Id).
*/
aadClientId?: string;
/**
* (Metrics Advisor Only) The Azure AD Tenant Id.
*/
aadTenantId?: string;
/**
* (Metrics Advisor Only) The super user of Metrics Advisor.
*/
superUser?: string;
/**
* (Metrics Advisor Only) The website name of Metrics Advisor.
*/
websiteName?: string;
}

/**
Expand Down Expand Up @@ -265,6 +320,16 @@ export interface CognitiveServicesAccountProperties {
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly capabilities?: SkuCapability[];
/**
* If the resource is migrated from an existing key.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly isMigrated?: boolean;
/**
* Sku change info of account.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly skuChangeInfo?: CognitiveServicesAccountSkuChangeInfo;
/**
* Optional subdomain name used for token-based authentication.
*/
Expand Down Expand Up @@ -294,6 +359,11 @@ export interface CognitiveServicesAccountProperties {
* The api properties for special APIs.
*/
apiProperties?: CognitiveServicesAccountApiProperties;
/**
* Gets the date of cognitive services account creation.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly dateCreated?: string;
}

/**
Expand Down Expand Up @@ -750,6 +820,16 @@ export interface ResourceSku {
readonly restrictions?: ResourceSkuRestrictions[];
}

/**
* A list of private endpoint connections
*/
export interface PrivateEndpointConnectionListResult {
/**
* Array of private endpoint connections
*/
value?: PrivateEndpointConnection[];
}

/**
* Properties of a private link resource.
*/
Expand Down Expand Up @@ -796,14 +876,17 @@ export interface PrivateLinkResourceListResult {
}

/**
* The resource model definition for a ARM proxy resource. It will have everything other than
* required location and tags
* The resource model definition for a Azure Resource Manager proxy resource. It will not have tags
* and a location
* @summary Proxy Resource
*/
export interface ProxyResource extends Resource {
}

/**
* The resource model definition for a ARM tracked top level resource
* 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 {
/**
Expand All @@ -817,7 +900,8 @@ export interface TrackedResource extends Resource {
}

/**
* The resource model definition for a Azure Resource Manager resource with an etag.
* The resource model definition for an Azure Resource Manager resource with an etag.
* @summary Entity Resource
*/
export interface AzureEntityResource extends Resource {
/**
Expand Down Expand Up @@ -883,11 +967,11 @@ export interface OperationEntityListResult extends Array<OperationEntity> {

/**
* Defines values for SkuTier.
* Possible values include: 'Free', 'Standard', 'Premium'
* Possible values include: 'Free', 'Standard', 'Premium', 'Enterprise'
* @readonly
* @enum {string}
*/
export type SkuTier = 'Free' | 'Standard' | 'Premium';
export type SkuTier = 'Free' | 'Standard' | 'Premium' | 'Enterprise';

/**
* Defines values for ProvisioningState.
Expand Down Expand Up @@ -1318,6 +1402,26 @@ export type CheckDomainAvailabilityResponse = CheckDomainAvailabilityResult & {
};
};

/**
* Contains response data for the list operation.
*/
export type PrivateEndpointConnectionsListResponse = 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 get operation.
*/
Expand Down
Loading