From badc847aa85b6f627871023bcc3f0fd3fde519d4 Mon Sep 17 00:00:00 2001 From: "openapi-sdkautomation[bot]" <37845953+openapi-sdkautomation[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2020 14:42:34 +0800 Subject: [PATCH] =?UTF-8?q?[ReleasePR=20@azure/arm-support]=20update=20pac?= =?UTF-8?q?kage=20name=20and=20output=20f=E2=80=A6=20(#7917)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update package name and output folder in readme.typescript.md Co-authored-by: SDK Automation --- sdk/support/arm-support/LICENSE.txt | 21 + sdk/support/arm-support/README.md | 99 ++ sdk/support/arm-support/package.json | 58 + sdk/support/arm-support/rollup.config.js | 37 + .../arm-support/src/microsoftSupport.ts | 50 + .../src/microsoftSupportContext.ts | 62 + .../src/models/communicationsMappers.ts | 25 + sdk/support/arm-support/src/models/index.ts | 1050 +++++++++++++++++ sdk/support/arm-support/src/models/mappers.ts | 964 +++++++++++++++ .../src/models/operationsMappers.ts | 16 + .../arm-support/src/models/parameters.ts | 117 ++ .../models/problemClassificationsMappers.ts | 15 + .../arm-support/src/models/servicesMappers.ts | 15 + .../src/models/supportTicketsMappers.ts | 27 + .../src/operations/communications.ts | 331 ++++++ .../arm-support/src/operations/index.ts | 15 + .../arm-support/src/operations/operations.ts | 74 ++ .../src/operations/problemClassifications.ts | 142 +++ .../arm-support/src/operations/services.ts | 131 ++ .../src/operations/supportTickets.ts | 415 +++++++ sdk/support/arm-support/tsconfig.json | 19 + 21 files changed, 3683 insertions(+) create mode 100644 sdk/support/arm-support/LICENSE.txt create mode 100644 sdk/support/arm-support/README.md create mode 100644 sdk/support/arm-support/package.json create mode 100644 sdk/support/arm-support/rollup.config.js create mode 100644 sdk/support/arm-support/src/microsoftSupport.ts create mode 100644 sdk/support/arm-support/src/microsoftSupportContext.ts create mode 100644 sdk/support/arm-support/src/models/communicationsMappers.ts create mode 100644 sdk/support/arm-support/src/models/index.ts create mode 100644 sdk/support/arm-support/src/models/mappers.ts create mode 100644 sdk/support/arm-support/src/models/operationsMappers.ts create mode 100644 sdk/support/arm-support/src/models/parameters.ts create mode 100644 sdk/support/arm-support/src/models/problemClassificationsMappers.ts create mode 100644 sdk/support/arm-support/src/models/servicesMappers.ts create mode 100644 sdk/support/arm-support/src/models/supportTicketsMappers.ts create mode 100644 sdk/support/arm-support/src/operations/communications.ts create mode 100644 sdk/support/arm-support/src/operations/index.ts create mode 100644 sdk/support/arm-support/src/operations/operations.ts create mode 100644 sdk/support/arm-support/src/operations/problemClassifications.ts create mode 100644 sdk/support/arm-support/src/operations/services.ts create mode 100644 sdk/support/arm-support/src/operations/supportTickets.ts create mode 100644 sdk/support/arm-support/tsconfig.json diff --git a/sdk/support/arm-support/LICENSE.txt b/sdk/support/arm-support/LICENSE.txt new file mode 100644 index 000000000000..ea8fb1516028 --- /dev/null +++ b/sdk/support/arm-support/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/support/arm-support/README.md b/sdk/support/arm-support/README.md new file mode 100644 index 000000000000..967c7b23d6d9 --- /dev/null +++ b/sdk/support/arm-support/README.md @@ -0,0 +1,99 @@ +## Azure MicrosoftSupport SDK for JavaScript + +This package contains an isomorphic SDK for MicrosoftSupport. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-support +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + +##### Sample code + +```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 { MicrosoftSupport, MicrosoftSupportModels, MicrosoftSupportMappers } from "@azure/arm-support"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new MicrosoftSupport(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-support sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/support/arm-support/README.png) diff --git a/sdk/support/arm-support/package.json b/sdk/support/arm-support/package.json new file mode 100644 index 000000000000..bf509c08ccf9 --- /dev/null +++ b/sdk/support/arm-support/package.json @@ -0,0 +1,58 @@ +{ + "name": "@azure/arm-support", + "author": "Microsoft Corporation", + "description": "MicrosoftSupport Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-support.js", + "module": "./esm/microsoftSupport.js", + "types": "./esm/microsoftSupport.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/support/arm-support", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-support.js.map'\" -o ./dist/arm-support.min.js ./dist/arm-support.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/support/arm-support/rollup.config.js b/sdk/support/arm-support/rollup.config.js new file mode 100644 index 000000000000..d1cdb7454709 --- /dev/null +++ b/sdk/support/arm-support/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/microsoftSupport.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-support.js", + format: "umd", + name: "Azure.ArmSupport", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/support/arm-support/src/microsoftSupport.ts b/sdk/support/arm-support/src/microsoftSupport.ts new file mode 100644 index 000000000000..4b52aeb0dd1e --- /dev/null +++ b/sdk/support/arm-support/src/microsoftSupport.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { MicrosoftSupportContext } from "./microsoftSupportContext"; + + +class MicrosoftSupport extends MicrosoftSupportContext { + // Operation groups + operations: operations.Operations; + services: operations.Services; + problemClassifications: operations.ProblemClassifications; + supportTickets: operations.SupportTickets; + communications: operations.Communications; + + /** + * Initializes a new instance of the MicrosoftSupport class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Azure subscription Id. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.services = new operations.Services(this); + this.problemClassifications = new operations.ProblemClassifications(this); + this.supportTickets = new operations.SupportTickets(this); + this.communications = new operations.Communications(this); + } +} + +// Operation Specifications + +export { + MicrosoftSupport, + MicrosoftSupportContext, + Models as MicrosoftSupportModels, + Mappers as MicrosoftSupportMappers +}; +export * from "./operations"; diff --git a/sdk/support/arm-support/src/microsoftSupportContext.ts b/sdk/support/arm-support/src/microsoftSupportContext.ts new file mode 100644 index 000000000000..2ba89d1d59f5 --- /dev/null +++ b/sdk/support/arm-support/src/microsoftSupportContext.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-support"; +const packageVersion = "1.0.0"; + +export class MicrosoftSupportContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the MicrosoftSupport class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Azure subscription Id. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2020-04-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/support/arm-support/src/models/communicationsMappers.ts b/sdk/support/arm-support/src/models/communicationsMappers.ts new file mode 100644 index 000000000000..1fe4bc2a7c5a --- /dev/null +++ b/sdk/support/arm-support/src/models/communicationsMappers.ts @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, + CommunicationDetails, + CommunicationsListResult, + ContactProfile, + ExceptionResponse, + QuotaChangeRequest, + QuotaTicketDetails, + ServiceError, + ServiceErrorDetail, + ServiceLevelAgreement, + SupportEngineer, + SupportTicketDetails, + TechnicalTicketDetails +} from "../models/mappers"; diff --git a/sdk/support/arm-support/src/models/index.ts b/sdk/support/arm-support/src/models/index.ts new file mode 100644 index 000000000000..0a2c2da2c521 --- /dev/null +++ b/sdk/support/arm-support/src/models/index.ts @@ -0,0 +1,1050 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + +/** + * The object that describes the operation. + */ +export interface OperationDisplay { + /** + * The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The action that users can perform, based on their permission level. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * Service provider: Microsoft Support. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * Resource on which the operation is performed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; +} + +/** + * The operation supported by Microsoft Support resource provider. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The object that describes the operation. + */ + display?: OperationDisplay; +} + +/** + * Object that represents a Service resource. + */ +export interface Service { + /** + * Id of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Type of the resource 'Microsoft.Support/services'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Localized name of the Azure service. + */ + displayName?: string; + /** + * ARM Resource types. + */ + resourceTypes?: string[]; +} + +/** + * ProblemClassification resource object. + */ +export interface ProblemClassification { + /** + * Id of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Type of the resource 'Microsoft.Support/problemClassification'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Localized name of problem classification. + */ + displayName?: string; +} + +/** + * Input of CheckNameAvailability API. + */ +export interface CheckNameAvailabilityInput { + /** + * The resource name to validate. + */ + name: string; + /** + * The type of resource. Possible values include: 'Microsoft.Support/supportTickets', + * 'Microsoft.Support/communications' + */ + type: Type; +} + +/** + * Output of check name availability API. + */ +export interface CheckNameAvailabilityOutput { + /** + * Indicates whether the name is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nameAvailable?: boolean; + /** + * The reason why the name is not available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reason?: string; + /** + * The detailed error message describing why the name is not available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; +} + +/** + * Contact information associated with the support ticket. + */ +export interface ContactProfile { + /** + * First name. + */ + firstName: string; + /** + * Last name. + */ + lastName: string; + /** + * Preferred contact method. Possible values include: 'email', 'phone' + */ + preferredContactMethod: PreferredContactMethod; + /** + * Primary email address. + */ + primaryEmailAddress: string; + /** + * Additional email addresses listed will be copied on any correspondence about the support + * ticket. + */ + additionalEmailAddresses?: string[]; + /** + * Phone number. This is required if preferred contact method is phone. + */ + phoneNumber?: string; + /** + * Time zone of the user. This is the name of the time zone from [Microsoft Time Zone Index + * Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values). + */ + preferredTimeZone: string; + /** + * Country of the user. This is the ISO 3166-1 alpha-3 code. + */ + country: string; + /** + * Preferred language of support from Azure. Support languages vary based on the severity you + * choose for your support ticket. Learn more at [Azure Severity and + * responsiveness](https://azure.microsoft.com/support/plans/response). Use the standard + * language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' + * for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for + * Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for + * German. + */ + preferredSupportLanguage: string; +} + +/** + * Service Level Agreement details for a support ticket. + */ +export interface ServiceLevelAgreement { + /** + * Time in UTC (ISO 8601 format) when the service level agreement starts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: Date; + /** + * Time in UTC (ISO 8601 format) when the service level agreement expires. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly expirationTime?: Date; + /** + * Service Level Agreement in minutes. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly slaMinutes?: number; +} + +/** + * Support engineer information. + */ +export interface SupportEngineer { + /** + * Email address of the Azure Support engineer assigned to the support ticket. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly emailAddress?: string; +} + +/** + * Additional information for technical support ticket. + */ +export interface TechnicalTicketDetails { + /** + * This is the resource Id of the Azure service resource (For example: A virtual machine resource + * or an HDInsight resource) for which the support ticket is created. + */ + resourceId?: string; +} + +/** + * This property is required for providing the region and new quota limits. + */ +export interface QuotaChangeRequest { + /** + * Region for which the quota increase request is being made. + */ + region?: string; + /** + * Payload of the quota increase request. + */ + payload?: string; +} + +/** + * Additional set of information required for quota increase support ticket for certain quota + * types, e.g.: Virtual machine cores. Get complete details about Quota payload support request + * along with examples at [Support quota request](https://aka.ms/supportrpquotarequestpayload). + */ +export interface QuotaTicketDetails { + /** + * Required for certain quota types when there is a sub type, such as Batch, for which you are + * requesting a quota increase. + */ + quotaChangeRequestSubType?: string; + /** + * Quota change request version. + */ + quotaChangeRequestVersion?: string; + /** + * This property is required for providing the region and new quota limits. + */ + quotaChangeRequests?: QuotaChangeRequest[]; +} + +/** + * Object that represents SupportTicketDetails resource. + */ +export interface SupportTicketDetails extends BaseResource { + /** + * Id of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Type of the resource 'Microsoft.Support/supportTickets'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * System generated support ticket Id that is unique. + */ + supportTicketId?: string; + /** + * Detailed description of the question or issue. + */ + description: string; + /** + * Each Azure service has its own set of issue categories, also known as problem classification. + * This parameter is the unique Id for the type of problem you are experiencing. + */ + problemClassificationId: string; + /** + * Localized name of problem classification. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly problemClassificationDisplayName?: string; + /** + * A value that indicates the urgency of the case, which in turn determines the response time + * according to the service level agreement of the technical support plan you have with Azure. + * Note: 'Highest critical impact' severity is reserved only for our Premium customers. Possible + * values include: 'minimal', 'moderate', 'critical', 'highestcriticalimpact' + */ + severity: SeverityLevel; + /** + * Enrollment Id associated with the support ticket. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly enrollmentId?: string; + /** + * Indicates if this requires a 24x7 response from Azure. + */ + require24X7Response?: boolean; + /** + * Contact information of the user requesting to create a support ticket. + */ + contactDetails: ContactProfile; + /** + * Service Level Agreement information for this support ticket. + */ + serviceLevelAgreement?: ServiceLevelAgreement; + /** + * Information about the support engineer working on this support ticket. + */ + supportEngineer?: SupportEngineer; + /** + * Support plan type associated with the support ticket. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportPlanType?: string; + /** + * Title of the support ticket. + */ + title: string; + /** + * Time in UTC (ISO 8601 format) when the problem started. + */ + problemStartTime?: Date; + /** + * This is the resource Id of the Azure service resource associated with the support ticket. + */ + serviceId: string; + /** + * Localized name of the Azure service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceDisplayName?: string; + /** + * Status of the support ticket. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * Time in UTC (ISO 8601 format) when the support ticket was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdDate?: Date; + /** + * Time in UTC (ISO 8601 format) when the support ticket was last modified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly modifiedDate?: Date; + /** + * Additional ticket details associated with a technical support ticket request. + */ + technicalTicketDetails?: TechnicalTicketDetails; + /** + * Additional ticket details associated with a quota support ticket request. + */ + quotaTicketDetails?: QuotaTicketDetails; +} + +/** + * Object that represents a Communication resource. + */ +export interface CommunicationDetails extends BaseResource { + /** + * Id of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Type of the resource 'Microsoft.Support/communications'. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Communication type. Possible values include: 'web', 'phone' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly communicationType?: CommunicationType; + /** + * Direction of communication. Possible values include: 'inbound', 'outbound' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly communicationDirection?: CommunicationDirection; + /** + * Email address of the sender. This property is required if called by a service principal. + */ + sender?: string; + /** + * Subject of the communication. + */ + subject: string; + /** + * Body of the communication. + */ + body: string; + /** + * Time in UTC (ISO 8601 format) when the communication was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdDate?: Date; +} + +/** + * The error details. + */ +export interface ServiceErrorDetail { + /** + * 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 target of the error. + */ + target?: string; +} + +/** + * The API error details. + */ +export interface ServiceError { + /** + * The error code. + */ + code?: string; + /** + * The error message. + */ + message?: string; + /** + * The target of the error. + */ + target?: string; + /** + * The list of error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ServiceErrorDetail[]; +} + +/** + * The API error. + */ +export interface ExceptionResponse { + /** + * The API error details. + */ + error?: ServiceError; +} + +/** + * Contact information associated with the support ticket. + */ +export interface UpdateContactProfile { + /** + * First name. + */ + firstName?: string; + /** + * Last name. + */ + lastName?: string; + /** + * Preferred contact method. Possible values include: 'email', 'phone' + */ + preferredContactMethod?: PreferredContactMethod; + /** + * Primary email address. + */ + primaryEmailAddress?: string; + /** + * Email addresses listed will be copied on any correspondence about the support ticket. + */ + additionalEmailAddresses?: string[]; + /** + * Phone number. This is required if preferred contact method is phone. + */ + phoneNumber?: string; + /** + * Time zone of the user. This is the name of the time zone from [Microsoft Time Zone Index + * Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values). + */ + preferredTimeZone?: string; + /** + * Country of the user. This is the ISO 3166-1 alpha-3 code. + */ + country?: string; + /** + * Preferred language of support from Azure. Support languages vary based on the severity you + * choose for your support ticket. Learn more at [Azure Severity and + * responsiveness](https://azure.microsoft.com/support/plans/response/). Use the standard + * language-country code. Valid values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' + * for Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for + * Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for + * German. + */ + preferredSupportLanguage?: string; +} + +/** + * Updates severity, ticket status, and contact details in the support ticket. + */ +export interface UpdateSupportTicket { + /** + * Severity level. Possible values include: 'minimal', 'moderate', 'critical', + * 'highestcriticalimpact' + */ + severity?: SeverityLevel; + /** + * Status to be updated on the ticket. Possible values include: 'open', 'closed' + */ + status?: Status; + /** + * Contact details to be updated on the support ticket. + */ + contactDetails?: UpdateContactProfile; +} + +/** + * Optional Parameters. + */ +export interface SupportTicketsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of values to return in the collection. Default is 25 and max is 100. + */ + top?: number; + /** + * The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn + * more](https://docs.microsoft.com/odata/concepts/queryoptions-overview). _Status_ filter can + * only be used with Equals ('eq') operator. For _CreatedDate_ filter, the supported operators + * are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters, combine + * them using the logical 'AND'. + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface CommunicationsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of values to return in the collection. Default is 10 and max is 10. + */ + top?: number; + /** + * The filter to apply on the operation. You can filter by communicationType and createdDate + * properties. CommunicationType supports Equals ('eq') operator and createdDate supports Greater + * Than ('gt') and Greater Than or Equals ('ge') operators. You may combine the CommunicationType + * and CreatedDate filters by Logical And ('and') operator. + */ + filter?: string; +} + +/** + * An interface representing MicrosoftSupportOptions. + */ +export interface MicrosoftSupportOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * @interface + * The list of operations supported by Microsoft Support resource provider. + * @extends Array + */ +export interface OperationsListResult extends Array { +} + +/** + * @interface + * Collection of Service resources. + * @extends Array + */ +export interface ServicesListResult extends Array { +} + +/** + * @interface + * Collection of ProblemClassification resources. + * @extends Array + */ +export interface ProblemClassificationsListResult extends Array { +} + +/** + * @interface + * Object that represents a collection of SupportTicket resources. + * @extends Array + */ +export interface SupportTicketsListResult extends Array { + /** + * The URI to fetch the next page of SupportTicket resources. + */ + nextLink?: string; +} + +/** + * @interface + * Collection of Communication resources. + * @extends Array + */ +export interface CommunicationsListResult extends Array { + /** + * The URI to fetch the next page of Communication resources. + */ + nextLink?: string; +} + +/** + * Defines values for Type. + * Possible values include: 'Microsoft.Support/supportTickets', 'Microsoft.Support/communications' + * @readonly + * @enum {string} + */ +export type Type = 'Microsoft.Support/supportTickets' | 'Microsoft.Support/communications'; + +/** + * Defines values for SeverityLevel. + * Possible values include: 'minimal', 'moderate', 'critical', 'highestcriticalimpact' + * @readonly + * @enum {string} + */ +export type SeverityLevel = 'minimal' | 'moderate' | 'critical' | 'highestcriticalimpact'; + +/** + * Defines values for PreferredContactMethod. + * Possible values include: 'email', 'phone' + * @readonly + * @enum {string} + */ +export type PreferredContactMethod = 'email' | 'phone'; + +/** + * Defines values for CommunicationType. + * Possible values include: 'web', 'phone' + * @readonly + * @enum {string} + */ +export type CommunicationType = 'web' | 'phone'; + +/** + * Defines values for CommunicationDirection. + * Possible values include: 'inbound', 'outbound' + * @readonly + * @enum {string} + */ +export type CommunicationDirection = 'inbound' | 'outbound'; + +/** + * Defines values for Status. + * Possible values include: 'open', 'closed' + * @readonly + * @enum {string} + */ +export type Status = 'open' | 'closed'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationsListResult & { + /** + * 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: OperationsListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ServicesListResponse = ServicesListResult & { + /** + * 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: ServicesListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ServicesGetResponse = Service & { + /** + * 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: Service; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ProblemClassificationsListResponse = ProblemClassificationsListResult & { + /** + * 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: ProblemClassificationsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ProblemClassificationsGetResponse = ProblemClassification & { + /** + * 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: ProblemClassification; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type SupportTicketsCheckNameAvailabilityResponse = CheckNameAvailabilityOutput & { + /** + * 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: CheckNameAvailabilityOutput; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SupportTicketsListResponse = SupportTicketsListResult & { + /** + * 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: SupportTicketsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SupportTicketsGetResponse = SupportTicketDetails & { + /** + * 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: SupportTicketDetails; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type SupportTicketsUpdateResponse = SupportTicketDetails & { + /** + * 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: SupportTicketDetails; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type SupportTicketsCreateResponse = SupportTicketDetails & { + /** + * 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: SupportTicketDetails; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type SupportTicketsBeginCreateResponse = SupportTicketDetails & { + /** + * 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: SupportTicketDetails; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SupportTicketsListNextResponse = SupportTicketsListResult & { + /** + * 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: SupportTicketsListResult; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type CommunicationsCheckNameAvailabilityResponse = CheckNameAvailabilityOutput & { + /** + * 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: CheckNameAvailabilityOutput; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type CommunicationsListResponse = CommunicationsListResult & { + /** + * 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: CommunicationsListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CommunicationsGetResponse = CommunicationDetails & { + /** + * 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: CommunicationDetails; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type CommunicationsCreateResponse = CommunicationDetails & { + /** + * 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: CommunicationDetails; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type CommunicationsBeginCreateResponse = CommunicationDetails & { + /** + * 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: CommunicationDetails; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type CommunicationsListNextResponse = CommunicationsListResult & { + /** + * 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: CommunicationsListResult; + }; +}; diff --git a/sdk/support/arm-support/src/models/mappers.ts b/sdk/support/arm-support/src/models/mappers.ts new file mode 100644 index 000000000000..548fdd7e7103 --- /dev/null +++ b/sdk/support/arm-support/src/models/mappers.ts @@ -0,0 +1,964 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "operation", + type: { + name: "String" + } + }, + provider: { + readOnly: true, + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "resource", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const Service: msRest.CompositeMapper = { + serializedName: "Service", + type: { + name: "Composite", + className: "Service", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + resourceTypes: { + serializedName: "properties.resourceTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ProblemClassification: msRest.CompositeMapper = { + serializedName: "ProblemClassification", + type: { + name: "Composite", + className: "ProblemClassification", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityInput: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityInput", + type: { + name: "Composite", + className: "CheckNameAvailabilityInput", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "Microsoft.Support/supportTickets", + "Microsoft.Support/communications" + ] + } + } + } + } +}; + +export const CheckNameAvailabilityOutput: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityOutput", + type: { + name: "Composite", + className: "CheckNameAvailabilityOutput", + modelProperties: { + nameAvailable: { + readOnly: true, + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ContactProfile: msRest.CompositeMapper = { + serializedName: "ContactProfile", + type: { + name: "Composite", + className: "ContactProfile", + modelProperties: { + firstName: { + required: true, + serializedName: "firstName", + type: { + name: "String" + } + }, + lastName: { + required: true, + serializedName: "lastName", + type: { + name: "String" + } + }, + preferredContactMethod: { + required: true, + serializedName: "preferredContactMethod", + type: { + name: "String" + } + }, + primaryEmailAddress: { + required: true, + serializedName: "primaryEmailAddress", + type: { + name: "String" + } + }, + additionalEmailAddresses: { + serializedName: "additionalEmailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + phoneNumber: { + serializedName: "phoneNumber", + type: { + name: "String" + } + }, + preferredTimeZone: { + required: true, + serializedName: "preferredTimeZone", + type: { + name: "String" + } + }, + country: { + required: true, + serializedName: "country", + type: { + name: "String" + } + }, + preferredSupportLanguage: { + required: true, + serializedName: "preferredSupportLanguage", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceLevelAgreement: msRest.CompositeMapper = { + serializedName: "ServiceLevelAgreement", + type: { + name: "Composite", + className: "ServiceLevelAgreement", + modelProperties: { + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + expirationTime: { + readOnly: true, + serializedName: "expirationTime", + type: { + name: "DateTime" + } + }, + slaMinutes: { + readOnly: true, + serializedName: "slaMinutes", + type: { + name: "Number" + } + } + } + } +}; + +export const SupportEngineer: msRest.CompositeMapper = { + serializedName: "SupportEngineer", + type: { + name: "Composite", + className: "SupportEngineer", + modelProperties: { + emailAddress: { + readOnly: true, + serializedName: "emailAddress", + type: { + name: "String" + } + } + } + } +}; + +export const TechnicalTicketDetails: msRest.CompositeMapper = { + serializedName: "TechnicalTicketDetails", + type: { + name: "Composite", + className: "TechnicalTicketDetails", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const QuotaChangeRequest: msRest.CompositeMapper = { + serializedName: "QuotaChangeRequest", + type: { + name: "Composite", + className: "QuotaChangeRequest", + modelProperties: { + region: { + serializedName: "region", + type: { + name: "String" + } + }, + payload: { + serializedName: "payload", + type: { + name: "String" + } + } + } + } +}; + +export const QuotaTicketDetails: msRest.CompositeMapper = { + serializedName: "QuotaTicketDetails", + type: { + name: "Composite", + className: "QuotaTicketDetails", + modelProperties: { + quotaChangeRequestSubType: { + serializedName: "quotaChangeRequestSubType", + type: { + name: "String" + } + }, + quotaChangeRequestVersion: { + serializedName: "quotaChangeRequestVersion", + type: { + name: "String" + } + }, + quotaChangeRequests: { + serializedName: "quotaChangeRequests", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QuotaChangeRequest" + } + } + } + } + } + } +}; + +export const SupportTicketDetails: msRest.CompositeMapper = { + serializedName: "SupportTicketDetails", + type: { + name: "Composite", + className: "SupportTicketDetails", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + supportTicketId: { + serializedName: "properties.supportTicketId", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "properties.description", + type: { + name: "String" + } + }, + problemClassificationId: { + required: true, + serializedName: "properties.problemClassificationId", + type: { + name: "String" + } + }, + problemClassificationDisplayName: { + readOnly: true, + serializedName: "properties.problemClassificationDisplayName", + type: { + name: "String" + } + }, + severity: { + required: true, + serializedName: "properties.severity", + type: { + name: "String" + } + }, + enrollmentId: { + readOnly: true, + serializedName: "properties.enrollmentId", + type: { + name: "String" + } + }, + require24X7Response: { + serializedName: "properties.require24X7Response", + type: { + name: "Boolean" + } + }, + contactDetails: { + required: true, + serializedName: "properties.contactDetails", + type: { + name: "Composite", + className: "ContactProfile" + } + }, + serviceLevelAgreement: { + serializedName: "properties.serviceLevelAgreement", + type: { + name: "Composite", + className: "ServiceLevelAgreement" + } + }, + supportEngineer: { + serializedName: "properties.supportEngineer", + type: { + name: "Composite", + className: "SupportEngineer" + } + }, + supportPlanType: { + readOnly: true, + serializedName: "properties.supportPlanType", + type: { + name: "String" + } + }, + title: { + required: true, + serializedName: "properties.title", + type: { + name: "String" + } + }, + problemStartTime: { + serializedName: "properties.problemStartTime", + type: { + name: "DateTime" + } + }, + serviceId: { + required: true, + serializedName: "properties.serviceId", + type: { + name: "String" + } + }, + serviceDisplayName: { + readOnly: true, + serializedName: "properties.serviceDisplayName", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + createdDate: { + readOnly: true, + serializedName: "properties.createdDate", + type: { + name: "DateTime" + } + }, + modifiedDate: { + readOnly: true, + serializedName: "properties.modifiedDate", + type: { + name: "DateTime" + } + }, + technicalTicketDetails: { + serializedName: "properties.technicalTicketDetails", + type: { + name: "Composite", + className: "TechnicalTicketDetails" + } + }, + quotaTicketDetails: { + serializedName: "properties.quotaTicketDetails", + type: { + name: "Composite", + className: "QuotaTicketDetails" + } + } + } + } +}; + +export const CommunicationDetails: msRest.CompositeMapper = { + serializedName: "CommunicationDetails", + type: { + name: "Composite", + className: "CommunicationDetails", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + communicationType: { + readOnly: true, + serializedName: "properties.communicationType", + type: { + name: "String" + } + }, + communicationDirection: { + readOnly: true, + serializedName: "properties.communicationDirection", + type: { + name: "String" + } + }, + sender: { + serializedName: "properties.sender", + type: { + name: "String" + } + }, + subject: { + required: true, + serializedName: "properties.subject", + type: { + name: "String" + } + }, + body: { + required: true, + serializedName: "properties.body", + type: { + name: "String" + } + }, + createdDate: { + readOnly: true, + serializedName: "properties.createdDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ServiceErrorDetail: msRest.CompositeMapper = { + serializedName: "ServiceErrorDetail", + type: { + name: "Composite", + className: "ServiceErrorDetail", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceError: msRest.CompositeMapper = { + serializedName: "ServiceError", + type: { + name: "Composite", + className: "ServiceError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceErrorDetail" + } + } + } + } + } + } +}; + +export const ExceptionResponse: msRest.CompositeMapper = { + serializedName: "ExceptionResponse", + type: { + name: "Composite", + className: "ExceptionResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ServiceError" + } + } + } + } +}; + +export const UpdateContactProfile: msRest.CompositeMapper = { + serializedName: "UpdateContactProfile", + type: { + name: "Composite", + className: "UpdateContactProfile", + modelProperties: { + firstName: { + serializedName: "firstName", + type: { + name: "String" + } + }, + lastName: { + serializedName: "lastName", + type: { + name: "String" + } + }, + preferredContactMethod: { + serializedName: "preferredContactMethod", + type: { + name: "String" + } + }, + primaryEmailAddress: { + serializedName: "primaryEmailAddress", + type: { + name: "String" + } + }, + additionalEmailAddresses: { + serializedName: "additionalEmailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + phoneNumber: { + serializedName: "phoneNumber", + type: { + name: "String" + } + }, + preferredTimeZone: { + serializedName: "preferredTimeZone", + type: { + name: "String" + } + }, + country: { + serializedName: "country", + type: { + name: "String" + } + }, + preferredSupportLanguage: { + serializedName: "preferredSupportLanguage", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateSupportTicket: msRest.CompositeMapper = { + serializedName: "UpdateSupportTicket", + type: { + name: "Composite", + className: "UpdateSupportTicket", + modelProperties: { + severity: { + serializedName: "severity", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + contactDetails: { + serializedName: "contactDetails", + type: { + name: "Composite", + className: "UpdateContactProfile" + } + } + } + } +}; + +export const OperationsListResult: msRest.CompositeMapper = { + serializedName: "OperationsListResult", + type: { + name: "Composite", + className: "OperationsListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + } + } + } +}; + +export const ServicesListResult: msRest.CompositeMapper = { + serializedName: "ServicesListResult", + type: { + name: "Composite", + className: "ServicesListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Service" + } + } + } + } + } + } +}; + +export const ProblemClassificationsListResult: msRest.CompositeMapper = { + serializedName: "ProblemClassificationsListResult", + type: { + name: "Composite", + className: "ProblemClassificationsListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProblemClassification" + } + } + } + } + } + } +}; + +export const SupportTicketsListResult: msRest.CompositeMapper = { + serializedName: "SupportTicketsListResult", + type: { + name: "Composite", + className: "SupportTicketsListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SupportTicketDetails" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CommunicationsListResult: msRest.CompositeMapper = { + serializedName: "CommunicationsListResult", + type: { + name: "Composite", + className: "CommunicationsListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CommunicationDetails" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/support/arm-support/src/models/operationsMappers.ts b/sdk/support/arm-support/src/models/operationsMappers.ts new file mode 100644 index 000000000000..b6e72b14c6ce --- /dev/null +++ b/sdk/support/arm-support/src/models/operationsMappers.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ExceptionResponse, + Operation, + OperationDisplay, + OperationsListResult, + ServiceError, + ServiceErrorDetail +} from "../models/mappers"; diff --git a/sdk/support/arm-support/src/models/parameters.ts b/sdk/support/arm-support/src/models/parameters.ts new file mode 100644 index 000000000000..aafb28438615 --- /dev/null +++ b/sdk/support/arm-support/src/models/parameters.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const communicationName: msRest.OperationURLParameter = { + parameterPath: "communicationName", + mapper: { + required: true, + serializedName: "communicationName", + type: { + name: "String" + } + } +}; +export const filter: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const problemClassificationName: msRest.OperationURLParameter = { + parameterPath: "problemClassificationName", + mapper: { + required: true, + serializedName: "problemClassificationName", + type: { + name: "String" + } + } +}; +export const serviceName: msRest.OperationURLParameter = { + parameterPath: "serviceName", + mapper: { + required: true, + serializedName: "serviceName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const supportTicketName: msRest.OperationURLParameter = { + parameterPath: "supportTicketName", + mapper: { + required: true, + serializedName: "supportTicketName", + type: { + name: "String" + } + } +}; +export const top: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "top" + ], + mapper: { + serializedName: "$top", + type: { + name: "Number" + } + } +}; diff --git a/sdk/support/arm-support/src/models/problemClassificationsMappers.ts b/sdk/support/arm-support/src/models/problemClassificationsMappers.ts new file mode 100644 index 000000000000..0df8bd073f1f --- /dev/null +++ b/sdk/support/arm-support/src/models/problemClassificationsMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ExceptionResponse, + ProblemClassification, + ProblemClassificationsListResult, + ServiceError, + ServiceErrorDetail +} from "../models/mappers"; diff --git a/sdk/support/arm-support/src/models/servicesMappers.ts b/sdk/support/arm-support/src/models/servicesMappers.ts new file mode 100644 index 000000000000..69ec00ba73a6 --- /dev/null +++ b/sdk/support/arm-support/src/models/servicesMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + ExceptionResponse, + Service, + ServiceError, + ServiceErrorDetail, + ServicesListResult +} from "../models/mappers"; diff --git a/sdk/support/arm-support/src/models/supportTicketsMappers.ts b/sdk/support/arm-support/src/models/supportTicketsMappers.ts new file mode 100644 index 000000000000..25fe954adb6c --- /dev/null +++ b/sdk/support/arm-support/src/models/supportTicketsMappers.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, + CommunicationDetails, + ContactProfile, + ExceptionResponse, + QuotaChangeRequest, + QuotaTicketDetails, + ServiceError, + ServiceErrorDetail, + ServiceLevelAgreement, + SupportEngineer, + SupportTicketDetails, + SupportTicketsListResult, + TechnicalTicketDetails, + UpdateContactProfile, + UpdateSupportTicket +} from "../models/mappers"; diff --git a/sdk/support/arm-support/src/operations/communications.ts b/sdk/support/arm-support/src/operations/communications.ts new file mode 100644 index 000000000000..ce7693cb8649 --- /dev/null +++ b/sdk/support/arm-support/src/operations/communications.ts @@ -0,0 +1,331 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +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/communicationsMappers"; +import * as Parameters from "../models/parameters"; +import { MicrosoftSupportContext } from "../microsoftSupportContext"; + +/** Class representing a Communications. */ +export class Communications { + private readonly client: MicrosoftSupportContext; + + /** + * Create a Communications. + * @param {MicrosoftSupportContext} client Reference to the service client. + */ + constructor(client: MicrosoftSupportContext) { + this.client = client; + } + + /** + * Check the availability of a resource name. This API should be used to check the uniqueness of + * the name for adding a new communication to the support ticket. + * @param supportTicketName Support ticket name. + * @param checkNameAvailabilityInput Input to check. + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(supportTicketName: string, checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param supportTicketName Support ticket name. + * @param checkNameAvailabilityInput Input to check. + * @param callback The callback + */ + checkNameAvailability(supportTicketName: string, checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; + /** + * @param supportTicketName Support ticket name. + * @param checkNameAvailabilityInput Input to check. + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(supportTicketName: string, checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(supportTicketName: string, checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + supportTicketName, + checkNameAvailabilityInput, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Lists all communications (attachments not included) for a support ticket.

You can + * also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the + * $filter parameter. The only type of communication supported today is _Web_. Output will be a + * paged result with _nextLink_, using which you can retrieve the next set of Communication + * results.

Support ticket data is available for 12 months after ticket creation. If a + * ticket was created more than 12 months ago, a request for data might cause an error. + * @param supportTicketName Support ticket name. + * @param [options] The optional parameters + * @returns Promise + */ + list(supportTicketName: string, options?: Models.CommunicationsListOptionalParams): Promise; + /** + * @param supportTicketName Support ticket name. + * @param callback The callback + */ + list(supportTicketName: string, callback: msRest.ServiceCallback): void; + /** + * @param supportTicketName Support ticket name. + * @param options The optional parameters + * @param callback The callback + */ + list(supportTicketName: string, options: Models.CommunicationsListOptionalParams, callback: msRest.ServiceCallback): void; + list(supportTicketName: string, options?: Models.CommunicationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + supportTicketName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns communication details for a support ticket. + * @param supportTicketName Support ticket name. + * @param communicationName Communication name. + * @param [options] The optional parameters + * @returns Promise + */ + get(supportTicketName: string, communicationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param supportTicketName Support ticket name. + * @param communicationName Communication name. + * @param callback The callback + */ + get(supportTicketName: string, communicationName: string, callback: msRest.ServiceCallback): void; + /** + * @param supportTicketName Support ticket name. + * @param communicationName Communication name. + * @param options The optional parameters + * @param callback The callback + */ + get(supportTicketName: string, communicationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(supportTicketName: string, communicationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + supportTicketName, + communicationName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Adds a new customer communication to an Azure support ticket. + * @param supportTicketName Support ticket name. + * @param communicationName Communication name. + * @param createCommunicationParameters Communication object. + * @param [options] The optional parameters + * @returns Promise + */ + create(supportTicketName: string, communicationName: string, createCommunicationParameters: Models.CommunicationDetails, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(supportTicketName,communicationName,createCommunicationParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Adds a new customer communication to an Azure support ticket. + * @param supportTicketName Support ticket name. + * @param communicationName Communication name. + * @param createCommunicationParameters Communication object. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(supportTicketName: string, communicationName: string, createCommunicationParameters: Models.CommunicationDetails, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + supportTicketName, + communicationName, + createCommunicationParameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Lists all communications (attachments not included) for a support ticket.

You can + * also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the + * $filter parameter. The only type of communication supported today is _Web_. Output will be a + * paged result with _nextLink_, using which you can retrieve the next set of Communication + * results.

Support ticket data is available for 12 months after ticket creation. If a + * ticket was created more than 12 months ago, a request for data might cause an error. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/checkNameAvailability", + urlParameters: [ + Parameters.supportTicketName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "checkNameAvailabilityInput", + mapper: { + ...Mappers.CheckNameAvailabilityInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityOutput + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications", + urlParameters: [ + Parameters.supportTicketName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationsListResult + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}", + urlParameters: [ + Parameters.supportTicketName, + Parameters.communicationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationDetails + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}/communications/{communicationName}", + urlParameters: [ + Parameters.supportTicketName, + Parameters.communicationName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "createCommunicationParameters", + mapper: { + ...Mappers.CommunicationDetails, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CommunicationDetails + }, + 202: {}, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CommunicationsListResult + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; diff --git a/sdk/support/arm-support/src/operations/index.ts b/sdk/support/arm-support/src/operations/index.ts new file mode 100644 index 000000000000..c3dc4a3c928e --- /dev/null +++ b/sdk/support/arm-support/src/operations/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./operations"; +export * from "./services"; +export * from "./problemClassifications"; +export * from "./supportTickets"; +export * from "./communications"; diff --git a/sdk/support/arm-support/src/operations/operations.ts b/sdk/support/arm-support/src/operations/operations.ts new file mode 100644 index 000000000000..a92e538c1c82 --- /dev/null +++ b/sdk/support/arm-support/src/operations/operations.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { MicrosoftSupportContext } from "../microsoftSupportContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: MicrosoftSupportContext; + + /** + * Create a Operations. + * @param {MicrosoftSupportContext} client Reference to the service client. + */ + constructor(client: MicrosoftSupportContext) { + this.client = client; + } + + /** + * This lists all the available Microsoft Support REST API operations. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Support/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationsListResult + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; diff --git a/sdk/support/arm-support/src/operations/problemClassifications.ts b/sdk/support/arm-support/src/operations/problemClassifications.ts new file mode 100644 index 000000000000..a853ea0add74 --- /dev/null +++ b/sdk/support/arm-support/src/operations/problemClassifications.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/problemClassificationsMappers"; +import * as Parameters from "../models/parameters"; +import { MicrosoftSupportContext } from "../microsoftSupportContext"; + +/** Class representing a ProblemClassifications. */ +export class ProblemClassifications { + private readonly client: MicrosoftSupportContext; + + /** + * Create a ProblemClassifications. + * @param {MicrosoftSupportContext} client Reference to the service client. + */ + constructor(client: MicrosoftSupportContext) { + this.client = client; + } + + /** + * Lists all the problem classifications (categories) available for a specific Azure service. + * Always use the service and problem classifications obtained programmatically. This practice + * ensures that you always have the most recent set of service and problem classification Ids. + * @param serviceName Name of the Azure service for which the problem classifications need to be + * retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + list(serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param serviceName Name of the Azure service for which the problem classifications need to be + * retrieved. + * @param callback The callback + */ + list(serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @param serviceName Name of the Azure service for which the problem classifications need to be + * retrieved. + * @param options The optional parameters + * @param callback The callback + */ + list(serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + serviceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get problem classification details for a specific Azure service. + * @param serviceName Name of the Azure service available for support. + * @param problemClassificationName Name of problem classification. + * @param [options] The optional parameters + * @returns Promise + */ + get(serviceName: string, problemClassificationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param serviceName Name of the Azure service available for support. + * @param problemClassificationName Name of problem classification. + * @param callback The callback + */ + get(serviceName: string, problemClassificationName: string, callback: msRest.ServiceCallback): void; + /** + * @param serviceName Name of the Azure service available for support. + * @param problemClassificationName Name of problem classification. + * @param options The optional parameters + * @param callback The callback + */ + get(serviceName: string, problemClassificationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(serviceName: string, problemClassificationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + serviceName, + problemClassificationName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Support/services/{serviceName}/problemClassifications", + urlParameters: [ + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProblemClassificationsListResult + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Support/services/{serviceName}/problemClassifications/{problemClassificationName}", + urlParameters: [ + Parameters.serviceName, + Parameters.problemClassificationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProblemClassification + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; diff --git a/sdk/support/arm-support/src/operations/services.ts b/sdk/support/arm-support/src/operations/services.ts new file mode 100644 index 000000000000..c7d891a03a0d --- /dev/null +++ b/sdk/support/arm-support/src/operations/services.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/servicesMappers"; +import * as Parameters from "../models/parameters"; +import { MicrosoftSupportContext } from "../microsoftSupportContext"; + +/** Class representing a Services. */ +export class Services { + private readonly client: MicrosoftSupportContext; + + /** + * Create a Services. + * @param {MicrosoftSupportContext} client Reference to the service client. + */ + constructor(client: MicrosoftSupportContext) { + this.client = client; + } + + /** + * Lists all the Azure services available for support ticket creation. For **Technical** issues, + * select the Service Id that maps to the Azure service/product as displayed in the **Services** + * drop-down list on the Azure portal's [New support + * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) + * page. Always use the service and its corresponding problem classification(s) obtained + * programmatically for support ticket creation. This practice ensures that you always have the + * most recent set of service and problem classification Ids. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a specific Azure service for support ticket creation. + * @param serviceName Name of the Azure service. + * @param [options] The optional parameters + * @returns Promise + */ + get(serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param serviceName Name of the Azure service. + * @param callback The callback + */ + get(serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @param serviceName Name of the Azure service. + * @param options The optional parameters + * @param callback The callback + */ + get(serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + serviceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Support/services", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServicesListResult + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Support/services/{serviceName}", + urlParameters: [ + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Service + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; diff --git a/sdk/support/arm-support/src/operations/supportTickets.ts b/sdk/support/arm-support/src/operations/supportTickets.ts new file mode 100644 index 000000000000..b6c2eeb6c063 --- /dev/null +++ b/sdk/support/arm-support/src/operations/supportTickets.ts @@ -0,0 +1,415 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +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/supportTicketsMappers"; +import * as Parameters from "../models/parameters"; +import { MicrosoftSupportContext } from "../microsoftSupportContext"; + +/** Class representing a SupportTickets. */ +export class SupportTickets { + private readonly client: MicrosoftSupportContext; + + /** + * Create a SupportTickets. + * @param {MicrosoftSupportContext} client Reference to the service client. + */ + constructor(client: MicrosoftSupportContext) { + this.client = client; + } + + /** + * Check the availability of a resource name. This API should be used to check the uniqueness of + * the name for support ticket creation for the selected subscription. + * @param checkNameAvailabilityInput Input to check. + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param checkNameAvailabilityInput Input to check. + * @param callback The callback + */ + checkNameAvailability(checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; + /** + * @param checkNameAvailabilityInput Input to check. + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(checkNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + checkNameAvailabilityInput, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + + /** + * Lists all the support tickets for an Azure subscription. You can also filter the support tickets + * by _Status_ or _CreatedDate_ using the $filter parameter. Output will be a paged result with + * _nextLink_, using which you can retrieve the next set of support tickets.

Support + * ticket data is available for 12 months after ticket creation. If a ticket was created more than + * 12 months ago, a request for data might cause an error. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.SupportTicketsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.SupportTicketsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.SupportTicketsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get ticket details for an Azure subscription. Support ticket data is available for 12 months + * after ticket creation. If a ticket was created more than 12 months ago, a request for data might + * cause an error. + * @param supportTicketName Support ticket name. + * @param [options] The optional parameters + * @returns Promise + */ + get(supportTicketName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param supportTicketName Support ticket name. + * @param callback The callback + */ + get(supportTicketName: string, callback: msRest.ServiceCallback): void; + /** + * @param supportTicketName Support ticket name. + * @param options The optional parameters + * @param callback The callback + */ + get(supportTicketName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(supportTicketName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + supportTicketName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * This API allows you to update the severity level, ticket status, and your contact information in + * the support ticket.

Note: The severity levels cannot be changed if a support ticket is + * actively being worked upon by an Azure support engineer. In such a case, contact your support + * engineer to request severity update by adding a new communication using the Communications + * API.

Changing the ticket status to _closed_ is allowed only on an unassigned case. When + * an engineer is actively working on the ticket, send your ticket closure request by sending a + * note to your engineer. + * @param supportTicketName Support ticket name. + * @param updateSupportTicket UpdateSupportTicket object. + * @param [options] The optional parameters + * @returns Promise + */ + update(supportTicketName: string, updateSupportTicket: Models.UpdateSupportTicket, options?: msRest.RequestOptionsBase): Promise; + /** + * @param supportTicketName Support ticket name. + * @param updateSupportTicket UpdateSupportTicket object. + * @param callback The callback + */ + update(supportTicketName: string, updateSupportTicket: Models.UpdateSupportTicket, callback: msRest.ServiceCallback): void; + /** + * @param supportTicketName Support ticket name. + * @param updateSupportTicket UpdateSupportTicket object. + * @param options The optional parameters + * @param callback The callback + */ + update(supportTicketName: string, updateSupportTicket: Models.UpdateSupportTicket, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(supportTicketName: string, updateSupportTicket: Models.UpdateSupportTicket, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + supportTicketName, + updateSupportTicket, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, + * and Subscription Management issues for the specified subscription. Learn the + * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.

Always + * call the Services and ProblemClassifications API to get the most recent set of services and + * problem categories required for support ticket creation.

Adding attachments is not + * currently supported via the API. To add a file to an existing support ticket, visit the [Manage + * support + * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) + * page in the Azure portal, select the support ticket, and use the file upload control to add a + * new file.

Providing consent to share diagnostic information with Azure support is + * currently not supported via the API. The Azure support engineer working on your ticket will + * reach out to you for consent if your issue requires gathering diagnostic information from your + * Azure resources.

**Creating a support ticket for on-behalf-of**: Include + * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per + * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). + * The primary token will be from the tenant for whom a support ticket is being raised against the + * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be + * from the Cloud solution provider (CSP) partner tenant. + * @param supportTicketName Support ticket name. + * @param createSupportTicketParameters Support ticket request payload. + * @param [options] The optional parameters + * @returns Promise + */ + create(supportTicketName: string, createSupportTicketParameters: Models.SupportTicketDetails, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(supportTicketName,createSupportTicketParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, + * and Subscription Management issues for the specified subscription. Learn the + * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.

Always + * call the Services and ProblemClassifications API to get the most recent set of services and + * problem categories required for support ticket creation.

Adding attachments is not + * currently supported via the API. To add a file to an existing support ticket, visit the [Manage + * support + * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest) + * page in the Azure portal, select the support ticket, and use the file upload control to add a + * new file.

Providing consent to share diagnostic information with Azure support is + * currently not supported via the API. The Azure support engineer working on your ticket will + * reach out to you for consent if your issue requires gathering diagnostic information from your + * Azure resources.

**Creating a support ticket for on-behalf-of**: Include + * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per + * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant). + * The primary token will be from the tenant for whom a support ticket is being raised against the + * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be + * from the Cloud solution provider (CSP) partner tenant. + * @param supportTicketName Support ticket name. + * @param createSupportTicketParameters Support ticket request payload. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(supportTicketName: string, createSupportTicketParameters: Models.SupportTicketDetails, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + supportTicketName, + createSupportTicketParameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Lists all the support tickets for an Azure subscription. You can also filter the support tickets + * by _Status_ or _CreatedDate_ using the $filter parameter. Output will be a paged result with + * _nextLink_, using which you can retrieve the next set of support tickets.

Support + * ticket data is available for 12 months after ticket creation. If a ticket was created more than + * 12 months ago, a request for data might cause an error. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "checkNameAvailabilityInput", + mapper: { + ...Mappers.CheckNameAvailabilityInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityOutput + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SupportTicketsListResult + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}", + urlParameters: [ + Parameters.supportTicketName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SupportTicketDetails + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}", + urlParameters: [ + Parameters.supportTicketName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "updateSupportTicket", + mapper: { + ...Mappers.UpdateSupportTicket, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SupportTicketDetails + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}", + urlParameters: [ + Parameters.supportTicketName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "createSupportTicketParameters", + mapper: { + ...Mappers.SupportTicketDetails, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SupportTicketDetails + }, + 202: {}, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SupportTicketsListResult + }, + default: { + bodyMapper: Mappers.ExceptionResponse + } + }, + serializer +}; diff --git a/sdk/support/arm-support/tsconfig.json b/sdk/support/arm-support/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/support/arm-support/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +}