@azure/arm-serialconsole 2.1.1-alpha.20250718.1 → 2.1.1-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"serialPorts.js","sourceRoot":"","sources":["../../../src/operations/serialPorts.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAiBtD,+CAA+C;AAC/C,MAAa,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,iBAAyB,EACzB,yBAAiC,EACjC,kBAA0B,EAC1B,cAAsB,EACtB,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,yBAAyB;YACzB,kBAAkB;YAClB,cAAc;YACd,OAAO;SACR,EACD,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CACD,iBAAyB,EACzB,yBAAiC,EACjC,kBAA0B,EAC1B,cAAsB,EACtB,UAAkB,EAClB,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,yBAAyB;YACzB,kBAAkB;YAClB,cAAc;YACd,UAAU;YACV,OAAO;SACR,EACD,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,iBAAyB,EACzB,yBAAiC,EACjC,kBAA0B,EAC1B,cAAsB,EACtB,UAAkB,EAClB,UAAsB,EACtB,OAAyC;QAEzC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,yBAAyB;YACzB,kBAAkB;YAClB,cAAc;YACd,UAAU;YACV,UAAU;YACV,OAAO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C,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { SerialPorts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSerialConsoleClient } from \"../microsoftSerialConsoleClient.js\";\nimport {\n SerialPortsListOptionalParams,\n SerialPortsListResponse,\n SerialPortsGetOptionalParams,\n SerialPortsGetResponse,\n SerialPort,\n SerialPortsCreateOptionalParams,\n SerialPortsCreateResponse,\n SerialPortsDeleteOptionalParams,\n SerialPortsListBySubscriptionsOptionalParams,\n SerialPortsListBySubscriptionsResponse,\n SerialPortsConnectOptionalParams,\n SerialPortsConnectResponse\n} from \"../models/index.js\";\n\n/** Class containing SerialPorts operations. */\nexport class SerialPortsImpl implements SerialPorts {\n private readonly client: MicrosoftSerialConsoleClient;\n\n /**\n * Initialize a new instance of the class SerialPorts class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSerialConsoleClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the configured serial ports for a parent resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param options The options parameters.\n */\n list(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n options?: SerialPortsListOptionalParams\n ): Promise<SerialPortsListResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n options\n },\n listOperationSpec\n );\n }\n\n /**\n * Gets the configured settings for a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsGetOptionalParams\n ): Promise<SerialPortsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to create.\n * @param parameters Parameters supplied to create the serial port.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n parameters: SerialPort,\n options?: SerialPortsCreateOptionalParams\n ): Promise<SerialPortsCreateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n parameters,\n options\n },\n createOperationSpec\n );\n }\n\n /**\n * Deletes a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to delete.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n deleteOperationSpec\n );\n }\n\n /**\n * Handles requests to list all SerialPort resources in a subscription.\n * @param options The options parameters.\n */\n listBySubscriptions(\n options?: SerialPortsListBySubscriptionsOptionalParams\n ): Promise<SerialPortsListBySubscriptionsResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionsOperationSpec\n );\n }\n\n /**\n * Connect to serial port of the target resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n connect(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsConnectOptionalParams\n ): Promise<SerialPortsConnectResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n connectOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst connectOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}/connect\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortConnectResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"serialPorts.js","sourceRoot":"","sources":["../../../src/operations/serialPorts.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAA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E,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { SerialPorts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSerialConsoleClient } from \"../microsoftSerialConsoleClient.js\";\nimport {\n SerialPortsListOptionalParams,\n SerialPortsListResponse,\n SerialPortsGetOptionalParams,\n SerialPortsGetResponse,\n SerialPort,\n SerialPortsCreateOptionalParams,\n SerialPortsCreateResponse,\n SerialPortsDeleteOptionalParams,\n SerialPortsListBySubscriptionsOptionalParams,\n SerialPortsListBySubscriptionsResponse,\n SerialPortsConnectOptionalParams,\n SerialPortsConnectResponse\n} from \"../models/index.js\";\n\n/** Class containing SerialPorts operations. */\nexport class SerialPortsImpl implements SerialPorts {\n private readonly client: MicrosoftSerialConsoleClient;\n\n /**\n * Initialize a new instance of the class SerialPorts class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSerialConsoleClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the configured serial ports for a parent resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param options The options parameters.\n */\n list(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n options?: SerialPortsListOptionalParams\n ): Promise<SerialPortsListResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n options\n },\n listOperationSpec\n );\n }\n\n /**\n * Gets the configured settings for a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsGetOptionalParams\n ): Promise<SerialPortsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to create.\n * @param parameters Parameters supplied to create the serial port.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n parameters: SerialPort,\n options?: SerialPortsCreateOptionalParams\n ): Promise<SerialPortsCreateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n parameters,\n options\n },\n createOperationSpec\n );\n }\n\n /**\n * Deletes a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to delete.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n deleteOperationSpec\n );\n }\n\n /**\n * Handles requests to list all SerialPort resources in a subscription.\n * @param options The options parameters.\n */\n listBySubscriptions(\n options?: SerialPortsListBySubscriptionsOptionalParams\n ): Promise<SerialPortsListBySubscriptionsResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionsOperationSpec\n );\n }\n\n /**\n * Connect to serial port of the target resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n connect(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsConnectOptionalParams\n ): Promise<SerialPortsConnectResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n connectOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst connectOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}/connect\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortConnectResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -1,11 +1,11 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.8"
9
- }
10
- ]
11
- }
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.52.9"
9
+ }
10
+ ]
11
+ }
@@ -11,6 +11,9 @@ import { SerialPortsImpl } from "./operations/index.js";
11
11
  import * as Parameters from "./models/parameters.js";
