@azure/arm-postgresql 6.0.0-beta.1 → 6.0.0

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.
Files changed (105) hide show
  1. package/CHANGELOG.md +7 -10
  2. package/README.md +4 -0
  3. package/dist/index.js +34 -54
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/src/index.d.ts +0 -1
  8. package/dist-esm/src/index.d.ts.map +1 -1
  9. package/dist-esm/src/index.js +0 -1
  10. package/dist-esm/src/index.js.map +1 -1
  11. package/dist-esm/src/models/index.d.ts +18 -18
  12. package/dist-esm/src/models/index.d.ts.map +1 -1
  13. package/dist-esm/src/models/mappers.d.ts +1 -1
  14. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  15. package/dist-esm/src/models/mappers.js +29 -29
  16. package/dist-esm/src/models/mappers.js.map +1 -1
  17. package/dist-esm/src/operations/checkNameAvailability.d.ts +2 -2
  18. package/dist-esm/src/operations/checkNameAvailability.d.ts.map +1 -1
  19. package/dist-esm/src/operations/checkNameAvailability.js.map +1 -1
  20. package/dist-esm/src/operations/configurations.d.ts +2 -2
  21. package/dist-esm/src/operations/configurations.d.ts.map +1 -1
  22. package/dist-esm/src/operations/configurations.js.map +1 -1
  23. package/dist-esm/src/operations/databases.d.ts +2 -2
  24. package/dist-esm/src/operations/databases.d.ts.map +1 -1
  25. package/dist-esm/src/operations/databases.js.map +1 -1
  26. package/dist-esm/src/operations/firewallRules.d.ts +2 -2
  27. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -1
  28. package/dist-esm/src/operations/firewallRules.js.map +1 -1
  29. package/dist-esm/src/operations/locationBasedPerformanceTier.d.ts +2 -2
  30. package/dist-esm/src/operations/locationBasedPerformanceTier.d.ts.map +1 -1
  31. package/dist-esm/src/operations/locationBasedPerformanceTier.js.map +1 -1
  32. package/dist-esm/src/operations/logFiles.d.ts +2 -2
  33. package/dist-esm/src/operations/logFiles.d.ts.map +1 -1
  34. package/dist-esm/src/operations/logFiles.js.map +1 -1
  35. package/dist-esm/src/operations/operations.d.ts +2 -2
  36. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  37. package/dist-esm/src/operations/operations.js.map +1 -1
  38. package/dist-esm/src/operations/privateEndpointConnections.d.ts +2 -2
  39. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  40. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  41. package/dist-esm/src/operations/privateLinkResources.d.ts +2 -2
  42. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -1
  43. package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
  44. package/dist-esm/src/operations/recoverableServers.d.ts +2 -2
  45. package/dist-esm/src/operations/recoverableServers.d.ts.map +1 -1
  46. package/dist-esm/src/operations/recoverableServers.js.map +1 -1
  47. package/dist-esm/src/operations/replicas.d.ts +2 -2
  48. package/dist-esm/src/operations/replicas.d.ts.map +1 -1
  49. package/dist-esm/src/operations/replicas.js.map +1 -1
  50. package/dist-esm/src/operations/serverAdministrators.d.ts +2 -2
  51. package/dist-esm/src/operations/serverAdministrators.d.ts.map +1 -1
  52. package/dist-esm/src/operations/serverAdministrators.js.map +1 -1
  53. package/dist-esm/src/operations/serverBasedPerformanceTier.d.ts +2 -2
  54. package/dist-esm/src/operations/serverBasedPerformanceTier.d.ts.map +1 -1
  55. package/dist-esm/src/operations/serverBasedPerformanceTier.js.map +1 -1
  56. package/dist-esm/src/operations/serverKeys.d.ts +2 -2
  57. package/dist-esm/src/operations/serverKeys.d.ts.map +1 -1
  58. package/dist-esm/src/operations/serverKeys.js.map +1 -1
  59. package/dist-esm/src/operations/serverParameters.d.ts +2 -2
  60. package/dist-esm/src/operations/serverParameters.d.ts.map +1 -1
  61. package/dist-esm/src/operations/serverParameters.js.map +1 -1
  62. package/dist-esm/src/operations/serverSecurityAlertPolicies.d.ts +2 -2
  63. package/dist-esm/src/operations/serverSecurityAlertPolicies.d.ts.map +1 -1
  64. package/dist-esm/src/operations/serverSecurityAlertPolicies.js.map +1 -1
  65. package/dist-esm/src/operations/servers.d.ts +2 -2
  66. package/dist-esm/src/operations/servers.d.ts.map +1 -1
  67. package/dist-esm/src/operations/servers.js.map +1 -1
  68. package/dist-esm/src/operations/virtualNetworkRules.d.ts +2 -2
  69. package/dist-esm/src/operations/virtualNetworkRules.d.ts.map +1 -1
  70. package/dist-esm/src/operations/virtualNetworkRules.js.map +1 -1
  71. package/dist-esm/src/postgreSQLManagementClient.d.ts +4 -2
  72. package/dist-esm/src/postgreSQLManagementClient.d.ts.map +1 -1
  73. package/dist-esm/src/postgreSQLManagementClient.js +31 -3
  74. package/dist-esm/src/postgreSQLManagementClient.js.map +1 -1
  75. package/package.json +8 -8
  76. package/review/arm-postgresql.api.md +5 -11
  77. package/src/index.ts +0 -1
  78. package/src/models/index.ts +19 -19
  79. package/src/models/mappers.ts +30 -30
  80. package/src/operations/checkNameAvailability.ts +3 -3
  81. package/src/operations/configurations.ts +3 -3
  82. package/src/operations/databases.ts +3 -3
  83. package/src/operations/firewallRules.ts +3 -3
  84. package/src/operations/locationBasedPerformanceTier.ts +3 -3
  85. package/src/operations/logFiles.ts +3 -3
  86. package/src/operations/operations.ts +3 -3
  87. package/src/operations/privateEndpointConnections.ts +3 -3
  88. package/src/operations/privateLinkResources.ts +3 -3
  89. package/src/operations/recoverableServers.ts +3 -3
  90. package/src/operations/replicas.ts +3 -3
  91. package/src/operations/serverAdministrators.ts +3 -3
  92. package/src/operations/serverBasedPerformanceTier.ts +3 -3
  93. package/src/operations/serverKeys.ts +3 -3
  94. package/src/operations/serverParameters.ts +3 -3
  95. package/src/operations/serverSecurityAlertPolicies.ts +3 -3
  96. package/src/operations/servers.ts +3 -3
  97. package/src/operations/virtualNetworkRules.ts +3 -3
  98. package/src/postgreSQLManagementClient.ts +44 -3
  99. package/types/arm-postgresql.d.ts +3 -13
  100. package/types/tsdoc-metadata.json +1 -1
  101. package/dist-esm/src/postgreSQLManagementClientContext.d.ts +0 -15
  102. package/dist-esm/src/postgreSQLManagementClientContext.d.ts.map +0 -1
  103. package/dist-esm/src/postgreSQLManagementClientContext.js +0 -48
  104. package/dist-esm/src/postgreSQLManagementClientContext.js.map +0 -1
  105. package/src/postgreSQLManagementClientContext.ts +0 -68
