constructor()

in src/pl/iotHubGatewayServiceAPIsContext.ts [26:49]


  constructor(credentials: msRest.ServiceClientCredentials, options?: Models.IotHubGatewayServiceAPIsOptions) {
    if (credentials == undefined) {
      throw new Error("'credentials' cannot be null.");
    }

    if (!options) {
      options = {};
    }

    if (!options.userAgent) {
      const defaultUserAgent = msRest.getDefaultUserAgentValue();
      options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
    }

    super(credentials, options);

    this.apiVersion = '2020-09-30';
    this.baseUri = options.baseUri || this.baseUri || "https://fully-qualified-iothubname.azure-devices.net";
    this.requestContentType = "application/json; charset=utf-8";
    this.credentials = credentials;
    if (options.apiVersion !== null && options.apiVersion !== undefined) {
      this.apiVersion = options.apiVersion;
    }
  }