12
12
  import * as Mappers from "./models/mappers.js";
13
13
  export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
14
+ $host;
15
+ apiVersion;
16
+ subscriptionId;
14
17
  /**
15
18
  * Initializes a new instance of the MicrosoftSerialConsoleClient class.
16
19
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -19,7 +22,6 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
19
22
  * @param options The parameter options
20
23
  */
21
24
  constructor(credentials, subscriptionId, options) {
22
- var _a, _b, _c;
23
25
  if (credentials === undefined) {
24
26
  throw new Error("'credentials' cannot be null");
25
27
  }
@@ -38,12 +40,17 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
38
40
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
39
41
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
40
42
  : `${packageDetails}`;
41
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
43
+ const optionsWithDefaults = {
44
+ ...defaults,
45
+ ...options,
46
+ userAgentOptions: {
42
47
  userAgentPrefix
43
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
48
+ },
49
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
50
+ };
44
51
  super(optionsWithDefaults);
45
52
  let bearerTokenAuthenticationPolicyFound = false;
46
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
53
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
47
54
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
48
55
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
49
56
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -57,7 +64,8 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
57
64
  });
58
65
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
59
66
  credential: credentials,
60
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
67
+ scopes: optionsWithDefaults.credentialScopes ??
68
+ `${optionsWithDefaults.endpoint}/.default`,
61
69
  challengeCallbacks: {
62
70
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
63
71
  }
@@ -127,6 +135,7 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
127
135
  enableConsole(defaultParam, options) {
128
136
  return this.sendOperationRequest({ defaultParam, options }, enableConsoleOperationSpec);
129
137
  }
138
+ serialPorts;
130
139
  }
131
140
  // Operation Specifications
132
141
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IAKxE;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAoD;;QAEpD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;Q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ACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAoD;QAEpD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAA+C;YAC3D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,kCAAkC,CAAC;QAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CA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IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -266,20 +266,25 @@ export const ProxyResource = {
266
266
  type: {
267
267
  name: "Composite",
268
268
  className: "ProxyResource",
269
- modelProperties: Object.assign({}, Resource.type.modelProperties)
269
+ modelProperties: {
270
+ ...Resource.type.modelProperties
271
+ }
270
272
  }
271
273
  };
272
274
  export const SerialPort = {
273
275
  type: {
274
276
  name: "Composite",
275
277
  className: "SerialPort",
276
- modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { state: {
278
+ modelProperties: {
279
+ ...ProxyResource.type.modelProperties,
280
+ state: {
277
281
  serializedName: "properties.state",
278
282
  type: {
279
283
  name: "Enum",
280
284
  allowedValues: ["enabled", "disabled"]
281
285
  }
282
- } })
286
+ }
287
+ }
283
288
  }
284
289
  };
285
290
  //# sourceMappingURL=mappers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAA+B;IACjE,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,yBAAyB;QACpC,eAAe,EAAE;YACf,KAAK,EAAE;gBACL,cAAc,EAAE,OAAO;gBACvB,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE;wBACP,IAAI,EAAE;4BACJ,IAAI,EAAE,WAAW;4BACjB,SAAS,EAAE,kCAAkC;yBAC9C;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAA+B;IAC1E,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,kCAAkC;QAC7C,eAAe,EAAE;YACf,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,YAAY,EAAE;gBACZ,cAAc,EAAE,cAAc;gBAC9B,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,OAAO,EAAE;gBACP,cAAc,EAAE,SAAS;gBACzB,IAAI,EAAE;oBACJ,IAAI,EAAE,WAAW;oBACjB,SAAS,EAAE,yCAAyC;iBACrD;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CA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AAI,EAAE,WAAW;QACjB,SAAS,EAAE,eAAe;QAC1B,eAAe,oBACV,QAAQ,CAAC,IAAI,CAAC,eAAe,CACjC;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA+B;IACpD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,YAAY;QACvB,eAAe,kCACV,aAAa,CAAC,IAAI,CAAC,eAAe,KACrC,KAAK,EAAE;gBACL,cAAc,EAAE,kBAAkB;gBAClC,IAAI,EAAE;oBACJ,IAAI,EAAE,MAAM;oBACZ,aAAa,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;iBACvC;aACF,GACF;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const SerialConsoleOperations: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperations\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItem\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const SerialConsoleOperationsValueItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItem\",\n modelProperties: {\n name: {\n serializedName: \"name\",\n type: {\n name: \"String\"\n }\n },\n isDataAction: {\n serializedName: \"isDataAction\",\n type: {\n name: \"String\"\n }\n },\n display: {\n serializedName: \"display\",\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItemDisplay\"\n }\n }\n }\n }\n};\n\nexport const SerialConsoleOperationsValueItemDisplay: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItemDisplay\",\n modelProperties: {\n provider: {\n serializedName: \"provider\",\n type: {\n name: \"String\"\n }\n },\n resource: {\n serializedName: \"resource\",\n type: {\n name: \"String\"\n }\n },\n operation: {\n serializedName: \"operation\",\n type: {\n name: \"String\"\n }\n },\n description: {\n serializedName: \"description\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const SerialConsoleStatus: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleStatus\",\n modelProperties: {\n disabled: {\n serializedName: \"disabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const GetSerialConsoleSubscriptionNotFound: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"GetSerialConsoleSubscriptionNotFound\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DisableSerialConsoleResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"DisableSerialConsoleResult\",\n modelProperties: {\n disabled: {\n serializedName: \"disabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const EnableSerialConsoleResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"EnableSerialConsoleResult\",\n modelProperties: {\n disabled: {\n serializedName: \"disabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const SerialPortListResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialPortListResult\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SerialPort\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const Resource: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"Resource\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n name: {\n serializedName: \"name\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n type: {\n serializedName: \"type\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CloudError: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudError\",\n modelProperties: {\n error: {\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\"\n }\n }\n }\n }\n};\n\nexport const CloudErrorBody: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n },\n target: {\n serializedName: \"target\",\n type: {\n name: \"String\"\n }\n },\n details: {\n serializedName: \"details\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const SerialPortConnectResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialPortConnectResult\",\n modelProperties: {\n connectionString: {\n serializedName: \"connectionString\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ProxyResource: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"ProxyResource\",\n modelProperties: {\n ...Resource.type.modelProperties\n }\n }\n};\n\nexport const SerialPort: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialPort\",\n modelProperties: {\n ...ProxyResource.type.modelProperties,\n state: {\n serializedName: \"properties.state\",\n type: {\n name: \"Enum\",\n allowedValues: [\"enabled\", \"disabled\"]\n }\n }\n }\n }\n};\n"]}
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAA+B;IACjE,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,yBAAyB;QACpC,eAAe,EAAE;YACf,KAAK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AE,SAAS;gBACzB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,MAAM,EAAE;gBACN,cAAc,EAAE,QAAQ;gBACxB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,OAAO,EAAE;gBACP,cAAc,EAAE,SAAS;gBACzB,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE;wBACP,IAAI,EAAE;4BACJ,IAAI,EAAE,WAAW;4BACjB,SAAS,EAAE,gBAAgB;yBAC5B;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAA+B;IACjE,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,yBAAyB;QACpC,eAAe,EAAE;YACf,gBAAgB,EAAE;gBAChB,cAAc,EAAE,kBAAkB;gBAClC,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA+B;IACvD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,eAAe;QAC1B,eAAe,EAAE;YACf,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe;SACjC;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA+B;IACpD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,YAAY;QACvB,eAAe,EAAE;YACf,GAAG,aAAa,CAAC,IAAI,CAAC,eAAe;YACrC,KAAK,EAAE;gBACL,cAAc,EAAE,kBAAkB;gBAClC,IAAI,EAAE;oBACJ,IAAI,EAAE,MAAM;oBACZ,aAAa,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;iBACvC;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const SerialConsoleOperations: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperations\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItem\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const SerialConsoleOperationsValueItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItem\",\n modelProperties: {\n name: {\n serializedName: \"name\",\n type: {\n name: \"String\"\n }\n },\n isDataAction: {\n serializedName: \"isDataAction\",\n type: {\n name: \"String\"\n }\n },\n display: {\n serializedName: \"display\",\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItemDisplay\"\n }\n }\n }\n }\n};\n\nexport const SerialConsoleOperationsValueItemDisplay: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleOperationsValueItemDisplay\",\n modelProperties: {\n provider: {\n serializedName: \"provider\",\n type: {\n name: \"String\"\n }\n },\n resource: {\n serializedName: \"resource\",\n type: {\n name: \"String\"\n }\n },\n operation: {\n serializedName: \"operation\",\n type: {\n name: \"String\"\n }\n },\n description: {\n serializedName: \"description\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const SerialConsoleStatus: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialConsoleStatus\",\n modelProperties: {\n disabled: {\n serializedName: \"disabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const GetSerialConsoleSubscriptionNotFound: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"GetSerialConsoleSubscriptionNotFound\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const DisableSerialConsoleResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"DisableSerialConsoleResult\",\n modelProperties: {\n disabled: {\n serializedName: \"disabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const EnableSerialConsoleResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"EnableSerialConsoleResult\",\n modelProperties: {\n disabled: {\n serializedName: \"disabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const SerialPortListResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialPortListResult\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SerialPort\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const Resource: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"Resource\",\n modelProperties: {\n id: {\n serializedName: \"id\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n name: {\n serializedName: \"name\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n type: {\n serializedName: \"type\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CloudError: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudError\",\n modelProperties: {\n error: {\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\"\n }\n }\n }\n }\n};\n\nexport const CloudErrorBody: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n },\n target: {\n serializedName: \"target\",\n type: {\n name: \"String\"\n }\n },\n details: {\n serializedName: \"details\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const SerialPortConnectResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialPortConnectResult\",\n modelProperties: {\n connectionString: {\n serializedName: \"connectionString\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const ProxyResource: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"ProxyResource\",\n modelProperties: {\n ...Resource.type.modelProperties\n }\n }\n};\n\nexport const SerialPort: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SerialPort\",\n modelProperties: {\n ...ProxyResource.type.modelProperties,\n state: {\n serializedName: \"properties.state\",\n type: {\n name: \"Enum\",\n allowedValues: [\"enabled\", \"disabled\"]\n }\n }\n }\n }\n};\n"]}
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
10
10
  import * as Parameters from "../models/parameters.js";
