Class v1.SecureSourceManagerClient (0.11.0)

Secure Source Manager API

Access Secure Source Manager instances, resources, and repositories. v1

Package

@google-cloud/securesourcemanager

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of SecureSourceManagerClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new SecureSourceManagerClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

secureSourceManagerStub

secureSourceManagerStub?: Promise<{
        [name: string]: Function;
    }>;

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

batchCreatePullRequestComments(request, options)

batchCreatePullRequestComments(request?: protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Batch creates pull request comments. This function is used to create multiple PullRequestComments for code review. There needs to be exactly one PullRequestComment of type Review, and at most 100 PullRequestComments of type Code per request. The Position of the code comments must be unique within the request.

Parameters
Name Description
request IBatchCreatePullRequestCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to create the pull request comments.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The request message specifying the resources to create. There
   *  should be exactly one CreatePullRequestCommentRequest with CommentDetail
   *  being REVIEW in the list, and no more than 100
   *  CreatePullRequestCommentRequests with CommentDetail being CODE in the list
   */
  // const requests = [1,2,3,4]

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callBatchCreatePullRequestComments() {
    // Construct request
    const request = {
      parent,
      requests,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.batchCreatePullRequestComments(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callBatchCreatePullRequestComments();

batchCreatePullRequestComments(request, options, callback)

batchCreatePullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchCreatePullRequestCommentsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchCreatePullRequestComments(request, callback)

batchCreatePullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchCreatePullRequestCommentsRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

branchRulePath(project, location, repository, branchRule)

branchRulePath(project: string, location: string, repository: string, branchRule: string): string;

Return a fully-qualified branchRule resource name string.

Parameters
Name Description
project string
location string
repository string
branchRule string
Returns
Type Description
string

{string} Resource name string.

cancelOperation(request, optionsOrCallback, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request CancelOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkBatchCreatePullRequestCommentsProgress(name)

checkBatchCreatePullRequestCommentsProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by batchCreatePullRequestComments().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to create the pull request comments.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The request message specifying the resources to create. There
   *  should be exactly one CreatePullRequestCommentRequest with CommentDetail
   *  being REVIEW in the list, and no more than 100
   *  CreatePullRequestCommentRequests with CommentDetail being CODE in the list
   */
  // const requests = [1,2,3,4]

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callBatchCreatePullRequestComments() {
    // Construct request
    const request = {
      parent,
      requests,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.batchCreatePullRequestComments(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callBatchCreatePullRequestComments();

checkCloseIssueProgress(name)

checkCloseIssueProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by closeIssue().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue to close.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The current etag of the issue.
   *  If the etag is provided and does not match the current etag of the issue,
   *  closing will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCloseIssue() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.closeIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCloseIssue();

checkClosePullRequestProgress(name)

checkClosePullRequestProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by closePullRequest().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to close.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callClosePullRequest() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.closePullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callClosePullRequest();

checkCreateBranchRuleProgress(name)

checkCreateBranchRuleProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.BranchRule, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createBranchRule().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.BranchRule, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   */
  // const parent = 'abc123'
  /**
   */
  // const branchRule = {}
  /**
   */
  // const branchRuleId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateBranchRule() {
    // Construct request
    const request = {
      parent,
      branchRule,
      branchRuleId,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createBranchRule(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateBranchRule();

checkCreateHookProgress(name)

checkCreateHookProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Hook, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createHook().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Hook, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository in which to create the hook. Values are of the
   *  form
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const hook = {}
  /**
   *  Required. The ID to use for the hook, which will become the final component
   *  of the hook's resource name. This value restricts to lower-case letters,
   *  numbers, and hyphen, with the first character a letter, the last a letter
   *  or a number, and a 63 character maximum.
   */
  // const hookId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateHook() {
    // Construct request
    const request = {
      parent,
      hook,
      hookId,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createHook(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateHook();

checkCreateInstanceProgress(name)

checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Instance, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createInstance().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Instance, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the instance to be created.
   */
  // const instanceId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const instance = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateInstance() {
    // Construct request
    const request = {
      parent,
      instanceId,
      instance,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateInstance();

checkCreateIssueCommentProgress(name)

checkCreateIssueCommentProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.IssueComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createIssueComment().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.IssueComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The issue in which to create the issue comment. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The issue comment to create.
   */
  // const issueComment = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateIssueComment() {
    // Construct request
    const request = {
      parent,
      issueComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createIssueComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateIssueComment();

checkCreateIssueProgress(name)

checkCreateIssueProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createIssue().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository in which to create the issue. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The issue to create.
   */
  // const issue = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateIssue() {
    // Construct request
    const request = {
      parent,
      issue,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateIssue();

checkCreatePullRequestCommentProgress(name)

checkCreatePullRequestCommentProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequestComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createPullRequestComment().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequestComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to create the pull request comment.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The pull request comment to create.
   */
  // const pullRequestComment = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreatePullRequestComment() {
    // Construct request
    const request = {
      parent,
      pullRequestComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createPullRequestComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePullRequestComment();

checkCreatePullRequestProgress(name)

checkCreatePullRequestProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createPullRequest().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository that the pull request is created from. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The pull request to create.
   */
  // const pullRequest = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreatePullRequest() {
    // Construct request
    const request = {
      parent,
      pullRequest,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createPullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePullRequest();

checkCreateRepositoryProgress(name)

checkCreateRepositoryProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Repository, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by createRepository().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Repository, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project in which to create the repository. Values are of the
   *  form `projects/{project_number}/locations/{location_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const repository = {}
  /**
   *  Required. The ID to use for the repository, which will become the final
   *  component of the repository's resource name. This value should be 4-63
   *  characters, and valid characters are /[a-z][0-9]-/.
   */
  // const repositoryId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateRepository() {
    // Construct request
    const request = {
      parent,
      repository,
      repositoryId,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateRepository();

checkDeleteBranchRuleProgress(name)

checkDeleteBranchRuleProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteBranchRule().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   */
  // const name = 'abc123'
  /**
   *  Optional. If set to true, and the branch rule is not found, the request
   *  will succeed but no action will be taken on the server.
   */
  // const allowMissing = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteBranchRule() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteBranchRule(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteBranchRule();

checkDeleteHookProgress(name)

checkDeleteHookProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteHook().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the hook to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteHook() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteHook(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteHook();

checkDeleteInstanceProgress(name)

checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteInstance().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set to true, will force the deletion of the instance.
   */
  // const force = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteInstance();

checkDeleteIssueCommentProgress(name)

checkDeleteIssueCommentProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteIssueComment().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue comment to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteIssueComment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteIssueComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteIssueComment();

checkDeleteIssueProgress(name)

checkDeleteIssueProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteIssue().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The current etag of the issue.
   *  If the etag is provided and does not match the current etag of the issue,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteIssue() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteIssue();

checkDeletePullRequestCommentProgress(name)

checkDeletePullRequestCommentProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by deletePullRequestComment().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the pull request comment to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeletePullRequestComment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deletePullRequestComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePullRequestComment();

checkDeleteRepositoryProgress(name)

checkDeleteRepositoryProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteRepository().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the repository to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. If set to true, and the repository is not found, the request will
   *  succeed but no action will be taken on the server.
   */
  // const allowMissing = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteRepository() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteRepository();

checkMergePullRequestProgress(name)

checkMergePullRequestProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by mergePullRequest().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to merge.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callMergePullRequest() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.mergePullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callMergePullRequest();

checkOpenIssueProgress(name)

checkOpenIssueProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by openIssue().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue to open.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The current etag of the issue.
   *  If the etag is provided and does not match the current etag of the issue,
   *  opening will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callOpenIssue() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.openIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callOpenIssue();

checkOpenPullRequestProgress(name)

checkOpenPullRequestProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by openPullRequest().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to open.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callOpenPullRequest() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.openPullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callOpenPullRequest();

checkResolvePullRequestCommentsProgress(name)

checkResolvePullRequestCommentsProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by resolvePullRequestComments().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to resolve the pull request comments.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The names of the pull request comments to resolve. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
   *  Only comments from the same threads are allowed in the same request.
   */
  // const names = ['abc','def']
  /**
   *  Optional. If set, at least one comment in a thread is required, rest of the
   *  comments in the same thread will be automatically updated to resolved. If
   *  unset, all comments in the same thread need be present.
   */
  // const autoFill = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callResolvePullRequestComments() {
    // Construct request
    const request = {
      parent,
      names,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.resolvePullRequestComments(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callResolvePullRequestComments();

checkUnresolvePullRequestCommentsProgress(name)

checkUnresolvePullRequestCommentsProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by unresolvePullRequestComments().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to resolve the pull request comments.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The names of the pull request comments to unresolve. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
   *  Only comments from the same threads are allowed in the same request.
   */
  // const names = ['abc','def']
  /**
   *  Optional. If set, at least one comment in a thread is required, rest of the
   *  comments in the same thread will be automatically updated to unresolved. If
   *  unset, all comments in the same thread need be present.
   */
  // const autoFill = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUnresolvePullRequestComments() {
    // Construct request
    const request = {
      parent,
      names,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.unresolvePullRequestComments(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUnresolvePullRequestComments();

checkUpdateBranchRuleProgress(name)

checkUpdateBranchRuleProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.BranchRule, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateBranchRule().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.BranchRule, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   */
  // const branchRule = {}
  /**
   *  Optional. If set, validate the request and preview the review, but do not
   *  actually post it.  (https://google.aip.dev/163, for declarative friendly)
   */
  // const validateOnly = true
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  branchRule resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateBranchRule() {
    // Construct request
    const request = {
      branchRule,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateBranchRule(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateBranchRule();

checkUpdateHookProgress(name)

checkUpdateHookProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Hook, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateHook().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Hook, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  hook resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}
  /**
   *  Required. The hook being updated.
   */
  // const hook = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateHook() {
    // Construct request
    const request = {
      hook,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateHook(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateHook();

checkUpdateIssueCommentProgress(name)

checkUpdateIssueCommentProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.IssueComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateIssueComment().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.IssueComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The issue comment to update.
   */
  // const issueComment = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  issue comment resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateIssueComment() {
    // Construct request
    const request = {
      issueComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateIssueComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateIssueComment();

checkUpdateIssueProgress(name)

checkUpdateIssueProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateIssue().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Issue, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The issue to update.
   */
  // const issue = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  issue resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateIssue() {
    // Construct request
    const request = {
      issue,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateIssue();

checkUpdatePullRequestCommentProgress(name)

checkUpdatePullRequestCommentProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequestComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by updatePullRequestComment().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequestComment, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request comment to update.
   */
  // const pullRequestComment = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  pull request comment resource by the update. Updatable fields are
   *  `body`.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdatePullRequestComment() {
    // Construct request
    const request = {
      pullRequestComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updatePullRequestComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePullRequestComment();

checkUpdatePullRequestProgress(name)

checkUpdatePullRequestProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by updatePullRequest().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.PullRequest, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to update.
   */
  // const pullRequest = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  pull request resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdatePullRequest() {
    // Construct request
    const request = {
      pullRequest,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updatePullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePullRequest();

checkUpdateRepositoryProgress(name)

checkUpdateRepositoryProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Repository, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateRepository().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Repository, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  repository resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The repository being updated.
   */
  // const repository = {}
  /**
   *  Optional. False by default. If set to true, the request is validated and
   *  the user is provided with an expected result, but no actual change is made.
   */
  // const validateOnly = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateRepository() {
    // Construct request
    const request = {
      repository,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateRepository();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

closeIssue(request, options)

closeIssue(request?: protos.google.cloud.securesourcemanager.v1.ICloseIssueRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Closes an issue.

Parameters
Name Description
request ICloseIssueRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue to close.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The current etag of the issue.
   *  If the etag is provided and does not match the current etag of the issue,
   *  closing will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCloseIssue() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.closeIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCloseIssue();

closeIssue(request, options, callback)

closeIssue(request: protos.google.cloud.securesourcemanager.v1.ICloseIssueRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICloseIssueRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

closeIssue(request, callback)

closeIssue(request: protos.google.cloud.securesourcemanager.v1.ICloseIssueRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICloseIssueRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

closePullRequest(request, options)

closePullRequest(request?: protos.google.cloud.securesourcemanager.v1.IClosePullRequestRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Closes a pull request without merging.

Parameters
Name Description
request IClosePullRequestRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to close.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callClosePullRequest() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.closePullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callClosePullRequest();

closePullRequest(request, options, callback)

closePullRequest(request: protos.google.cloud.securesourcemanager.v1.IClosePullRequestRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IClosePullRequestRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

closePullRequest(request, callback)

closePullRequest(request: protos.google.cloud.securesourcemanager.v1.IClosePullRequestRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IClosePullRequestRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBranchRule(request, options)

createBranchRule(request?: protos.google.cloud.securesourcemanager.v1.ICreateBranchRuleRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

CreateBranchRule creates a branch rule in a given repository.

Parameters
Name Description
request ICreateBranchRuleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   */
  // const parent = 'abc123'
  /**
   */
  // const branchRule = {}
  /**
   */
  // const branchRuleId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateBranchRule() {
    // Construct request
    const request = {
      parent,
      branchRule,
      branchRuleId,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createBranchRule(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateBranchRule();

createBranchRule(request, options, callback)

createBranchRule(request: protos.google.cloud.securesourcemanager.v1.ICreateBranchRuleRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateBranchRuleRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createBranchRule(request, callback)

createBranchRule(request: protos.google.cloud.securesourcemanager.v1.ICreateBranchRuleRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateBranchRuleRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createHook(request, options)

createHook(request?: protos.google.cloud.securesourcemanager.v1.ICreateHookRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new hook in a given repository.

Parameters
Name Description
request ICreateHookRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository in which to create the hook. Values are of the
   *  form
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const hook = {}
  /**
   *  Required. The ID to use for the hook, which will become the final component
   *  of the hook's resource name. This value restricts to lower-case letters,
   *  numbers, and hyphen, with the first character a letter, the last a letter
   *  or a number, and a 63 character maximum.
   */
  // const hookId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateHook() {
    // Construct request
    const request = {
      parent,
      hook,
      hookId,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createHook(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateHook();

createHook(request, options, callback)

createHook(request: protos.google.cloud.securesourcemanager.v1.ICreateHookRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateHookRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createHook(request, callback)

createHook(request: protos.google.cloud.securesourcemanager.v1.ICreateHookRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateHookRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createInstance(request, options)

createInstance(request?: protos.google.cloud.securesourcemanager.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new instance in a given project and location.

Parameters
Name Description
request ICreateInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the instance to be created.
   */
  // const instanceId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const instance = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateInstance() {
    // Construct request
    const request = {
      parent,
      instanceId,
      instance,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateInstance();

createInstance(request, options, callback)

createInstance(request: protos.google.cloud.securesourcemanager.v1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createInstance(request, callback)

createInstance(request: protos.google.cloud.securesourcemanager.v1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateInstanceRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createIssue(request, options)

createIssue(request?: protos.google.cloud.securesourcemanager.v1.ICreateIssueRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an issue.

Parameters
Name Description
request ICreateIssueRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository in which to create the issue. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The issue to create.
   */
  // const issue = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateIssue() {
    // Construct request
    const request = {
      parent,
      issue,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateIssue();

createIssue(request, options, callback)

createIssue(request: protos.google.cloud.securesourcemanager.v1.ICreateIssueRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateIssueRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createIssue(request, callback)

createIssue(request: protos.google.cloud.securesourcemanager.v1.ICreateIssueRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateIssueRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createIssueComment(request, options)

createIssueComment(request?: protos.google.cloud.securesourcemanager.v1.ICreateIssueCommentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an issue comment.

Parameters
Name Description
request ICreateIssueCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The issue in which to create the issue comment. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The issue comment to create.
   */
  // const issueComment = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateIssueComment() {
    // Construct request
    const request = {
      parent,
      issueComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createIssueComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateIssueComment();

createIssueComment(request, options, callback)

createIssueComment(request: protos.google.cloud.securesourcemanager.v1.ICreateIssueCommentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateIssueCommentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createIssueComment(request, callback)

createIssueComment(request: protos.google.cloud.securesourcemanager.v1.ICreateIssueCommentRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateIssueCommentRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPullRequest(request, options)

createPullRequest(request?: protos.google.cloud.securesourcemanager.v1.ICreatePullRequestRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a pull request.

Parameters
Name Description
request ICreatePullRequestRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository that the pull request is created from. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The pull request to create.
   */
  // const pullRequest = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreatePullRequest() {
    // Construct request
    const request = {
      parent,
      pullRequest,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createPullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePullRequest();

createPullRequest(request, options, callback)

createPullRequest(request: protos.google.cloud.securesourcemanager.v1.ICreatePullRequestRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePullRequestRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPullRequest(request, callback)

createPullRequest(request: protos.google.cloud.securesourcemanager.v1.ICreatePullRequestRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePullRequestRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPullRequestComment(request, options)

createPullRequestComment(request?: protos.google.cloud.securesourcemanager.v1.ICreatePullRequestCommentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a pull request comment. This function is used to create a single PullRequestComment of type Comment, or a single PullRequestComment of type Code that's replying to another PullRequestComment of type Code. Use BatchCreatePullRequestComments to create multiple PullRequestComments for code reviews.

Parameters
Name Description
request ICreatePullRequestCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to create the pull request comment.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The pull request comment to create.
   */
  // const pullRequestComment = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreatePullRequestComment() {
    // Construct request
    const request = {
      parent,
      pullRequestComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createPullRequestComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePullRequestComment();

createPullRequestComment(request, options, callback)

createPullRequestComment(request: protos.google.cloud.securesourcemanager.v1.ICreatePullRequestCommentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePullRequestCommentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPullRequestComment(request, callback)

createPullRequestComment(request: protos.google.cloud.securesourcemanager.v1.ICreatePullRequestCommentRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePullRequestCommentRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRepository(request, options)

createRepository(request?: protos.google.cloud.securesourcemanager.v1.ICreateRepositoryRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new repository in a given project and location.

The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.

Parameters
Name Description
request ICreateRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project in which to create the repository. Values are of the
   *  form `projects/{project_number}/locations/{location_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const repository = {}
  /**
   *  Required. The ID to use for the repository, which will become the final
   *  component of the repository's resource name. This value should be 4-63
   *  characters, and valid characters are /[a-z][0-9]-/.
   */
  // const repositoryId = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callCreateRepository() {
    // Construct request
    const request = {
      parent,
      repository,
      repositoryId,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.createRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateRepository();

createRepository(request, options, callback)

createRepository(request: protos.google.cloud.securesourcemanager.v1.ICreateRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRepositoryRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createRepository(request, callback)

createRepository(request: protos.google.cloud.securesourcemanager.v1.ICreateRepositoryRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateRepositoryRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

cryptoKeyPath(project, location, keyRing, cryptoKey)

cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string;

Return a fully-qualified cryptoKey resource name string.

Parameters
Name Description
project string
location string
keyRing string
cryptoKey string
Returns
Type Description
string

{string} Resource name string.

deleteBranchRule(request, options)

deleteBranchRule(request?: protos.google.cloud.securesourcemanager.v1.IDeleteBranchRuleRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

DeleteBranchRule deletes a branch rule.

Parameters
Name Description
request IDeleteBranchRuleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   */
  // const name = 'abc123'
  /**
   *  Optional. If set to true, and the branch rule is not found, the request
   *  will succeed but no action will be taken on the server.
   */
  // const allowMissing = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteBranchRule() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteBranchRule(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteBranchRule();

deleteBranchRule(request, options, callback)

deleteBranchRule(request: protos.google.cloud.securesourcemanager.v1.IDeleteBranchRuleRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBranchRuleRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteBranchRule(request, callback)

deleteBranchRule(request: protos.google.cloud.securesourcemanager.v1.IDeleteBranchRuleRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteBranchRuleRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteHook(request, options)

deleteHook(request?: protos.google.cloud.securesourcemanager.v1.IDeleteHookRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a Hook.

Parameters
Name Description
request IDeleteHookRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the hook to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteHook() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteHook(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteHook();

deleteHook(request, options, callback)

deleteHook(request: protos.google.cloud.securesourcemanager.v1.IDeleteHookRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteHookRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteHook(request, callback)

deleteHook(request: protos.google.cloud.securesourcemanager.v1.IDeleteHookRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteHookRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteInstance(request, options)

deleteInstance(request?: protos.google.cloud.securesourcemanager.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a single instance.

Parameters
Name Description
request IDeleteInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and
   *  the request times out. If you make the request again with the same request
   *  ID, the server can check if original operation with the same request ID
   *  was received, and if so, will ignore the second request. This prevents
   *  clients from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set to true, will force the deletion of the instance.
   */
  // const force = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteInstance(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteInstance();

deleteInstance(request, options, callback)

deleteInstance(request: protos.google.cloud.securesourcemanager.v1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteInstanceRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteInstance(request, callback)

deleteInstance(request: protos.google.cloud.securesourcemanager.v1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteInstanceRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteIssue(request, options)

deleteIssue(request?: protos.google.cloud.securesourcemanager.v1.IDeleteIssueRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes an issue.

Parameters
Name Description
request IDeleteIssueRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The current etag of the issue.
   *  If the etag is provided and does not match the current etag of the issue,
   *  deletion will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteIssue() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteIssue();

deleteIssue(request, options, callback)

deleteIssue(request: protos.google.cloud.securesourcemanager.v1.IDeleteIssueRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteIssueRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteIssue(request, callback)

deleteIssue(request: protos.google.cloud.securesourcemanager.v1.IDeleteIssueRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteIssueRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteIssueComment(request, options)

deleteIssueComment(request?: protos.google.cloud.securesourcemanager.v1.IDeleteIssueCommentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes an issue comment.

Parameters
Name Description
request IDeleteIssueCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue comment to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteIssueComment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteIssueComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteIssueComment();

deleteIssueComment(request, options, callback)

deleteIssueComment(request: protos.google.cloud.securesourcemanager.v1.IDeleteIssueCommentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteIssueCommentRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteIssueComment(request, callback)

deleteIssueComment(request: protos.google.cloud.securesourcemanager.v1.IDeleteIssueCommentRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteIssueCommentRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request DeleteOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

deletePullRequestComment(request, options)

deletePullRequestComment(request?: protos.google.cloud.securesourcemanager.v1.IDeletePullRequestCommentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a pull request comment.

Parameters
Name Description
request IDeletePullRequestCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the pull request comment to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeletePullRequestComment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deletePullRequestComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePullRequestComment();

deletePullRequestComment(request, options, callback)

deletePullRequestComment(request: protos.google.cloud.securesourcemanager.v1.IDeletePullRequestCommentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePullRequestCommentRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePullRequestComment(request, callback)

deletePullRequestComment(request: protos.google.cloud.securesourcemanager.v1.IDeletePullRequestCommentRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePullRequestCommentRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRepository(request, options)

deleteRepository(request?: protos.google.cloud.securesourcemanager.v1.IDeleteRepositoryRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a Repository.

Parameters
Name Description
request IDeleteRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the repository to delete.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. If set to true, and the repository is not found, the request will
   *  succeed but no action will be taken on the server.
   */
  // const allowMissing = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callDeleteRepository() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.deleteRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteRepository();

deleteRepository(request, options, callback)

deleteRepository(request: protos.google.cloud.securesourcemanager.v1.IDeleteRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRepositoryRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteRepository(request, callback)

deleteRepository(request: protos.google.cloud.securesourcemanager.v1.IDeleteRepositoryRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteRepositoryRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

fetchBlob(request, options)

fetchBlob(request?: protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IFetchBlobResponse,
        protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest | undefined,
        {} | undefined
    ]>;

Fetches a blob from a repository.

Parameters
Name Description
request IFetchBlobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IFetchBlobResponse, protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing FetchBlobResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
   *  Specifies the repository containing the blob.
   */
  // const repository = 'abc123'
  /**
   *  Required. The SHA-1 hash of the blob to retrieve.
   */
  // const sha = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callFetchBlob() {
    // Construct request
    const request = {
      repository,
      sha,
    };

    // Run request
    const response = await securesourcemanagerClient.fetchBlob(request);
    console.log(response);
  }

  callFetchBlob();

fetchBlob(request, options, callback)

fetchBlob(request: protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IFetchBlobResponse, protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IFetchBlobRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IFetchBlobResponse, protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

fetchBlob(request, callback)

fetchBlob(request: protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IFetchBlobResponse, protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IFetchBlobRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IFetchBlobResponse, protos.google.cloud.securesourcemanager.v1.IFetchBlobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

fetchTree(request, options)

fetchTree(request?: protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.ITreeEntry[],
        protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest | null,
        protos.google.cloud.securesourcemanager.v1.IFetchTreeResponse
    ]>;

Fetches a tree from a repository.

Parameters
Name Description
request IFetchTreeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.ITreeEntry[], protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest | null, protos.google.cloud.securesourcemanager.v1.IFetchTreeResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using fetchTreeAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

fetchTree(request, options, callback)

fetchTree(request: protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, protos.google.cloud.securesourcemanager.v1.IFetchTreeResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.ITreeEntry>): void;
Parameters
Name Description
request IFetchTreeRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, protos.google.cloud.securesourcemanager.v1.IFetchTreeResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.ITreeEntry>
Returns
Type Description
void

fetchTree(request, callback)

fetchTree(request: protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, protos.google.cloud.securesourcemanager.v1.IFetchTreeResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.ITreeEntry>): void;
Parameters
Name Description
request IFetchTreeRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, protos.google.cloud.securesourcemanager.v1.IFetchTreeResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.ITreeEntry>
Returns
Type Description
void

fetchTreeAsync(request, options)

fetchTreeAsync(request?: protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.ITreeEntry>;

Equivalent to fetchTree, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IFetchTreeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.ITreeEntry>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
   *  Specifies the repository to fetch the tree from.
   */
  // const repository = 'abc123'
  /**
   *  Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies
   *  which tree to fetch. If not specified, the default branch will be used.
   */
  // const ref = 'abc123'
  /**
   *  Optional. If true, include all subfolders and their files in the response.
   *  If false, only the immediate children are returned.
   */
  // const recursive = true
  /**
   *  Optional. Requested page size.  Server may return fewer items than
   *  requested. If unspecified, at most 10,000 items will be returned.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callFetchTree() {
    // Construct request
    const request = {
      repository,
    };

    // Run request
    const iterable = securesourcemanagerClient.fetchTreeAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callFetchTree();

fetchTreeStream(request, options)

fetchTreeStream(request?: protos.google.cloud.securesourcemanager.v1.IFetchTreeRequest, options?: CallOptions): Transform;

Equivalent to fetchTree, but returns a NodeJS Stream object.

Parameters
Name Description
request IFetchTreeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using fetchTreeAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

getBranchRule(request, options)

getBranchRule(request?: protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IBranchRule,
        (protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest | undefined),
        {} | undefined
    ]>;

GetBranchRule gets a branch rule.

Parameters
Name Description
request IGetBranchRuleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IBranchRule, (protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the repository to retrieve.
   *  The format is
   *  `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetBranchRule() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getBranchRule(request);
    console.log(response);
  }

  callGetBranchRule();

getBranchRule(request, options, callback)

getBranchRule(request: protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBranchRuleRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getBranchRule(request, callback)

getBranchRule(request: protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetBranchRuleRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IGetBranchRuleRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getHook(request, options)

getHook(request?: protos.google.cloud.securesourcemanager.v1.IGetHookRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IHook,
        protos.google.cloud.securesourcemanager.v1.IGetHookRequest | undefined,
        {} | undefined
    ]>;

Gets metadata of a hook.

Parameters
Name Description
request IGetHookRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IGetHookRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the hook to retrieve.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetHook() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getHook(request);
    console.log(response);
  }

  callGetHook();

getHook(request, options, callback)

getHook(request: protos.google.cloud.securesourcemanager.v1.IGetHookRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IGetHookRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetHookRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IGetHookRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getHook(request, callback)

getHook(request: protos.google.cloud.securesourcemanager.v1.IGetHookRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IGetHookRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetHookRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IGetHookRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

getIamPolicyRepo(request, options)

getIamPolicyRepo(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.IGetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Get IAM policy for a repository.

Parameters
Name Description
request IGetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  OPTIONAL: A `GetPolicyOptions` object for specifying options to
   *  `GetIamPolicy`.
   */
  // const options = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetIamPolicyRepo() {
    // Construct request
    const request = {
      resource,
    };

    // Run request
    const response = await securesourcemanagerClient.getIamPolicyRepo(request);
    console.log(response);
  }

  callGetIamPolicyRepo();

getIamPolicyRepo(request, options, callback)

getIamPolicyRepo(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIamPolicyRepo(request, callback)

getIamPolicyRepo(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getInstance(request, options)

getInstance(request?: protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IInstance,
        (protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single instance.

Parameters
Name Description
request IGetInstanceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IInstance, (protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetInstance() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getInstance(request);
    console.log(response);
  }

  callGetInstance();

getInstance(request, options, callback)

getInstance(request: protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetInstanceRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getInstance(request, callback)

getInstance(request: protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetInstanceRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIssue(request, options)

getIssue(request?: protos.google.cloud.securesourcemanager.v1.IGetIssueRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IIssue,
        protos.google.cloud.securesourcemanager.v1.IGetIssueRequest | undefined,
        {} | undefined
    ]>;

Gets an issue.

Parameters
Name Description
request IGetIssueRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IGetIssueRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue to retrieve.
   *  The format is
   *  `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetIssue() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getIssue(request);
    console.log(response);
  }

  callGetIssue();

getIssue(request, options, callback)

getIssue(request: protos.google.cloud.securesourcemanager.v1.IGetIssueRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IGetIssueRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIssueRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IGetIssueRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIssue(request, callback)

getIssue(request: protos.google.cloud.securesourcemanager.v1.IGetIssueRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IGetIssueRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIssueRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IGetIssueRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIssueComment(request, options)

getIssueComment(request?: protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IIssueComment,
        (protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest | undefined),
        {} | undefined
    ]>;

Gets an issue comment.

Parameters
Name Description
request IGetIssueCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IIssueComment, (protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing IssueComment. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue comment to retrieve.
   *  The format is
   *  `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetIssueComment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getIssueComment(request);
    console.log(response);
  }

  callGetIssueComment();

getIssueComment(request, options, callback)

getIssueComment(request: protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIssueCommentRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getIssueComment(request, callback)

getIssueComment(request: protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetIssueCommentRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IGetIssueCommentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
Name Description
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, optionsOrCallback, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request GetOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getPullRequest(request, options)

getPullRequest(request?: protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IPullRequest,
        (protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest | undefined),
        {} | undefined
    ]>;

Gets a pull request.

Parameters
Name Description
request IGetPullRequestRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IPullRequest, (protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the pull request to retrieve.
   *  The format is
   *  `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetPullRequest() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getPullRequest(request);
    console.log(response);
  }

  callGetPullRequest();

getPullRequest(request, options, callback)

getPullRequest(request: protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPullRequestRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPullRequest(request, callback)

getPullRequest(request: protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPullRequestRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IGetPullRequestRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPullRequestComment(request, options)

getPullRequestComment(request?: protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IPullRequestComment,
        (protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest | undefined),
        {} | undefined
    ]>;

Gets a pull request comment.

Parameters
Name Description
request IGetPullRequestCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IPullRequestComment, (protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the pull request comment to retrieve.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetPullRequestComment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getPullRequestComment(request);
    console.log(response);
  }

  callGetPullRequestComment();

getPullRequestComment(request, options, callback)

getPullRequestComment(request: protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPullRequestCommentRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPullRequestComment(request, callback)

getPullRequestComment(request: protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPullRequestCommentRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IGetPullRequestCommentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRepository(request, options)

getRepository(request?: protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IRepository,
        (protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | undefined),
        {} | undefined
    ]>;

Gets metadata of a repository.

Parameters
Name Description
request IGetRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IRepository, (protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the repository to retrieve.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callGetRepository() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await securesourcemanagerClient.getRepository(request);
    console.log(response);
  }

  callGetRepository();

getRepository(request, options, callback)

getRepository(request: protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRepositoryRequest
options CallOptions
callback Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getRepository(request, callback)

getRepository(request: protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetRepositoryRequest
callback Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

hookPath(project, location, repository, hook)

hookPath(project: string, location: string, repository: string, hook: string): string;

Return a fully-qualified hook resource name string.

Parameters
Name Description
project string
location string
repository string
hook string
Returns
Type Description
string

{string} Resource name string.

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

instancePath(project, location, instance)

instancePath(project: string, location: string, instance: string): string;

Return a fully-qualified instance resource name string.

Parameters
Name Description
project string
location string
instance string
Returns
Type Description
string

{string} Resource name string.

issueCommentPath(project, location, repository, issue, comment)

issueCommentPath(project: string, location: string, repository: string, issue: string, comment: string): string;

Return a fully-qualified issueComment resource name string.

Parameters
Name Description
project string
location string
repository string
issue string
comment string
Returns
Type Description
string

{string} Resource name string.

issuePath(project, location, repository, issue)

issuePath(project: string, location: string, repository: string, issue: string): string;

Return a fully-qualified issue resource name string.

Parameters
Name Description
project string
location string
repository string
issue string
Returns
Type Description
string

{string} Resource name string.

listBranchRules(request, options)

listBranchRules(request?: protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IBranchRule[],
        protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListBranchRulesResponse
    ]>;

ListBranchRules lists branch rules in a given repository.

Parameters
Name Description
request IListBranchRulesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IBranchRule[], protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest | null, protos.google.cloud.securesourcemanager.v1.IListBranchRulesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listBranchRulesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listBranchRules(request, options, callback)

listBranchRules(request: protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, protos.google.cloud.securesourcemanager.v1.IListBranchRulesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IBranchRule>): void;
Parameters
Name Description
request IListBranchRulesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, protos.google.cloud.securesourcemanager.v1.IListBranchRulesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IBranchRule>
Returns
Type Description
void

listBranchRules(request, callback)

listBranchRules(request: protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, protos.google.cloud.securesourcemanager.v1.IListBranchRulesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IBranchRule>): void;
Parameters
Name Description
request IListBranchRulesRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, protos.google.cloud.securesourcemanager.v1.IListBranchRulesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IBranchRule>
Returns
Type Description
void

listBranchRulesAsync(request, options)

listBranchRulesAsync(request?: protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IBranchRule>;

Equivalent to listBranchRules, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListBranchRulesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IBranchRule>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListBranchRules() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listBranchRulesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListBranchRules();

listBranchRulesStream(request, options)

listBranchRulesStream(request?: protos.google.cloud.securesourcemanager.v1.IListBranchRulesRequest, options?: CallOptions): Transform;

Equivalent to listBranchRules, but returns a NodeJS Stream object.

Parameters
Name Description
request IListBranchRulesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listBranchRulesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listHooks(request, options)

listHooks(request?: protos.google.cloud.securesourcemanager.v1.IListHooksRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IHook[],
        protos.google.cloud.securesourcemanager.v1.IListHooksRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListHooksResponse
    ]>;

Lists hooks in a given repository.

Parameters
Name Description
request IListHooksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IHook[], protos.google.cloud.securesourcemanager.v1.IListHooksRequest | null, protos.google.cloud.securesourcemanager.v1.IListHooksResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listHooksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listHooks(request, options, callback)

listHooks(request: protos.google.cloud.securesourcemanager.v1.IListHooksRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListHooksRequest, protos.google.cloud.securesourcemanager.v1.IListHooksResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IHook>): void;
Parameters
Name Description
request IListHooksRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListHooksRequest, protos.google.cloud.securesourcemanager.v1.IListHooksResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IHook>
Returns
Type Description
void

listHooks(request, callback)

listHooks(request: protos.google.cloud.securesourcemanager.v1.IListHooksRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListHooksRequest, protos.google.cloud.securesourcemanager.v1.IListHooksResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IHook>): void;
Parameters
Name Description
request IListHooksRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListHooksRequest, protos.google.cloud.securesourcemanager.v1.IListHooksResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IHook>
Returns
Type Description
void

listHooksAsync(request, options)

listHooksAsync(request?: protos.google.cloud.securesourcemanager.v1.IListHooksRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IHook>;

Equivalent to listHooks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListHooksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IHook>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListHooksRequest.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListHooks() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listHooksAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListHooks();

listHooksStream(request, options)

listHooksStream(request?: protos.google.cloud.securesourcemanager.v1.IListHooksRequest, options?: CallOptions): Transform;

Equivalent to listHooks, but returns a NodeJS Stream object.

Parameters
Name Description
request IListHooksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listHooksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listInstances(request, options)

listInstances(request?: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IInstance[],
        protos.google.cloud.securesourcemanager.v1.IListInstancesRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListInstancesResponse
    ]>;

Lists Instances in a given project and location.

Parameters
Name Description
request IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IInstance[], protos.google.cloud.securesourcemanager.v1.IListInstancesRequest | null, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listInstancesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listInstances(request, options, callback)

listInstances(request: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>): void;
Parameters
Name Description
request IListInstancesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>
Returns
Type Description
void

listInstances(request, callback)

listInstances(request: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>): void;
Parameters
Name Description
request IListInstancesRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>
Returns
Type Description
void

listInstancesAsync(request, options)

listInstancesAsync(request?: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IInstance>;

Equivalent to listInstances, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IInstance>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListInstancesRequest.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. Server may return fewer items than
   *  requested. If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filter for filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. Hint for how to order the results.
   */
  // const orderBy = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListInstances() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listInstancesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListInstances();

listInstancesStream(request, options)

listInstancesStream(request?: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options?: CallOptions): Transform;

Equivalent to listInstances, but returns a NodeJS Stream object.

Parameters
Name Description
request IListInstancesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listInstancesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listIssueComments(request, options)

listIssueComments(request?: protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IIssueComment[],
        protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListIssueCommentsResponse
    ]>;

Lists comments in an issue.

Parameters
Name Description
request IListIssueCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IIssueComment[], protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest | null, protos.google.cloud.securesourcemanager.v1.IListIssueCommentsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of IssueComment. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listIssueCommentsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listIssueComments(request, options, callback)

listIssueComments(request: protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListIssueCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssueComment>): void;
Parameters
Name Description
request IListIssueCommentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListIssueCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssueComment>
Returns
Type Description
void

listIssueComments(request, callback)

listIssueComments(request: protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListIssueCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssueComment>): void;
Parameters
Name Description
request IListIssueCommentsRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListIssueCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssueComment>
Returns
Type Description
void

listIssueCommentsAsync(request, options)

listIssueCommentsAsync(request?: protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IIssueComment>;

Equivalent to listIssueComments, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListIssueCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IIssueComment>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing IssueComment. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The issue in which to list the comments. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListIssueComments() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listIssueCommentsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListIssueComments();

listIssueCommentsStream(request, options)

listIssueCommentsStream(request?: protos.google.cloud.securesourcemanager.v1.IListIssueCommentsRequest, options?: CallOptions): Transform;

Equivalent to listIssueComments, but returns a NodeJS Stream object.

Parameters
Name Description
request IListIssueCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing IssueComment on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listIssueCommentsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listIssues(request, options)

listIssues(request?: protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IIssue[],
        protos.google.cloud.securesourcemanager.v1.IListIssuesRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListIssuesResponse
    ]>;

Lists issues in a repository.

Parameters
Name Description
request IListIssuesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IIssue[], protos.google.cloud.securesourcemanager.v1.IListIssuesRequest | null, protos.google.cloud.securesourcemanager.v1.IListIssuesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listIssuesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listIssues(request, options, callback)

listIssues(request: protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, protos.google.cloud.securesourcemanager.v1.IListIssuesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssue>): void;
Parameters
Name Description
request IListIssuesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, protos.google.cloud.securesourcemanager.v1.IListIssuesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssue>
Returns
Type Description
void

listIssues(request, callback)

listIssues(request: protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, protos.google.cloud.securesourcemanager.v1.IListIssuesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssue>): void;
Parameters
Name Description
request IListIssuesRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, protos.google.cloud.securesourcemanager.v1.IListIssuesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IIssue>
Returns
Type Description
void

listIssuesAsync(request, options)

listIssuesAsync(request?: protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IIssue>;

Equivalent to listIssues, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListIssuesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IIssue>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository in which to list issues. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Used to filter the resulting issues list.
   */
  // const filter = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListIssues() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listIssuesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListIssues();

listIssuesStream(request, options)

listIssuesStream(request?: protos.google.cloud.securesourcemanager.v1.IListIssuesRequest, options?: CallOptions): Transform;

Equivalent to listIssues, but returns a NodeJS Stream object.

Parameters
Name Description
request IListIssuesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listIssuesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
Name Description
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listPullRequestComments(request, options)

listPullRequestComments(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IPullRequestComment[],
        protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsResponse
    ]>;

Lists pull request comments.

Parameters
Name Description
request IListPullRequestCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IPullRequestComment[], protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest | null, protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPullRequestCommentsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPullRequestComments(request, options, callback)

listPullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequestComment>): void;
Parameters
Name Description
request IListPullRequestCommentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequestComment>
Returns
Type Description
void

listPullRequestComments(request, callback)

listPullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequestComment>): void;
Parameters
Name Description
request IListPullRequestCommentsRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequestComment>
Returns
Type Description
void

listPullRequestCommentsAsync(request, options)

listPullRequestCommentsAsync(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IPullRequestComment>;

Equivalent to listPullRequestComments, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListPullRequestCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IPullRequestComment>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to list pull request comments. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListPullRequestComments() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listPullRequestCommentsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPullRequestComments();

listPullRequestCommentsStream(request, options)

listPullRequestCommentsStream(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestCommentsRequest, options?: CallOptions): Transform;

Equivalent to listPullRequestComments, but returns a NodeJS Stream object.

Parameters
Name Description
request IListPullRequestCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPullRequestCommentsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPullRequestFileDiffs(request, options)

listPullRequestFileDiffs(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IFileDiff[],
        protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsResponse
    ]>;

Lists a pull request's file diffs.

Parameters
Name Description
request IListPullRequestFileDiffsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IFileDiff[], protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest | null, protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPullRequestFileDiffsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPullRequestFileDiffs(request, options, callback)

listPullRequestFileDiffs(request: protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IFileDiff>): void;
Parameters
Name Description
request IListPullRequestFileDiffsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IFileDiff>
Returns
Type Description
void

listPullRequestFileDiffs(request, callback)

listPullRequestFileDiffs(request: protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IFileDiff>): void;
Parameters
Name Description
request IListPullRequestFileDiffsRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IFileDiff>
Returns
Type Description
void

listPullRequestFileDiffsAsync(request, options)

listPullRequestFileDiffsAsync(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IFileDiff>;

Equivalent to listPullRequestFileDiffs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListPullRequestFileDiffsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IFileDiff>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to list file diffs for.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const name = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListPullRequestFileDiffs() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const iterable = securesourcemanagerClient.listPullRequestFileDiffsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPullRequestFileDiffs();

listPullRequestFileDiffsStream(request, options)

listPullRequestFileDiffsStream(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestFileDiffsRequest, options?: CallOptions): Transform;

Equivalent to listPullRequestFileDiffs, but returns a NodeJS Stream object.

Parameters
Name Description
request IListPullRequestFileDiffsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPullRequestFileDiffsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPullRequests(request, options)

listPullRequests(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IPullRequest[],
        protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListPullRequestsResponse
    ]>;

Lists pull requests in a repository.

Parameters
Name Description
request IListPullRequestsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IPullRequest[], protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest | null, protos.google.cloud.securesourcemanager.v1.IListPullRequestsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPullRequestsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPullRequests(request, options, callback)

listPullRequests(request: protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequest>): void;
Parameters
Name Description
request IListPullRequestsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequest>
Returns
Type Description
void

listPullRequests(request, callback)

listPullRequests(request: protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequest>): void;
Parameters
Name Description
request IListPullRequestsRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, protos.google.cloud.securesourcemanager.v1.IListPullRequestsResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IPullRequest>
Returns
Type Description
void

listPullRequestsAsync(request, options)

listPullRequestsAsync(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IPullRequest>;

Equivalent to listPullRequests, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListPullRequestsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IPullRequest>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The repository in which to list pull requests. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListPullRequests() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listPullRequestsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPullRequests();

listPullRequestsStream(request, options)

listPullRequestsStream(request?: protos.google.cloud.securesourcemanager.v1.IListPullRequestsRequest, options?: CallOptions): Transform;

Equivalent to listPullRequests, but returns a NodeJS Stream object.

Parameters
Name Description
request IListPullRequestsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPullRequestsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRepositories(request, options)

listRepositories(request?: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.securesourcemanager.v1.IRepository[],
        protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest | null,
        protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse
    ]>;

Lists Repositories in a given project and location.

The instance field is required in the query parameter for requests using the securesourcemanager.googleapis.com endpoint.

Parameters
Name Description
request IListRepositoriesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.securesourcemanager.v1.IRepository[], protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest | null, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRepositoriesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listRepositories(request, options, callback)

listRepositories(request: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>): void;
Parameters
Name Description
request IListRepositoriesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>
Returns
Type Description
void

listRepositories(request, callback)

listRepositories(request: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>): void;
Parameters
Name Description
request IListRepositoriesRequest
callback PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>
Returns
Type Description
void

listRepositoriesAsync(request, options)

listRepositoriesAsync(request?: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IRepository>;

Equivalent to listRepositories, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListRepositoriesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IRepository>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for ListRepositoriesRequest.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. If unspecified, a default size of 30 will be
   *  used. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filter results.
   */
  // const filter = 'abc123'
  /**
   *  Optional. The name of the instance in which the repository is hosted,
   *  formatted as
   *  `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
   *  When listing repositories via securesourcemanager.googleapis.com, this
   *  field is required. When listing repositories via *.sourcemanager.dev, this
   *  field is ignored.
   */
  // const instance = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callListRepositories() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = securesourcemanagerClient.listRepositoriesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListRepositories();

listRepositoriesStream(request, options)

listRepositoriesStream(request?: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options?: CallOptions): Transform;

Equivalent to listRepositories, but returns a NodeJS Stream object.

Parameters
Name Description
request IListRepositoriesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRepositoriesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchBranchRuleFromBranchRuleName(branchRuleName)

matchBranchRuleFromBranchRuleName(branchRuleName: string): string | number;

Parse the branch_rule from BranchRule resource.

Parameter
Name Description
branchRuleName string

A fully-qualified path representing BranchRule resource.

Returns
Type Description
string | number

{string} A string representing the branch_rule.

matchCommentFromIssueCommentName(issueCommentName)

matchCommentFromIssueCommentName(issueCommentName: string): string | number;

Parse the comment from IssueComment resource.

Parameter
Name Description
issueCommentName string

A fully-qualified path representing IssueComment resource.

Returns
Type Description
string | number

{string} A string representing the comment.

matchCommentFromPullRequestCommentName(pullRequestCommentName)

matchCommentFromPullRequestCommentName(pullRequestCommentName: string): string | number;

Parse the comment from PullRequestComment resource.

Parameter
Name Description
pullRequestCommentName string

A fully-qualified path representing PullRequestComment resource.

Returns
Type Description
string | number

{string} A string representing the comment.

matchCryptoKeyFromCryptoKeyName(cryptoKeyName)

matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string): string | number;

Parse the crypto_key from CryptoKey resource.

Parameter
Name Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns
Type Description
string | number

{string} A string representing the crypto_key.

matchHookFromHookName(hookName)

matchHookFromHookName(hookName: string): string | number;

Parse the hook from Hook resource.

Parameter
Name Description
hookName string

A fully-qualified path representing Hook resource.

Returns
Type Description
string | number

{string} A string representing the hook.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance resource.

Returns
Type Description
string | number

{string} A string representing the instance.

matchIssueFromIssueCommentName(issueCommentName)

matchIssueFromIssueCommentName(issueCommentName: string): string | number;

Parse the issue from IssueComment resource.

Parameter
Name Description
issueCommentName string

A fully-qualified path representing IssueComment resource.

Returns
Type Description
string | number

{string} A string representing the issue.

matchIssueFromIssueName(issueName)

matchIssueFromIssueName(issueName: string): string | number;

Parse the issue from Issue resource.

Parameter
Name Description
issueName string

A fully-qualified path representing Issue resource.

Returns
Type Description
string | number

{string} A string representing the issue.

matchKeyRingFromCryptoKeyName(cryptoKeyName)

matchKeyRingFromCryptoKeyName(cryptoKeyName: string): string | number;

Parse the key_ring from CryptoKey resource.

Parameter
Name Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns
Type Description
string | number

{string} A string representing the key_ring.

matchLocationFromBranchRuleName(branchRuleName)

matchLocationFromBranchRuleName(branchRuleName: string): string | number;

Parse the location from BranchRule resource.

Parameter
Name Description
branchRuleName string

A fully-qualified path representing BranchRule resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromCryptoKeyName(cryptoKeyName)

matchLocationFromCryptoKeyName(cryptoKeyName: string): string | number;

Parse the location from CryptoKey resource.

Parameter
Name Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromHookName(hookName)

matchLocationFromHookName(hookName: string): string | number;

Parse the location from Hook resource.

Parameter
Name Description
hookName string

A fully-qualified path representing Hook resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromInstanceName(instanceName)

matchLocationFromInstanceName(instanceName: string): string | number;

Parse the location from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromIssueCommentName(issueCommentName)

matchLocationFromIssueCommentName(issueCommentName: string): string | number;

Parse the location from IssueComment resource.

Parameter
Name Description
issueCommentName string

A fully-qualified path representing IssueComment resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromIssueName(issueName)

matchLocationFromIssueName(issueName: string): string | number;

Parse the location from Issue resource.

Parameter
Name Description
issueName string

A fully-qualified path representing Issue resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromPullRequestCommentName(pullRequestCommentName)

matchLocationFromPullRequestCommentName(pullRequestCommentName: string): string | number;

Parse the location from PullRequestComment resource.

Parameter
Name Description
pullRequestCommentName string

A fully-qualified path representing PullRequestComment resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromPullRequestName(pullRequestName)

matchLocationFromPullRequestName(pullRequestName: string): string | number;

Parse the location from PullRequest resource.

Parameter
Name Description
pullRequestName string

A fully-qualified path representing PullRequest resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromRepositoryName(repositoryName)

matchLocationFromRepositoryName(repositoryName: string): string | number;

Parse the location from Repository resource.

Parameter
Name Description
repositoryName string

A fully-qualified path representing Repository resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchProjectFromBranchRuleName(branchRuleName)

matchProjectFromBranchRuleName(branchRuleName: string): string | number;

Parse the project from BranchRule resource.

Parameter
Name Description
branchRuleName string

A fully-qualified path representing BranchRule resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromCryptoKeyName(cryptoKeyName)

matchProjectFromCryptoKeyName(cryptoKeyName: string): string | number;

Parse the project from CryptoKey resource.

Parameter
Name Description
cryptoKeyName string

A fully-qualified path representing CryptoKey resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromHookName(hookName)

matchProjectFromHookName(hookName: string): string | number;

Parse the project from Hook resource.

Parameter
Name Description
hookName string

A fully-qualified path representing Hook resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromInstanceName(instanceName)

matchProjectFromInstanceName(instanceName: string): string | number;

Parse the project from Instance resource.

Parameter
Name Description
instanceName string

A fully-qualified path representing Instance resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromIssueCommentName(issueCommentName)

matchProjectFromIssueCommentName(issueCommentName: string): string | number;

Parse the project from IssueComment resource.

Parameter
Name Description
issueCommentName string

A fully-qualified path representing IssueComment resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromIssueName(issueName)

matchProjectFromIssueName(issueName: string): string | number;

Parse the project from Issue resource.

Parameter
Name Description
issueName string

A fully-qualified path representing Issue resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromPullRequestCommentName(pullRequestCommentName)

matchProjectFromPullRequestCommentName(pullRequestCommentName: string): string | number;

Parse the project from PullRequestComment resource.

Parameter
Name Description
pullRequestCommentName string

A fully-qualified path representing PullRequestComment resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromPullRequestName(pullRequestName)

matchProjectFromPullRequestName(pullRequestName: string): string | number;

Parse the project from PullRequest resource.

Parameter
Name Description
pullRequestName string

A fully-qualified path representing PullRequest resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromRepositoryName(repositoryName)

matchProjectFromRepositoryName(repositoryName: string): string | number;

Parse the project from Repository resource.

Parameter
Name Description
repositoryName string

A fully-qualified path representing Repository resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromServiceAccountName(serviceAccountName)

matchProjectFromServiceAccountName(serviceAccountName: string): string | number;

Parse the project from ServiceAccount resource.

Parameter
Name Description
serviceAccountName string

A fully-qualified path representing ServiceAccount resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchPullRequestFromPullRequestCommentName(pullRequestCommentName)

matchPullRequestFromPullRequestCommentName(pullRequestCommentName: string): string | number;

Parse the pull_request from PullRequestComment resource.

Parameter
Name Description
pullRequestCommentName string

A fully-qualified path representing PullRequestComment resource.

Returns
Type Description
string | number

{string} A string representing the pull_request.

matchPullRequestFromPullRequestName(pullRequestName)

matchPullRequestFromPullRequestName(pullRequestName: string): string | number;

Parse the pull_request from PullRequest resource.

Parameter
Name Description
pullRequestName string

A fully-qualified path representing PullRequest resource.

Returns
Type Description
string | number

{string} A string representing the pull_request.

matchRepositoryFromBranchRuleName(branchRuleName)

matchRepositoryFromBranchRuleName(branchRuleName: string): string | number;

Parse the repository from BranchRule resource.

Parameter
Name Description
branchRuleName string

A fully-qualified path representing BranchRule resource.

Returns
Type Description
string | number

{string} A string representing the repository.

matchRepositoryFromHookName(hookName)

matchRepositoryFromHookName(hookName: string): string | number;

Parse the repository from Hook resource.

Parameter
Name Description
hookName string

A fully-qualified path representing Hook resource.

Returns
Type Description
string | number

{string} A string representing the repository.

matchRepositoryFromIssueCommentName(issueCommentName)

matchRepositoryFromIssueCommentName(issueCommentName: string): string | number;

Parse the repository from IssueComment resource.

Parameter
Name Description
issueCommentName string

A fully-qualified path representing IssueComment resource.

Returns
Type Description
string | number

{string} A string representing the repository.

matchRepositoryFromIssueName(issueName)

matchRepositoryFromIssueName(issueName: string): string | number;

Parse the repository from Issue resource.

Parameter
Name Description
issueName string

A fully-qualified path representing Issue resource.

Returns
Type Description
string | number

{string} A string representing the repository.

matchRepositoryFromPullRequestCommentName(pullRequestCommentName)

matchRepositoryFromPullRequestCommentName(pullRequestCommentName: string): string | number;

Parse the repository from PullRequestComment resource.

Parameter
Name Description
pullRequestCommentName string

A fully-qualified path representing PullRequestComment resource.

Returns
Type Description
string | number

{string} A string representing the repository.

matchRepositoryFromPullRequestName(pullRequestName)

matchRepositoryFromPullRequestName(pullRequestName: string): string | number;

Parse the repository from PullRequest resource.

Parameter
Name Description
pullRequestName string

A fully-qualified path representing PullRequest resource.

Returns
Type Description
string | number

{string} A string representing the repository.

matchRepositoryFromRepositoryName(repositoryName)

matchRepositoryFromRepositoryName(repositoryName: string): string | number;

Parse the repository from Repository resource.

Parameter
Name Description
repositoryName string

A fully-qualified path representing Repository resource.

Returns
Type Description
string | number

{string} A string representing the repository.

matchServiceAccountFromServiceAccountName(serviceAccountName)

matchServiceAccountFromServiceAccountName(serviceAccountName: string): string | number;

Parse the service_account from ServiceAccount resource.

Parameter
Name Description
serviceAccountName string

A fully-qualified path representing ServiceAccount resource.

Returns
Type Description
string | number

{string} A string representing the service_account.

mergePullRequest(request, options)

mergePullRequest(request?: protos.google.cloud.securesourcemanager.v1.IMergePullRequestRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Merges a pull request.

Parameters
Name Description
request IMergePullRequestRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to merge.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callMergePullRequest() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.mergePullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callMergePullRequest();

mergePullRequest(request, options, callback)

mergePullRequest(request: protos.google.cloud.securesourcemanager.v1.IMergePullRequestRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IMergePullRequestRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

mergePullRequest(request, callback)

mergePullRequest(request: protos.google.cloud.securesourcemanager.v1.IMergePullRequestRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IMergePullRequestRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

openIssue(request, options)

openIssue(request?: protos.google.cloud.securesourcemanager.v1.IOpenIssueRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Opens an issue.

Parameters
Name Description
request IOpenIssueRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the issue to open.
   *  The format is
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
   */
  // const name = 'abc123'
  /**
   *  Optional. The current etag of the issue.
   *  If the etag is provided and does not match the current etag of the issue,
   *  opening will be blocked and an ABORTED error will be returned.
   */
  // const etag = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callOpenIssue() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.openIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callOpenIssue();

openIssue(request, options, callback)

openIssue(request: protos.google.cloud.securesourcemanager.v1.IOpenIssueRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IOpenIssueRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

openIssue(request, callback)

openIssue(request: protos.google.cloud.securesourcemanager.v1.IOpenIssueRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IOpenIssueRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

openPullRequest(request, options)

openPullRequest(request?: protos.google.cloud.securesourcemanager.v1.IOpenPullRequestRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Opens a pull request.

Parameters
Name Description
request IOpenPullRequestRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to open.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const name = 'abc123'

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callOpenPullRequest() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.openPullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callOpenPullRequest();

openPullRequest(request, options, callback)

openPullRequest(request: protos.google.cloud.securesourcemanager.v1.IOpenPullRequestRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IOpenPullRequestRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

openPullRequest(request, callback)

openPullRequest(request: protos.google.cloud.securesourcemanager.v1.IOpenPullRequestRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IOpenPullRequestRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

pullRequestCommentPath(project, location, repository, pullRequest, comment)

pullRequestCommentPath(project: string, location: string, repository: string, pullRequest: string, comment: string): string;

Return a fully-qualified pullRequestComment resource name string.

Parameters
Name Description
project string
location string
repository string
pullRequest string
comment string
Returns
Type Description
string

{string} Resource name string.

pullRequestPath(project, location, repository, pullRequest)

pullRequestPath(project: string, location: string, repository: string, pullRequest: string): string;

Return a fully-qualified pullRequest resource name string.

Parameters
Name Description
project string
location string
repository string
pullRequest string
Returns
Type Description
string

{string} Resource name string.

repositoryPath(project, location, repository)

repositoryPath(project: string, location: string, repository: string): string;

Return a fully-qualified repository resource name string.

Parameters
Name Description
project string
location string
repository string
Returns
Type Description
string

{string} Resource name string.

resolvePullRequestComments(request, options)

resolvePullRequestComments(request?: protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Resolves pull request comments. A list of PullRequestComment names must be provided. The PullRequestComment names must be in the same conversation thread. If auto_fill is set, all comments in the conversation thread will be resolved.

Parameters
Name Description
request IResolvePullRequestCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to resolve the pull request comments.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The names of the pull request comments to resolve. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
   *  Only comments from the same threads are allowed in the same request.
   */
  // const names = ['abc','def']
  /**
   *  Optional. If set, at least one comment in a thread is required, rest of the
   *  comments in the same thread will be automatically updated to resolved. If
   *  unset, all comments in the same thread need be present.
   */
  // const autoFill = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callResolvePullRequestComments() {
    // Construct request
    const request = {
      parent,
      names,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.resolvePullRequestComments(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callResolvePullRequestComments();

resolvePullRequestComments(request, options, callback)

resolvePullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IResolvePullRequestCommentsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

resolvePullRequestComments(request, callback)

resolvePullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IResolvePullRequestCommentsRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IResolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

serviceAccountPath(project, serviceAccount)

serviceAccountPath(project: string, serviceAccount: string): string;

Return a fully-qualified serviceAccount resource name string.

Parameters
Name Description
project string
serviceAccount string
Returns
Type Description
string

{string} Resource name string.

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.Policy]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

setIamPolicyRepo(request, options)

setIamPolicyRepo(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.IPolicy,
        protos.google.iam.v1.ISetIamPolicyRequest | undefined,
        {} | undefined
    ]>;

Set IAM policy on a repository.

Parameters
Name Description
request ISetIamPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy is being specified.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  REQUIRED: The complete policy to be applied to the `resource`. The size of
   *  the policy is limited to a few 10s of KB. An empty policy is a
   *  valid policy but certain Cloud Platform services (such as Projects)
   *  might reject them.
   */
  // const policy = {}
  /**
   *  OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
   *  the fields in the mask will be modified. If no mask is provided, the
   *  following default mask is used:
   *  `paths: "bindings, etag"`
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callSetIamPolicyRepo() {
    // Construct request
    const request = {
      resource,
      policy,
    };

    // Run request
    const response = await securesourcemanagerClient.setIamPolicyRepo(request);
    console.log(response);
  }

  callSetIamPolicyRepo();

setIamPolicyRepo(request, options, callback)

setIamPolicyRepo(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ISetIamPolicyRequest
options CallOptions
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

setIamPolicyRepo(request, callback)

setIamPolicyRepo(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ISetIamPolicyRequest
callback Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing .

Returns
Type Description
Promise<[google.iam.v1.TestIamPermissionsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

testIamPermissionsRepo(request, options)

testIamPermissionsRepo(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
        protos.google.iam.v1.ITestIamPermissionsResponse,
        protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
        {} | undefined
    ]>;

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Parameters
Name Description
request ITestIamPermissionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing TestIamPermissionsResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  REQUIRED: The resource for which the policy detail is being requested.
   *  See the operation documentation for the appropriate value for this field.
   */
  // const resource = 'abc123'
  /**
   *  The set of permissions to check for the `resource`. Permissions with
   *  wildcards (such as '*' or 'storage.*') are not allowed. For more
   *  information see
   *  IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
   */
  // const permissions = ['abc','def']

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callTestIamPermissionsRepo() {
    // Construct request
    const request = {
      resource,
      permissions,
    };

    // Run request
    const response = await securesourcemanagerClient.testIamPermissionsRepo(request);
    console.log(response);
  }

  callTestIamPermissionsRepo();

testIamPermissionsRepo(request, options, callback)

testIamPermissionsRepo(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ITestIamPermissionsRequest
options CallOptions
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

testIamPermissionsRepo(request, callback)

testIamPermissionsRepo(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ITestIamPermissionsRequest
callback Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

unresolvePullRequestComments(request, options)

unresolvePullRequestComments(request?: protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Unresolves pull request comments. A list of PullRequestComment names must be provided. The PullRequestComment names must be in the same conversation thread. If auto_fill is set, all comments in the conversation thread will be unresolved.

Parameters
Name Description
request IUnresolvePullRequestCommentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request in which to resolve the pull request comments.
   *  Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
   */
  // const parent = 'abc123'
  /**
   *  Required. The names of the pull request comments to unresolve. Format:
   *  `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`
   *  Only comments from the same threads are allowed in the same request.
   */
  // const names = ['abc','def']
  /**
   *  Optional. If set, at least one comment in a thread is required, rest of the
   *  comments in the same thread will be automatically updated to unresolved. If
   *  unset, all comments in the same thread need be present.
   */
  // const autoFill = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUnresolvePullRequestComments() {
    // Construct request
    const request = {
      parent,
      names,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.unresolvePullRequestComments(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUnresolvePullRequestComments();

unresolvePullRequestComments(request, options, callback)

unresolvePullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUnresolvePullRequestCommentsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

unresolvePullRequestComments(request, callback)

unresolvePullRequestComments(request: protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUnresolvePullRequestCommentsRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IUnresolvePullRequestCommentsResponse, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBranchRule(request, options)

updateBranchRule(request?: protos.google.cloud.securesourcemanager.v1.IUpdateBranchRuleRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

UpdateBranchRule updates a branch rule.

Parameters
Name Description
request IUpdateBranchRuleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   */
  // const branchRule = {}
  /**
   *  Optional. If set, validate the request and preview the review, but do not
   *  actually post it.  (https://google.aip.dev/163, for declarative friendly)
   */
  // const validateOnly = true
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  branchRule resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateBranchRule() {
    // Construct request
    const request = {
      branchRule,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateBranchRule(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateBranchRule();

updateBranchRule(request, options, callback)

updateBranchRule(request: protos.google.cloud.securesourcemanager.v1.IUpdateBranchRuleRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateBranchRuleRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateBranchRule(request, callback)

updateBranchRule(request: protos.google.cloud.securesourcemanager.v1.IUpdateBranchRuleRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateBranchRuleRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IBranchRule, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateHook(request, options)

updateHook(request?: protos.google.cloud.securesourcemanager.v1.IUpdateHookRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the metadata of a hook.

Parameters
Name Description
request IUpdateHookRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  hook resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}
  /**
   *  Required. The hook being updated.
   */
  // const hook = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateHook() {
    // Construct request
    const request = {
      hook,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateHook(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateHook();

updateHook(request, options, callback)

updateHook(request: protos.google.cloud.securesourcemanager.v1.IUpdateHookRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateHookRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateHook(request, callback)

updateHook(request: protos.google.cloud.securesourcemanager.v1.IUpdateHookRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateHookRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IHook, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateIssue(request, options)

updateIssue(request?: protos.google.cloud.securesourcemanager.v1.IUpdateIssueRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a issue.

Parameters
Name Description
request IUpdateIssueRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The issue to update.
   */
  // const issue = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  issue resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateIssue() {
    // Construct request
    const request = {
      issue,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateIssue(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateIssue();

updateIssue(request, options, callback)

updateIssue(request: protos.google.cloud.securesourcemanager.v1.IUpdateIssueRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateIssueRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateIssue(request, callback)

updateIssue(request: protos.google.cloud.securesourcemanager.v1.IUpdateIssueRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateIssueRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssue, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateIssueComment(request, options)

updateIssueComment(request?: protos.google.cloud.securesourcemanager.v1.IUpdateIssueCommentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates an issue comment.

Parameters
Name Description
request IUpdateIssueCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The issue comment to update.
   */
  // const issueComment = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  issue comment resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateIssueComment() {
    // Construct request
    const request = {
      issueComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateIssueComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateIssueComment();

updateIssueComment(request, options, callback)

updateIssueComment(request: protos.google.cloud.securesourcemanager.v1.IUpdateIssueCommentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateIssueCommentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateIssueComment(request, callback)

updateIssueComment(request: protos.google.cloud.securesourcemanager.v1.IUpdateIssueCommentRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateIssueCommentRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IIssueComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePullRequest(request, options)

updatePullRequest(request?: protos.google.cloud.securesourcemanager.v1.IUpdatePullRequestRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a pull request.

Parameters
Name Description
request IUpdatePullRequestRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request to update.
   */
  // const pullRequest = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  pull request resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   *  The special value "*" means full replacement.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdatePullRequest() {
    // Construct request
    const request = {
      pullRequest,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updatePullRequest(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePullRequest();

updatePullRequest(request, options, callback)

updatePullRequest(request: protos.google.cloud.securesourcemanager.v1.IUpdatePullRequestRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePullRequestRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePullRequest(request, callback)

updatePullRequest(request: protos.google.cloud.securesourcemanager.v1.IUpdatePullRequestRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePullRequestRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequest, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePullRequestComment(request, options)

updatePullRequestComment(request?: protos.google.cloud.securesourcemanager.v1.IUpdatePullRequestCommentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a pull request comment.

Parameters
Name Description
request IUpdatePullRequestCommentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The pull request comment to update.
   */
  // const pullRequestComment = {}
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  pull request comment resource by the update. Updatable fields are
   *  `body`.
   */
  // const updateMask = {}

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdatePullRequestComment() {
    // Construct request
    const request = {
      pullRequestComment,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updatePullRequestComment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePullRequestComment();

updatePullRequestComment(request, options, callback)

updatePullRequestComment(request: protos.google.cloud.securesourcemanager.v1.IUpdatePullRequestCommentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePullRequestCommentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePullRequestComment(request, callback)

updatePullRequestComment(request: protos.google.cloud.securesourcemanager.v1.IUpdatePullRequestCommentRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePullRequestCommentRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IPullRequestComment, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRepository(request, options)

updateRepository(request?: protos.google.cloud.securesourcemanager.v1.IUpdateRepositoryRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the metadata of a repository.

Parameters
Name Description
request IUpdateRepositoryRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. Field mask is used to specify the fields to be overwritten in the
   *  repository resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. The repository being updated.
   */
  // const repository = {}
  /**
   *  Optional. False by default. If set to true, the request is validated and
   *  the user is provided with an expected result, but no actual change is made.
   */
  // const validateOnly = true

  // Imports the Securesourcemanager library
  const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;

  // Instantiates a client
  const securesourcemanagerClient = new SecureSourceManagerClient();

  async function callUpdateRepository() {
    // Construct request
    const request = {
      repository,
    };

    // Run request
    const [operation] = await securesourcemanagerClient.updateRepository(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateRepository();

updateRepository(request, options, callback)

updateRepository(request: protos.google.cloud.securesourcemanager.v1.IUpdateRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRepositoryRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateRepository(request, callback)

updateRepository(request: protos.google.cloud.securesourcemanager.v1.IUpdateRepositoryRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateRepositoryRequest
callback Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void