How to use the google-gax.LongrunningDescriptor function in google-gax

To help you get started, we’ve selected a few google-gax 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 googleapis / nodejs-dlp / src / v2beta1 / dlp_service_client.js View on Github external
var createInspectOperationResponse = protoFilesRoot.lookup(
      'google.privacy.dlp.v2beta1.InspectOperationResult'
    );
    var createInspectOperationMetadata = protoFilesRoot.lookup(
      'google.privacy.dlp.v2beta1.InspectOperationMetadata'
    );

    this._descriptors.longrunning = {
      analyzeDataSourceRisk: new gax.LongrunningDescriptor(
        this.operationsClient,
        analyzeDataSourceRiskResponse.decode.bind(
          analyzeDataSourceRiskResponse
        ),
        analyzeDataSourceRiskMetadata.decode.bind(analyzeDataSourceRiskMetadata)
      ),
      createInspectOperation: new gax.LongrunningDescriptor(
        this.operationsClient,
        createInspectOperationResponse.decode.bind(
          createInspectOperationResponse
        ),
        createInspectOperationMetadata.decode.bind(
          createInspectOperationMetadata
        )
      ),
    };

    // Put together the default options sent with requests.
    var defaults = gaxGrpc.constructSettings(
      'google.privacy.dlp.v2beta1.DlpService',
      gapicConfig,
      opts.clientConfig,
      {'x-goog-api-client': clientHeader.join(' ')}
github googleapis / google-cloud-node / packages / spanner / src / admin / instance / v1 / instance_admin_client.js View on Github external
googleApiClient.push(opts.libName + '/' + opts.libVersion);
  }
  googleApiClient.push(
    CODE_GEN_NAME_VERSION,
    'gax/' + gax.version,
    'grpc/' + gaxGrpc.grpcVersion
  );


  this.operationsClient = new gax.lro({
    auth: gaxGrpc.auth,
    grpc: gaxGrpc.grpc
  }).operationsClient(opts);

  this.longrunningDescriptors = {
    createInstance: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.spanner.admin.instance.v1.Instance.decode,
      grpcClients.google.spanner.admin.instance.v1.CreateInstanceMetadata.decode),
    updateInstance: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.spanner.admin.instance.v1.Instance.decode,
      grpcClients.google.spanner.admin.instance.v1.UpdateInstanceMetadata.decode)
  };

  var defaults = gaxGrpc.constructSettings(
      'google.spanner.admin.instance.v1.InstanceAdmin',
      configData,
      opts.clientConfig,
      {'x-goog-api-client': googleApiClient.join(' ')});

  var self = this;
github googleapis / google-cloud-node / packages / spanner / src / admin / instance / v1 / instance_admin_client.js View on Github external
'gax/' + gax.version,
    'grpc/' + gaxGrpc.grpcVersion
  );


  this.operationsClient = new gax.lro({
    auth: gaxGrpc.auth,
    grpc: gaxGrpc.grpc
  }).operationsClient(opts);

  this.longrunningDescriptors = {
    createInstance: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.spanner.admin.instance.v1.Instance.decode,
      grpcClients.google.spanner.admin.instance.v1.CreateInstanceMetadata.decode),
    updateInstance: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.spanner.admin.instance.v1.Instance.decode,
      grpcClients.google.spanner.admin.instance.v1.UpdateInstanceMetadata.decode)
  };

  var defaults = gaxGrpc.constructSettings(
      'google.spanner.admin.instance.v1.InstanceAdmin',
      configData,
      opts.clientConfig,
      {'x-goog-api-client': googleApiClient.join(' ')});

  var self = this;

  this.auth = gaxGrpc.auth;
  var instanceAdminStub = gaxGrpc.createStub(
      grpcClients.google.spanner.admin.instance.v1.InstanceAdmin,
github googleapis / google-cloud-node / packages / spanner / src / admin / database / v1 / database_admin_client.js View on Github external
googleApiClient.push(opts.libName + '/' + opts.libVersion);
  }
  googleApiClient.push(
    CODE_GEN_NAME_VERSION,
    'gax/' + gax.version,
    'grpc/' + gaxGrpc.grpcVersion
  );


  this.operationsClient = new gax.lro({
    auth: gaxGrpc.auth,
    grpc: gaxGrpc.grpc
  }).operationsClient(opts);

  this.longrunningDescriptors = {
    createDatabase: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.spanner.admin.database.v1.Database.decode,
      grpcClients.google.spanner.admin.database.v1.CreateDatabaseMetadata.decode),
    updateDatabaseDdl: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.protobuf.Empty.decode,
      grpcClients.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.decode)
  };

  var defaults = gaxGrpc.constructSettings(
      'google.spanner.admin.database.v1.DatabaseAdmin',
      configData,
      opts.clientConfig,
      {'x-goog-api-client': googleApiClient.join(' ')});

  var self = this;
github googleapis / nodejs-dlp / src / v2beta1 / dlp_service_client.js View on Github external
var analyzeDataSourceRiskResponse = protoFilesRoot.lookup(
      'google.privacy.dlp.v2beta1.RiskAnalysisOperationResult'
    );
    var analyzeDataSourceRiskMetadata = protoFilesRoot.lookup(
      'google.privacy.dlp.v2beta1.RiskAnalysisOperationMetadata'
    );
    var createInspectOperationResponse = protoFilesRoot.lookup(
      'google.privacy.dlp.v2beta1.InspectOperationResult'
    );
    var createInspectOperationMetadata = protoFilesRoot.lookup(
      'google.privacy.dlp.v2beta1.InspectOperationMetadata'
    );

    this._descriptors.longrunning = {
      analyzeDataSourceRisk: new gax.LongrunningDescriptor(
        this.operationsClient,
        analyzeDataSourceRiskResponse.decode.bind(
          analyzeDataSourceRiskResponse
        ),
        analyzeDataSourceRiskMetadata.decode.bind(analyzeDataSourceRiskMetadata)
      ),
      createInspectOperation: new gax.LongrunningDescriptor(
        this.operationsClient,
        createInspectOperationResponse.decode.bind(
          createInspectOperationResponse
        ),
        createInspectOperationMetadata.decode.bind(
          createInspectOperationMetadata
        )
      ),
    };
github googleapis / google-cloud-node / packages / spanner / src / admin / database / v1 / database_admin_client.js View on Github external
'gax/' + gax.version,
    'grpc/' + gaxGrpc.grpcVersion
  );


  this.operationsClient = new gax.lro({
    auth: gaxGrpc.auth,
    grpc: gaxGrpc.grpc
  }).operationsClient(opts);

  this.longrunningDescriptors = {
    createDatabase: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.spanner.admin.database.v1.Database.decode,
      grpcClients.google.spanner.admin.database.v1.CreateDatabaseMetadata.decode),
    updateDatabaseDdl: new gax.LongrunningDescriptor(
      this.operationsClient,
      grpcClients.google.protobuf.Empty.decode,
      grpcClients.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.decode)
  };

  var defaults = gaxGrpc.constructSettings(
      'google.spanner.admin.database.v1.DatabaseAdmin',
      configData,
      opts.clientConfig,
      {'x-goog-api-client': googleApiClient.join(' ')});

  var self = this;

  this.auth = gaxGrpc.auth;
  var databaseAdminStub = gaxGrpc.createStub(
      grpcClients.google.spanner.admin.database.v1.DatabaseAdmin,