11
11
  /** Class containing SerialPorts operations. */
12
12
  export class SerialPortsImpl {
13
+ client;
13
14
  /**
14
15
  * Initialize a new instance of the class SerialPorts class.
15
16
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"serialPorts.js","sourceRoot":"","sources":["../../../src/operations/serialPorts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAiBtD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,iBAAyB,EACzB,yBAAiC,EACjC,kBAA0B,EAC1B,cAAsB,EACtB,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,yBA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C,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EACF,+EAA+E;IACjF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EACF,mNAAmN;IACrN,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { SerialPorts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSerialConsoleClient } from \"../microsoftSerialConsoleClient.js\";\nimport {\n SerialPortsListOptionalParams,\n SerialPortsListResponse,\n SerialPortsGetOptionalParams,\n SerialPortsGetResponse,\n SerialPort,\n SerialPortsCreateOptionalParams,\n SerialPortsCreateResponse,\n SerialPortsDeleteOptionalParams,\n SerialPortsListBySubscriptionsOptionalParams,\n SerialPortsListBySubscriptionsResponse,\n SerialPortsConnectOptionalParams,\n SerialPortsConnectResponse\n} from \"../models/index.js\";\n\n/** Class containing SerialPorts operations. */\nexport class SerialPortsImpl implements SerialPorts {\n private readonly client: MicrosoftSerialConsoleClient;\n\n /**\n * Initialize a new instance of the class SerialPorts class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSerialConsoleClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the configured serial ports for a parent resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param options The options parameters.\n */\n list(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n options?: SerialPortsListOptionalParams\n ): Promise<SerialPortsListResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n options\n },\n listOperationSpec\n );\n }\n\n /**\n * Gets the configured settings for a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsGetOptionalParams\n ): Promise<SerialPortsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to create.\n * @param parameters Parameters supplied to create the serial port.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n parameters: SerialPort,\n options?: SerialPortsCreateOptionalParams\n ): Promise<SerialPortsCreateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n parameters,\n options\n },\n createOperationSpec\n );\n }\n\n /**\n * Deletes a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to delete.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n deleteOperationSpec\n );\n }\n\n /**\n * Handles requests to list all SerialPort resources in a subscription.\n * @param options The options parameters.\n */\n listBySubscriptions(\n options?: SerialPortsListBySubscriptionsOptionalParams\n ): Promise<SerialPortsListBySubscriptionsResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionsOperationSpec\n );\n }\n\n /**\n * Connect to serial port of the target resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n connect(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsConnectOptionalParams\n ): Promise<SerialPortsConnectResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n connectOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst connectOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}/connect\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortConnectResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"serialPorts.js","sourceRoot":"","sources":["../../../src/operations/serialPorts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAiBtD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAA+B;IAEtD;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,iBAAyB,EACzB,yBAAiC,EACjC,kBAA0B,EAC1B,cAAsB,EACtB,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,yBAAyB;YACzB,kBAAkB;YAClB,cAAc;YACd,OAAO;SACR,EACD,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CACD,iBAAyB,EACzB,yBAAiC,EACjC,kBAA0B,EAC1B,c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SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EACF,mNAAmN;IACrN,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { SerialPorts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSerialConsoleClient } from \"../microsoftSerialConsoleClient.js\";\nimport {\n SerialPortsListOptionalParams,\n SerialPortsListResponse,\n SerialPortsGetOptionalParams,\n SerialPortsGetResponse,\n SerialPort,\n SerialPortsCreateOptionalParams,\n SerialPortsCreateResponse,\n SerialPortsDeleteOptionalParams,\n SerialPortsListBySubscriptionsOptionalParams,\n SerialPortsListBySubscriptionsResponse,\n SerialPortsConnectOptionalParams,\n SerialPortsConnectResponse\n} from \"../models/index.js\";\n\n/** Class containing SerialPorts operations. */\nexport class SerialPortsImpl implements SerialPorts {\n private readonly client: MicrosoftSerialConsoleClient;\n\n /**\n * Initialize a new instance of the class SerialPorts class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSerialConsoleClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the configured serial ports for a parent resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param options The options parameters.\n */\n list(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n options?: SerialPortsListOptionalParams\n ): Promise<SerialPortsListResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n options\n },\n listOperationSpec\n );\n }\n\n /**\n * Gets the configured settings for a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsGetOptionalParams\n ): Promise<SerialPortsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to create.\n * @param parameters Parameters supplied to create the serial port.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n parameters: SerialPort,\n options?: SerialPortsCreateOptionalParams\n ): Promise<SerialPortsCreateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n parameters,\n options\n },\n createOperationSpec\n );\n }\n\n /**\n * Deletes a serial port\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to delete.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n deleteOperationSpec\n );\n }\n\n /**\n * Handles requests to list all SerialPort resources in a subscription.\n * @param options The options parameters.\n */\n listBySubscriptions(\n options?: SerialPortsListBySubscriptionsOptionalParams\n ): Promise<SerialPortsListBySubscriptionsResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionsOperationSpec\n );\n }\n\n /**\n * Connect to serial port of the target resource\n * @param resourceGroupName The name of the resource group.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourceType The resource type of the parent resource. For example: 'virtualMachines'\n * or 'virtualMachineScaleSets'\n * @param parentResource The resource name, or subordinate path, for the parent of the serial port. For\n * example: the name of the virtual machine.\n * @param serialPort The name of the serial port to connect to.\n * @param options The options parameters.\n */\n connect(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourceType: string,\n parentResource: string,\n serialPort: string,\n options?: SerialPortsConnectOptionalParams\n ): Promise<SerialPortsConnectResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourceType,\n parentResource,\n serialPort,\n options\n },\n connectOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.SerialPort\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/serialPorts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortListResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst connectOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}/connect\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialPortConnectResult\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourceType,\n Parameters.parentResource,\n Parameters.serialPort\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -11,6 +11,9 @@ import { SerialPortsImpl } from "./operations/index.js";
11
11
  import * as Parameters from "./models/parameters.js";
