Skip to content

Commit

Permalink
CodeGen from PR 16870 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Track2 modify readme.go.md (Azure#16870)
  • Loading branch information
SDKAuto committed Nov 25, 2021
1 parent 94c7e2f commit e9ebf22
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 410 deletions.
9 changes: 3 additions & 6 deletions sdk/communication/arm-communication/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Azure CommunicationServiceManagementClient SDK for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for CommunicationServiceManagementClient.
This package contains an isomorphic SDK (runs both in node.js and in browsers) for CommunicationServiceManagementClient.

### 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

Expand All @@ -21,7 +21,6 @@ Install both packages using the below command:
```bash
npm install --save @azure/arm-communication @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.

Expand All @@ -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
Expand All @@ -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 CommunicationServiceManagementClient(creds, subscriptionId);

client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
Expand Down Expand Up @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
const credential = new InteractiveBrowserCredential(
{
clientId: "<client id for your Azure AD app>",
tenantId: "<optional tenant for your organization>"
tenant: "<optional tenant for your organization>"
});
const client = new Azure.ArmCommunication.CommunicationServiceManagementClient(creds, subscriptionId);
client.operations.list().then((result) => {
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/arm-communication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/communication/arm-communication",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/communication/arm-communication",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class CommunicationServiceManagementClient extends CommunicationServiceManagemen
// Operation groups
operations: operations.Operations;
communicationService: operations.CommunicationService;
operationStatuses: operations.OperationStatuses;

/**
* Initializes a new instance of the CommunicationServiceManagementClient class.
Expand All @@ -36,7 +35,6 @@ class CommunicationServiceManagementClient extends CommunicationServiceManagemen
super(credentials, subscriptionId, options);
this.operations = new operations.Operations(this);
this.communicationService = new operations.CommunicationService(this);
this.operationStatuses = new operations.OperationStatuses(this);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,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-communication";
const packageVersion = "2.1.1";
Expand Down
182 changes: 59 additions & 123 deletions sdk/communication/arm-communication/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,101 +68,6 @@ export interface LinkedNotificationHub {
resourceId?: string;
}

/**
* The resource management error additional info.
*/
export interface ErrorAdditionalInfo {
/**
* The additional info type.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
/**
* The additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly info?: any;
}

/**
* The error detail.
*/
export interface ErrorDetail {
/**
* The error code.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly code?: string;
/**
* The error message.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly message?: string;
/**
* The error target.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly target?: string;
/**
* The error details.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly details?: ErrorDetail[];
/**
* The error additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly additionalInfo?: ErrorAdditionalInfo[];
}

/**
* Common error response for all Azure Resource Manager APIs to return error details for failed
* operations. (This also follows the OData error response format.).
* @summary Error response
*/
export interface ErrorResponse {
/**
* The error object.
*/
error?: ErrorDetail;
}

/**
* The current status of an async operation
*/
export interface OperationStatus {
/**
* Fully qualified ID for the operation status.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly id?: string;
/**
* Provisioning state of the resource. Possible values include: 'Succeeded', 'Failed',
* 'Canceled', 'Creating', 'Deleting', 'Moving'
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly status?: Status;
/**
* The start time of the operation
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly startTime?: Date;
/**
* The end time of the operation
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly endTime?: Date;
/**
* Percent of the operation that is complete
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly percentComplete?: number;
/**
* The error object.
*/
error?: ErrorDetail;
}

/**
* Metadata pertaining to creation and last modification of the resource.
*/
Expand Down Expand Up @@ -371,6 +276,65 @@ export interface AzureEntityResource extends Resource {
readonly etag?: string;
}

/**
* The resource management error additional info.
*/
export interface ErrorAdditionalInfo {
/**
* The additional info type.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
/**
* The additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly info?: any;
}

/**
* The error detail.
*/
export interface ErrorDetail {
/**
* The error code.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly code?: string;
/**
* The error message.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly message?: string;
/**
* The error target.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly target?: string;
/**
* The error details.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly details?: ErrorDetail[];
/**
* The error additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly additionalInfo?: ErrorAdditionalInfo[];
}

/**
* Common error response for all Azure Resource Manager APIs to return error details for failed
* operations. (This also follows the OData error response format.).
* @summary Error response
*/
export interface ErrorResponse {
/**
* The error object.
*/
error?: ErrorDetail;
}

/**
* Localized display information for this particular operation.
*/
Expand Down Expand Up @@ -541,14 +505,6 @@ export interface CommunicationServiceResourceList extends Array<CommunicationSer
nextLink?: string;
}

/**
* Defines values for Status.
* Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Creating', 'Deleting', 'Moving'
* @readonly
* @enum {string}
*/
export type Status = 'Succeeded' | 'Failed' | 'Canceled' | 'Creating' | 'Deleting' | 'Moving';

/**
* Defines values for ProvisioningState.
* Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating',
Expand Down Expand Up @@ -869,23 +825,3 @@ export type CommunicationServiceListByResourceGroupNextResponse = CommunicationS
parsedBody: CommunicationServiceResourceList;
};
};

/**
* Contains response data for the get operation.
*/
export type OperationStatusesGetResponse = OperationStatus & {
/**
* 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: OperationStatus;
};
};
Loading

0 comments on commit e9ebf22

Please sign in to comment.