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

[ReleasePR @azure/arm-cognitiveservices] Update available SKUs for CognitiveServices->Text Analytics #14180 #12619

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
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
4 changes: 2 additions & 2 deletions sdk/cognitiveservices/arm-cognitiveservices/rollup.config.js
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
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 Down
82 changes: 69 additions & 13 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 Down Expand Up @@ -184,11 +184,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 +200,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 Down Expand Up @@ -236,6 +237,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 @@ -294,6 +311,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 +772,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 +828,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 +852,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 +919,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 +1354,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
76 changes: 68 additions & 8 deletions sdk/cognitiveservices/arm-cognitiveservices/src/models/mappers.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 Down Expand Up @@ -29,12 +29,7 @@ export const Sku: msRest.CompositeMapper = {
readOnly: true,
serializedName: "tier",
type: {
name: "Enum",
allowedValues: [
"Free",
"Standard",
"Premium"
]
name: "String"
}
}
}
Expand Down Expand Up @@ -384,6 +379,42 @@ export const CognitiveServicesAccountApiProperties: msRest.CompositeMapper = {
type: {
name: "String"
}
},
aadClientId: {
serializedName: "aadClientId",
constraints: {
MaxLength: 500
},
type: {
name: "String"
}
},
aadTenantId: {
serializedName: "aadTenantId",
constraints: {
MaxLength: 500
},
type: {
name: "String"
}
},
superUser: {
serializedName: "superUser",
constraints: {
MaxLength: 500
},
type: {
name: "String"
}
},
websiteName: {
serializedName: "websiteName",
constraints: {
MaxLength: 500
},
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -485,6 +516,13 @@ export const CognitiveServicesAccountProperties: msRest.CompositeMapper = {
name: "Composite",
className: "CognitiveServicesAccountApiProperties"
}
},
dateCreated: {
readOnly: true,
serializedName: "dateCreated",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -1252,6 +1290,28 @@ export const ResourceSku: msRest.CompositeMapper = {
}
};

export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = {
serializedName: "PrivateEndpointConnectionListResult",
type: {
name: "Composite",
className: "PrivateEndpointConnectionListResult",
modelProperties: {
value: {
serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "PrivateEndpointConnection"
}
}
}
}
}
}
};

export const PrivateLinkResourceProperties: msRest.CompositeMapper = {
serializedName: "PrivateLinkResourceProperties",
type: {
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 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
Loading