12
12
  import * as Mappers from "./models/mappers.js";
13
13
  export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
14
+ $host;
15
+ apiVersion;
16
+ subscriptionId;
14
17
  /**
15
18
  * Initializes a new instance of the MicrosoftSerialConsoleClient class.
16
19
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -19,7 +22,6 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
19
22
  * @param options The parameter options
20
23
  */
21
24
  constructor(credentials, subscriptionId, options) {
22
- var _a, _b, _c;
23
25
  if (credentials === undefined) {
24
26
  throw new Error("'credentials' cannot be null");
25
27
  }
@@ -38,12 +40,17 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
38
40
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
39
41
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
40
42
  : `${packageDetails}`;
41
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
43
+ const optionsWithDefaults = {
44
+ ...defaults,
45
+ ...options,
46
+ userAgentOptions: {
42
47
  userAgentPrefix
43
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
48
+ },
49
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
50
+ };
44
51
  super(optionsWithDefaults);
45
52
  let bearerTokenAuthenticationPolicyFound = false;
46
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
53
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
47
54
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
48
55
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
49
56
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -57,7 +64,8 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
57
64
  });
58
65
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
59
66
  credential: credentials,
60
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
67
+ scopes: optionsWithDefaults.credentialScopes ??
68
+ `${optionsWithDefaults.endpoint}/.default`,
61
69
  challengeCallbacks: {
62
70
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
63
71
  }
