How to use the ms-rest.addSerializationMixin function in ms-rest

To help you get started, we’ve selected a few ms-rest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / autorest / src / generator / AutoRest.NodeJS.Tests / Expected / AcceptanceTests / RequiredOptional / autoRestRequiredOptionalTestService.js View on Github external
this.baseUri = baseUri;
    if (!this.baseUri) {
      this.baseUri = 'http://localhost';
    }
    this.requiredGlobalPath = requiredGlobalPath;
    this.requiredGlobalQuery = requiredGlobalQuery;

    let packageInfo = this.getPackageJsonInfo(__dirname);
    this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
    if(options.optionalGlobalQuery !== null && options.optionalGlobalQuery !== undefined) {
      this.optionalGlobalQuery = options.optionalGlobalQuery;
    }
    this.implicit = new operations.Implicit(this);
    this.explicit = new operations.Explicit(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }
github Azure / azure-sdk-for-java / AutoRest / Generators / NodeJS / NodeJS.Tests / Expected / AcceptanceTests / BodyArray / autoRestSwaggerBATArrayService.js View on Github external
function AutoRestSwaggerBATArrayService(baseUri, options) {

  if (!options) options = {};

  AutoRestSwaggerBATArrayService['super_'].call(this, null, options);
  this.baseUri = baseUri;
  if (!this.baseUri) {
    this.baseUri = 'http://localhost';
  }

  this.arrayModel = new operations.ArrayModel(this);
  this.models = models;
  msRest.addSerializationMixin(this);
}
github Azure / azure-sdk-for-node / lib / services / newsSearch / lib / newsSearchClient.js View on Github external
if (!options) options = {};

    super(credentials, options);

    this.endpoint = 'https://api.cognitive.microsoft.com';
    this.baseUri = '{Endpoint}/bing/v7.0';
    this.credentials = credentials;

    let packageInfo = this.getPackageJsonInfo(__dirname);
    this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
    if(options.endpoint !== null && options.endpoint !== undefined) {
      this.endpoint = options.endpoint;
    }
    this.newsOperations = new operations.NewsOperations(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }
github Azure / azure-sdk-for-node / lib / services / serviceMapManagement / lib / servicemapManagementClient.js View on Github external
}
    if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
      this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
    }
    if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
      this.generateClientRequestId = options.generateClientRequestId;
    }
    this.machines = new operations.Machines(this);
    this.processes = new operations.Processes(this);
    this.ports = new operations.Ports(this);
    this.clientGroups = new operations.ClientGroups(this);
    this.maps = new operations.Maps(this);
    this.summaries = new operations.Summaries(this);
    this.machineGroups = new operations.MachineGroups(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }
github Azure / azure-sdk-for-node / lib / services / datalake.Store / lib / filesystem / dataLakeStoreFileSystemManagementClient.js View on Github external
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
    if(options.adlsFileSystemDnsSuffix !== null && options.adlsFileSystemDnsSuffix !== undefined) {
      this.adlsFileSystemDnsSuffix = options.adlsFileSystemDnsSuffix;
    }
    if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
      this.acceptLanguage = options.acceptLanguage;
    }
    if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
      this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
    }
    if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
      this.generateClientRequestId = options.generateClientRequestId;
    }
    this.fileSystem = new operations.FileSystem(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }
github Azure / azure-sdk-for-node / lib / services / luis / authoring / lib / lUISAuthoringClient.js View on Github external
this.credentials = credentials;
    this.endpoint = endpoint;

    let packageInfo = this.getPackageJsonInfo(__dirname);
    this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
    this.features = new operations.Features(this);
    this.examples = new operations.Examples(this);
    this.model = new operations.Model(this);
    this.apps = new operations.Apps(this);
    this.versions = new operations.Versions(this);
    this.train = new operations.Train(this);
    this.permissions = new operations.Permissions(this);
    this.pattern = new operations.Pattern(this);
    this.settings = new operations.Settings(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }
github Azure / autorest / src / generator / AutoRest.NodeJS.Tests / Expected / AcceptanceTests / BodyDateTime / autoRestDateTimeTestService.js View on Github external
constructor(baseUri, options) {

    if (!options) options = {};

    super(null, options);

    this.baseUri = baseUri;
    if (!this.baseUri) {
      this.baseUri = 'https://localhost';
    }

    let packageInfo = this.getPackageJsonInfo(__dirname);
    this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
    this.datetime = new operations.Datetime(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }
github Azure / azure-sdk-for-java / AutoRest / Generators / NodeJS / Azure.NodeJS.Tests / Expected / AcceptanceTests / StorageManagementClient / storageManagementClient.js View on Github external
if(options.apiVersion !== null && options.apiVersion !== undefined) { 
    this.apiVersion = options.apiVersion;
  }
  if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { 
    this.acceptLanguage = options.acceptLanguage;
  }
  if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { 
    this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
  }
  if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { 
    this.generateClientRequestId = options.generateClientRequestId;
  }
  this.storageAccounts = new operations.StorageAccounts(this);
  this.usageOperations = new operations.UsageOperations(this);
  this.models = models;
  msRest.addSerializationMixin(this);
}
github Azure / azure-sdk-for-node / lib / services / luis / runtime / lib / lUISRuntimeClient.js View on Github external
throw new Error('\'endpoint\' cannot be null.');
    }

    if (!options) options = {};

    super(credentials, options);

    this.baseUri = '{Endpoint}/luis/v3.0-preview';
    this.credentials = credentials;
    this.endpoint = endpoint;

    let packageInfo = this.getPackageJsonInfo(__dirname);
    this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
    this.predictionOperations = new operations.PredictionOperations(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }
github Azure / azure-sdk-for-node / lib / services / contentModerator / lib / contentModeratorAPIClient.js View on Github external
this.baseUri = 'https://{baseUrl}';
    this.credentials = credentials;
    this.baseUrl = baseUrl;

    let packageInfo = this.getPackageJsonInfo(__dirname);
    this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
    this.imageModeration = new operations.ImageModeration(this);
    this.textModeration = new operations.TextModeration(this);
    this.listManagementImageLists = new operations.ListManagementImageLists(this);
    this.listManagementTermLists = new operations.ListManagementTermLists(this);
    this.listManagementImage = new operations.ListManagementImage(this);
    this.listManagementTerm = new operations.ListManagementTerm(this);
    this.reviews = new operations.Reviews(this);
    this.models = models;
    msRest.addSerializationMixin(this);
  }