@@ -39,7 +39,7 @@ import {
3939export class FeatureClient extends coreClient . ServiceClient {
4040 $host : string ;
4141 apiVersion : string ;
42- subscriptionId : string ;
42+ subscriptionId ? : string ;
4343
4444 /**
4545 * Initializes a new instance of the FeatureClient class.
@@ -51,12 +51,26 @@ export class FeatureClient extends coreClient.ServiceClient {
5151 credentials : coreAuth . TokenCredential ,
5252 subscriptionId : string ,
5353 options ?: FeatureClientOptionalParams
54+ ) ;
55+ constructor (
56+ credentials : coreAuth . TokenCredential ,
57+ options ?: FeatureClientOptionalParams
58+ ) ;
59+ constructor (
60+ credentials : coreAuth . TokenCredential ,
61+ subscriptionIdOrOptions ?: FeatureClientOptionalParams | string ,
62+ options ?: FeatureClientOptionalParams
5463 ) {
5564 if ( credentials === undefined ) {
5665 throw new Error ( "'credentials' cannot be null" ) ;
5766 }
58- if ( subscriptionId === undefined ) {
59- throw new Error ( "'subscriptionId' cannot be null" ) ;
67+
68+ let subscriptionId : string | undefined ;
69+
70+ if ( typeof subscriptionIdOrOptions === "string" ) {
71+ subscriptionId = subscriptionIdOrOptions ;
72+ } else if ( typeof subscriptionIdOrOptions === "object" ) {
73+ options = subscriptionIdOrOptions ;
6074 }
6175
6276 // Initializing default values for options
@@ -68,7 +82,7 @@ export class FeatureClient extends coreClient.ServiceClient {
6882 credential : credentials
6983 } ;
7084
71- const packageDetails = `azsdk-js-arm-features/3.1.1 ` ;
85+ const packageDetails = `azsdk-js-arm-features/4.0.0 ` ;
7286 const userAgentPrefix =
7387 options . userAgentOptions && options . userAgentOptions . userAgentPrefix
7488 ? `${ options . userAgentOptions . userAgentPrefix } ${ packageDetails } `
@@ -269,7 +283,6 @@ const listOperationsNextOperationSpec: coreClient.OperationSpec = {
269283 bodyMapper : Mappers . ErrorResponse
270284 }
271285 } ,
272- queryParameters : [ Parameters . apiVersion ] ,
273286 urlParameters : [ Parameters . $host , Parameters . nextLink ] ,
274287 headerParameters : [ Parameters . accept ] ,
275288 serializer
0 commit comments