@@ -127,6 +135,7 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
127
135
  enableConsole(defaultParam, options) {
128
136
  return this.sendOperationRequest({ defaultParam, options }, enableConsoleOperationSpec);
129
137
  }
138
+ serialPorts;
130
139
  }
131
140
  // Operation Specifications
132
141
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU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0B;SAC/C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAoD;QAEpD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED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,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -266,20 +266,25 @@ export const ProxyResource = {
266
266
  type: {
267
267
  name: "Composite",
268
268
  className: "ProxyResource",
269
- modelProperties: Object.assign({}, Resource.type.modelProperties)
269
+ modelProperties: {
270
+ ...Resource.type.modelProperties
271
+ }
270
272
  }
271
273
  };
272
274
  export const SerialPort = {
273
275
  type: {
274
276
  name: "Composite",
275
277
  className: "SerialPort",
276
- modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { state: {
278
+ modelProperties: {
279
+ ...ProxyResource.type.modelProperties,
280
+ state: {
277
281
  serializedName: "properties.state",
278
282
  type: {
279
283
  name: "Enum",
280
284
  allowedValues: ["enabled", "disabled"]
281
285
  }
282
- } })
286
+ }
287
+ }
283
288
  }
284
289
  };
285
290
  //# sourceMappingURL=mappers.js.map