@@ -11,7 +11,7 @@ import { ServerAdministrators } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
14
+ import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
15
15
  import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
16
  import { LroImpl } from "../lroImpl";
17
17
  import {
@@ -28,13 +28,13 @@ import {
28
28
  /// <reference lib="esnext.asynciterable" />
29
29
  /** Class containing ServerAdministrators operations. */
30
30
  export class ServerAdministratorsImpl implements ServerAdministrators {
31
- private readonly client: PostgreSQLManagementClientContext;
31
+ private readonly client: PostgreSQLManagementClient;
32
32
 
33
33
  /**
34
34
  * Initialize a new instance of the class ServerAdministrators class.
35
35
  * @param client Reference to the service client
36
36
  */
37
- constructor(client: PostgreSQLManagementClientContext) {
37
+ constructor(client: PostgreSQLManagementClient) {
38
38
  this.client = client;
39
39
  }
40
40
 
@@ -11,7 +11,7 @@ import { ServerBasedPerformanceTier } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
14
+ import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
15
15
  import {
16
16
  PerformanceTierProperties,
17
17
  ServerBasedPerformanceTierListOptionalParams,
@@ -22,13 +22,13 @@ import {
22
22
  /** Class containing ServerBasedPerformanceTier operations. */
23
23
  export class ServerBasedPerformanceTierImpl
24
24
  implements ServerBasedPerformanceTier {
25
- private readonly client: PostgreSQLManagementClientContext;
25
+ private readonly client: PostgreSQLManagementClient;
26
26
 
27
27
  /**
28
28
  * Initialize a new instance of the class ServerBasedPerformanceTier class.
29
29
  * @param client Reference to the service client
30
30
  */
31
- constructor(client: PostgreSQLManagementClientContext) {
31
+ constructor(client: PostgreSQLManagementClient) {
32
32
  this.client = client;
33
33
  }
34
34
 
@@ -11,7 +11,7 @@ import { ServerKeys } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
14
+ import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
15
15
  import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
16
  import { LroImpl } from "../lroImpl";
17
17
  import {
@@ -30,13 +30,13 @@ import {
30
30
  /// <reference lib="esnext.asynciterable" />
31
31
  /** Class containing ServerKeys operations. */
32
32
  export class ServerKeysImpl implements ServerKeys {
33
- private readonly client: PostgreSQLManagementClientContext;
33
+ private readonly client: PostgreSQLManagementClient;
34
34
 
35
35
  /**
36
36
  * Initialize a new instance of the class ServerKeys class.
37
37
  * @param client Reference to the service client
38
38
  */
39
- constructor(client: PostgreSQLManagementClientContext) {
39
+ constructor(client: PostgreSQLManagementClient) {
40
40
  this.client = client;
41
41
  }
42
42
 
@@ -10,7 +10,7 @@ import { ServerParameters } from "../operationsInterfaces";
10
10
  import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
- import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
13
+ import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
14
14
  import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
15
  import { LroImpl } from "../lroImpl";
16
16
  import {
@@ -21,13 +21,13 @@ import {
21
21
 
22
22
  /** Class containing ServerParameters operations. */
23
23
  export class ServerParametersImpl implements ServerParameters {
24
- private readonly client: PostgreSQLManagementClientContext;
24
+ private readonly client: PostgreSQLManagementClient;
25
25
 
26
26
  /**
27
27
  * Initialize a new instance of the class ServerParameters class.
28
28
  * @param client Reference to the service client
29
29
  */
30
- constructor(client: PostgreSQLManagementClientContext) {
30
+ constructor(client: PostgreSQLManagementClient) {
31
31
  this.client = client;
32
32
  }
33
33
 
@@ -11,7 +11,7 @@ import { ServerSecurityAlertPolicies } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
14
+ import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
15
15
  import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
16
  import { LroImpl } from "../lroImpl";
17
17
  import {
@@ -31,13 +31,13 @@ import {
31
31
  /** Class containing ServerSecurityAlertPolicies operations. */
32
32
  export class ServerSecurityAlertPoliciesImpl
33
33
  implements ServerSecurityAlertPolicies {
34
- private readonly client: PostgreSQLManagementClientContext;
34
+ private readonly client: PostgreSQLManagementClient;
35
35
 
36
36
  /**
37
37
  * Initialize a new instance of the class ServerSecurityAlertPolicies class.
38
38
  * @param client Reference to the service client
39
39
  */
40
- constructor(client: PostgreSQLManagementClientContext) {
40
+ constructor(client: PostgreSQLManagementClient) {
41
41
  this.client = client;
42
42
  }
43
43
 
@@ -11,7 +11,7 @@ import { Servers } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
14
+ import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
15
15
  import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
16
  import { LroImpl } from "../lroImpl";
17
17
  import {
@@ -35,13 +35,13 @@ import {
35
35
  /// <reference lib="esnext.asynciterable" />
36
36
  /** Class containing Servers operations. */
37
37
  export class ServersImpl implements Servers {
38
- private readonly client: PostgreSQLManagementClientContext;
38
+ private readonly client: PostgreSQLManagementClient;
39
39
 
40
40
  /**
41
41
  * Initialize a new instance of the class Servers class.
42
42
  * @param client Reference to the service client
43
43
  */
44
- constructor(client: PostgreSQLManagementClientContext) {
44
+ constructor(client: PostgreSQLManagementClient) {
45
45
  this.client = client;
46
46
  }
47
47
 
@@ -11,7 +11,7 @@ import { VirtualNetworkRules } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { PostgreSQLManagementClientContext } from "../postgreSQLManagementClientContext";
14
+ import { PostgreSQLManagementClient } from "../postgreSQLManagementClient";
15
15
  import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
16
  import { LroImpl } from "../lroImpl";
17
17
  import {
@@ -30,13 +30,13 @@ import {
30
30
  /// <reference lib="esnext.asynciterable" />
31
31
  /** Class containing VirtualNetworkRules operations. */
32
32
  export class VirtualNetworkRulesImpl implements VirtualNetworkRules {
33
- private readonly client: PostgreSQLManagementClientContext;
33
+ private readonly client: PostgreSQLManagementClient;
34
34
 
35
35
  /**
36
36
  * Initialize a new instance of the class VirtualNetworkRules class.
37
37
  * @param client Reference to the service client
38
38
  */
39
- constructor(client: PostgreSQLManagementClientContext) {
39
+ constructor(client: PostgreSQLManagementClient) {
40
40
  this.client = client;
41
41
  }
42
42
 
@@ -6,6 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
+ import * as coreClient from "@azure/core-client";
9
10
  import * as coreAuth from "@azure/core-auth";
10
11
  import {
11
12
  ServersImpl,
@@ -47,10 +48,12 @@ import {
47
48
  PrivateLinkResources,
48
49
  ServerKeys
49
50
  } from "./operationsInterfaces";
50
- import { PostgreSQLManagementClientContext } from "./postgreSQLManagementClientContext";
51
51
  import { PostgreSQLManagementClientOptionalParams } from "./models";
52
52
 
53
- export class PostgreSQLManagementClient extends PostgreSQLManagementClientContext {
53
+ export class PostgreSQLManagementClient extends coreClient.ServiceClient {
54
+ $host: string;
55
+ subscriptionId: string;
56
+
54
57
  /**
55
58
  * Initializes a new instance of the PostgreSQLManagementClient class.
56
59
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -62,7 +65,45 @@ export class PostgreSQLManagementClient extends PostgreSQLManagementClientContex
62
65
  subscriptionId: string,
63
66
  options?: PostgreSQLManagementClientOptionalParams
64
67
  ) {
65
- super(credentials, subscriptionId, options);
68
+ if (credentials === undefined) {
69
+ throw new Error("'credentials' cannot be null");
70
+ }
71
+ if (subscriptionId === undefined) {
72
+ throw new Error("'subscriptionId' cannot be null");
73
+ }
74
+
75
+ // Initializing default values for options
76
+ if (!options) {
77
+ options = {};
78
+ }
79
+ const defaults: PostgreSQLManagementClientOptionalParams = {
80
+ requestContentType: "application/json; charset=utf-8",
81
+ credential: credentials
82
+ };
83
+
84
+ const packageDetails = `azsdk-js-arm-postgresql/6.0.0`;
85
+ const userAgentPrefix =
86
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
87
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
88
+ : `${packageDetails}`;
89
+
90
+ if (!options.credentialScopes) {
91
+ options.credentialScopes = ["https://management.azure.com/.default"];
92
+ }
93
+ const optionsWithDefaults = {
94
+ ...defaults,
95
+ ...options,
96
+ userAgentOptions: {
97
+ userAgentPrefix
98
+ },
99
+ baseUri: options.endpoint || "https://management.azure.com"
100
+ };
101
+ super(optionsWithDefaults);
102
+ // Parameter assignments
103
+ this.subscriptionId = subscriptionId;
104
+
105
+ // Assigning values to Constant parameters
106
+ this.$host = options.$host || "https://management.azure.com";
66
107
  this.servers = new ServersImpl(this);
67
108
  this.replicas = new ReplicasImpl(this);
68
109
  this.firewallRules = new FirewallRulesImpl(this);
@@ -747,7 +747,9 @@ export declare interface PerformanceTierServiceLevelObjectives {
747
747
  minStorageMB?: number;
748
748
  }
749
749
 
750
- export declare class PostgreSQLManagementClient extends PostgreSQLManagementClientContext {
750
+ export declare class PostgreSQLManagementClient extends coreClient.ServiceClient {
751
+ $host: string;
752
+ subscriptionId: string;
751
753
  /**
752
754
  * Initializes a new instance of the PostgreSQLManagementClient class.
753
755
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -775,18 +777,6 @@ export declare class PostgreSQLManagementClient extends PostgreSQLManagementClie
775
777
  serverKeys: ServerKeys;
776
778
  }
777
779
 
778
- export declare class PostgreSQLManagementClientContext extends coreClient.ServiceClient {
779
- $host: string;
780
- subscriptionId: string;
781
- /**
782
- * Initializes a new instance of the PostgreSQLManagementClientContext class.
783
- * @param credentials Subscription credentials which uniquely identify client subscription.
784
- * @param subscriptionId The ID of the target subscription.
785
- * @param options The parameter options
786
- */
787
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PostgreSQLManagementClientOptionalParams);
788
- }
789
-
790
780
  /** Optional parameters. */
791
781
  export declare interface PostgreSQLManagementClientOptionalParams extends coreClient.ServiceClientOptions {
792
782
  /** server parameter */
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.7.11"
8
+ "packageVersion": "7.18.19"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,15 +0,0 @@
1
- import * as coreClient from "@azure/core-client";
2
- import * as coreAuth from "@azure/core-auth";
3
- import { PostgreSQLManagementClientOptionalParams } from "./models";
4
- export declare class PostgreSQLManagementClientContext extends coreClient.ServiceClient {
5
- $host: string;
6
- subscriptionId: string;
7
- /**
8
- * Initializes a new instance of the PostgreSQLManagementClientContext class.
9
- * @param credentials Subscription credentials which uniquely identify client subscription.
10
- * @param subscriptionId The ID of the target subscription.
11
- * @param options The parameter options
12
- */
13
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PostgreSQLManagementClientOptionalParams);
14
- }
15
- //# sourceMappingURL=postgreSQLManagementClientContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postgreSQLManagementClientContext.d.ts","sourceRoot":"","sources":["../../src/postgreSQLManagementClientContext.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,wCAAwC,EAAE,MAAM,UAAU,CAAC;AAEpE,qBAAa,iCAAkC,SAAQ,UAAU,CAAC,aAAa;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,wCAAwC;CA0CrD"}
@@ -1,48 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- import * as coreClient from "@azure/core-client";
9
- export class PostgreSQLManagementClientContext extends coreClient.ServiceClient {
10
- /**
11
- * Initializes a new instance of the PostgreSQLManagementClientContext class.
12
- * @param credentials Subscription credentials which uniquely identify client subscription.
13
- * @param subscriptionId The ID of the target subscription.
14
- * @param options The parameter options
15
- */
16
- constructor(credentials, subscriptionId, options) {
17
- if (credentials === undefined) {
18
- throw new Error("'credentials' cannot be null");
19
- }
20
- if (subscriptionId === undefined) {
21
- throw new Error("'subscriptionId' cannot be null");
22
- }
23
- // Initializing default values for options
24
- if (!options) {
25
- options = {};
26
- }
27
- const defaults = {
28
- requestContentType: "application/json; charset=utf-8",
29
- credential: credentials
30
- };
31
- const packageDetails = `azsdk-js-arm-postgresql/6.0.0-beta.1`;
32
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
33
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
34
- : `${packageDetails}`;
35
- if (!options.credentialScopes) {
36
- options.credentialScopes = ["https://management.azure.com/.default"];
37
- }
38
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
39
- userAgentPrefix
40
- }, baseUri: options.endpoint || "https://management.azure.com" });
41
- super(optionsWithDefaults);
42
- // Parameter assignments
43
- this.subscriptionId = subscriptionId;
44
- // Assigning values to Constant parameters
45
- this.$host = options.$host || "https://management.azure.com";
46
- }
47
- }
48
- //# sourceMappingURL=postgreSQLManagementClientContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postgreSQLManagementClientContext.js","sourceRoot":"","sources":["../../src/postgreSQLManagementClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAIjD,MAAM,OAAO,iCAAkC,SAAQ,UAAU,CAAC,aAAa;IAI7E;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAkD;QAElD,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAA6C;YACzD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,8BAA8B,GAC5D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,0CAA0C;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,8BAA8B,CAAC;IAC/D,CAAC;CACF"}
@@ -1,68 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
-
9
- import * as coreClient from "@azure/core-client";
10
- import * as coreAuth from "@azure/core-auth";
11
- import { PostgreSQLManagementClientOptionalParams } from "./models";
12
-
13
- export class PostgreSQLManagementClientContext extends coreClient.ServiceClient {
14
- $host: string;
15
- subscriptionId: string;
16
-
17
- /**
18
- * Initializes a new instance of the PostgreSQLManagementClientContext class.
19
- * @param credentials Subscription credentials which uniquely identify client subscription.
20
- * @param subscriptionId The ID of the target subscription.
21
- * @param options The parameter options
22
- */
23
- constructor(
24
- credentials: coreAuth.TokenCredential,
25
- subscriptionId: string,
26
- options?: PostgreSQLManagementClientOptionalParams
27
- ) {
28
- if (credentials === undefined) {
29
- throw new Error("'credentials' cannot be null");
30
- }
31
- if (subscriptionId === undefined) {
32
- throw new Error("'subscriptionId' cannot be null");
33
- }
34
-
35
- // Initializing default values for options
36
- if (!options) {
37
- options = {};
38
- }
39
- const defaults: PostgreSQLManagementClientOptionalParams = {
40
- requestContentType: "application/json; charset=utf-8",
41
- credential: credentials
42
- };
43
-
44
- const packageDetails = `azsdk-js-arm-postgresql/6.0.0-beta.1`;
45
- const userAgentPrefix =
46
- options.userAgentOptions && options.userAgentOptions.userAgentPrefix
47
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
48
- : `${packageDetails}`;
49
-
50
- if (!options.credentialScopes) {
51
- options.credentialScopes = ["https://management.azure.com/.default"];
52
- }
53
- const optionsWithDefaults = {
54
- ...defaults,
55
- ...options,
56
- userAgentOptions: {
57
- userAgentPrefix
58
- },
59
- baseUri: options.endpoint || "https://management.azure.com"
60
- };
61
- super(optionsWithDefaults);
62
- // Parameter assignments
63
- this.subscriptionId = subscriptionId;
64
-
65
- // Assigning values to Constant parameters
66
- this.$host = options.$host || "https://management.azure.com";
67
- }
68
- }