Class SecureSourceManagerClient

java.lang.Object
com.google.cloud.securesourcemanager.v1.SecureSourceManagerClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class SecureSourceManagerClient extends Object implements BackgroundResource
Service Description: Secure Source Manager API

Access Secure Source Manager instances, resources, and repositories.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   Instance response = secureSourceManagerClient.getInstance(name);
 }
 

Note: close() needs to be called on the SecureSourceManagerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListInstances

Lists Instances in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listInstances(ListInstancesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listInstances(LocationName parent)

  • listInstances(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listInstancesPagedCallable()

  • listInstancesCallable()

GetInstance

Gets details of a single instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getInstance(GetInstanceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getInstance(InstanceName name)

  • getInstance(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getInstanceCallable()

CreateInstance

Creates a new instance in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createInstanceAsync(CreateInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createInstanceAsync(LocationName parent, Instance instance, String instanceId)

  • createInstanceAsync(String parent, Instance instance, String instanceId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createInstanceOperationCallable()

  • createInstanceCallable()

DeleteInstance

Deletes a single instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteInstanceAsync(DeleteInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteInstanceAsync(InstanceName name)

  • deleteInstanceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteInstanceOperationCallable()

  • deleteInstanceCallable()

ListRepositories

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRepositories(ListRepositoriesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRepositories(LocationName parent)

  • listRepositories(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRepositoriesPagedCallable()

  • listRepositoriesCallable()

GetRepository

Gets metadata of a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRepository(GetRepositoryRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRepository(RepositoryName name)

  • getRepository(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRepositoryCallable()

CreateRepository

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRepositoryAsync(CreateRepositoryRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createRepositoryAsync(LocationName parent, Repository repository, String repositoryId)

  • createRepositoryAsync(String parent, Repository repository, String repositoryId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRepositoryOperationCallable()

  • createRepositoryCallable()

UpdateRepository

Updates the metadata of a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateRepositoryAsync(UpdateRepositoryRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateRepositoryAsync(Repository repository, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateRepositoryOperationCallable()

  • updateRepositoryCallable()

DeleteRepository

Deletes a Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRepositoryAsync(DeleteRepositoryRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteRepositoryAsync(RepositoryName name)

  • deleteRepositoryAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRepositoryOperationCallable()

  • deleteRepositoryCallable()

ListHooks

Lists hooks in a given repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listHooks(ListHooksRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listHooks(RepositoryName parent)

  • listHooks(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listHooksPagedCallable()

  • listHooksCallable()

GetHook

Gets metadata of a hook.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getHook(GetHookRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getHook(HookName name)

  • getHook(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getHookCallable()

CreateHook

Creates a new hook in a given repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createHookAsync(CreateHookRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createHookAsync(RepositoryName parent, Hook hook, String hookId)

  • createHookAsync(String parent, Hook hook, String hookId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createHookOperationCallable()

  • createHookCallable()

UpdateHook

Updates the metadata of a hook.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateHookAsync(UpdateHookRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateHookAsync(Hook hook, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateHookOperationCallable()

  • updateHookCallable()

DeleteHook

Deletes a Hook.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteHookAsync(DeleteHookRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteHookAsync(HookName name)

  • deleteHookAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteHookOperationCallable()

  • deleteHookCallable()

GetIamPolicyRepo

Get IAM policy for a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicyRepo(GetIamPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIamPolicyRepo(ResourceName resource)

  • getIamPolicyRepo(String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyRepoCallable()

SetIamPolicyRepo

Set IAM policy on a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicyRepo(SetIamPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • setIamPolicyRepo(ResourceName resource)

  • setIamPolicyRepo(String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyRepoCallable()

TestIamPermissionsRepo

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissionsRepo(TestIamPermissionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • testIamPermissionsRepo(ResourceName resource)

  • testIamPermissionsRepo(String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsRepoCallable()

CreateBranchRule

CreateBranchRule creates a branch rule in a given repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBranchRuleAsync(CreateBranchRuleRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createBranchRuleAsync(RepositoryName parent, BranchRule branchRule, String branchRuleId)

  • createBranchRuleAsync(String parent, BranchRule branchRule, String branchRuleId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBranchRuleOperationCallable()

  • createBranchRuleCallable()

ListBranchRules

ListBranchRules lists branch rules in a given repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBranchRules(ListBranchRulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBranchRules(RepositoryName parent)

  • listBranchRules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBranchRulesPagedCallable()

  • listBranchRulesCallable()

GetBranchRule

GetBranchRule gets a branch rule.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBranchRule(GetBranchRuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBranchRule(BranchRuleName name)

  • getBranchRule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBranchRuleCallable()

UpdateBranchRule

UpdateBranchRule updates a branch rule.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBranchRuleAsync(UpdateBranchRuleRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateBranchRuleAsync(BranchRule branchRule, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBranchRuleOperationCallable()

  • updateBranchRuleCallable()

DeleteBranchRule

DeleteBranchRule deletes a branch rule.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBranchRuleAsync(DeleteBranchRuleRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteBranchRuleAsync(BranchRuleName name)

  • deleteBranchRuleAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBranchRuleOperationCallable()

  • deleteBranchRuleCallable()

CreatePullRequest

Creates a pull request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createPullRequestAsync(CreatePullRequestRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createPullRequestAsync(RepositoryName parent, PullRequest pullRequest)

  • createPullRequestAsync(String parent, PullRequest pullRequest)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createPullRequestOperationCallable()

  • createPullRequestCallable()

GetPullRequest

Gets a pull request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getPullRequest(GetPullRequestRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getPullRequest(PullRequestName name)

  • getPullRequest(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getPullRequestCallable()

ListPullRequests

Lists pull requests in a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listPullRequests(ListPullRequestsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listPullRequests(RepositoryName parent)

  • listPullRequests(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPullRequestsPagedCallable()

  • listPullRequestsCallable()

UpdatePullRequest

Updates a pull request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updatePullRequestAsync(UpdatePullRequestRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updatePullRequestAsync(PullRequest pullRequest, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updatePullRequestOperationCallable()

  • updatePullRequestCallable()

MergePullRequest

Merges a pull request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • mergePullRequestAsync(MergePullRequestRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • mergePullRequestAsync(PullRequestName name)

  • mergePullRequestAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • mergePullRequestOperationCallable()

  • mergePullRequestCallable()

OpenPullRequest

Opens a pull request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • openPullRequestAsync(OpenPullRequestRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • openPullRequestAsync(PullRequestName name)

  • openPullRequestAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • openPullRequestOperationCallable()

  • openPullRequestCallable()

ClosePullRequest

Closes a pull request without merging.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • closePullRequestAsync(ClosePullRequestRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • closePullRequestAsync(PullRequestName name)

  • closePullRequestAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • closePullRequestOperationCallable()

  • closePullRequestCallable()

ListPullRequestFileDiffs

Lists a pull request's file diffs.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listPullRequestFileDiffs(ListPullRequestFileDiffsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listPullRequestFileDiffs(PullRequestName name)

  • listPullRequestFileDiffs(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPullRequestFileDiffsPagedCallable()

  • listPullRequestFileDiffsCallable()

FetchTree

Fetches a tree from a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchTree(FetchTreeRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchTreePagedCallable()

  • fetchTreeCallable()

FetchBlob

Fetches a blob from a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchBlob(FetchBlobRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchBlobCallable()

CreateIssue

Creates an issue.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createIssueAsync(CreateIssueRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createIssueAsync(RepositoryName parent, Issue issue)

  • createIssueAsync(String parent, Issue issue)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createIssueOperationCallable()

  • createIssueCallable()

GetIssue

Gets an issue.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIssue(GetIssueRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIssue(IssueName name)

  • getIssue(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIssueCallable()

ListIssues

Lists issues in a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listIssues(ListIssuesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listIssues(RepositoryName parent)

  • listIssues(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listIssuesPagedCallable()

  • listIssuesCallable()

UpdateIssue

Updates a issue.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateIssueAsync(UpdateIssueRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateIssueAsync(Issue issue, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateIssueOperationCallable()

  • updateIssueCallable()

DeleteIssue

Deletes an issue.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteIssueAsync(DeleteIssueRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteIssueAsync(IssueName name)

  • deleteIssueAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteIssueOperationCallable()

  • deleteIssueCallable()

OpenIssue

Opens an issue.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • openIssueAsync(OpenIssueRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • openIssueAsync(IssueName name)

  • openIssueAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • openIssueOperationCallable()

  • openIssueCallable()

CloseIssue

Closes an issue.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • closeIssueAsync(CloseIssueRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • closeIssueAsync(IssueName name)

  • closeIssueAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • closeIssueOperationCallable()

  • closeIssueCallable()

GetPullRequestComment

Gets a pull request comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getPullRequestComment(GetPullRequestCommentRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getPullRequestComment(PullRequestCommentName name)

  • getPullRequestComment(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getPullRequestCommentCallable()

ListPullRequestComments

Lists pull request comments.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listPullRequestComments(ListPullRequestCommentsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listPullRequestComments(PullRequestName parent)

  • listPullRequestComments(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPullRequestCommentsPagedCallable()

  • listPullRequestCommentsCallable()

CreatePullRequestComment

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createPullRequestCommentAsync(CreatePullRequestCommentRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createPullRequestCommentAsync(PullRequestName parent, PullRequestComment pullRequestComment)

  • createPullRequestCommentAsync(String parent, PullRequestComment pullRequestComment)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createPullRequestCommentOperationCallable()

  • createPullRequestCommentCallable()

UpdatePullRequestComment

Updates a pull request comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updatePullRequestCommentAsync(UpdatePullRequestCommentRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updatePullRequestCommentAsync(PullRequestComment pullRequestComment, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updatePullRequestCommentOperationCallable()

  • updatePullRequestCommentCallable()

DeletePullRequestComment

Deletes a pull request comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deletePullRequestCommentAsync(DeletePullRequestCommentRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deletePullRequestCommentAsync(PullRequestCommentName name)

  • deletePullRequestCommentAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deletePullRequestCommentOperationCallable()

  • deletePullRequestCommentCallable()

BatchCreatePullRequestComments

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • batchCreatePullRequestCommentsAsync(PullRequestName parent, List<CreatePullRequestCommentRequest> requests)

  • batchCreatePullRequestCommentsAsync(String parent, List<CreatePullRequestCommentRequest> requests)

  • batchCreatePullRequestCommentsAsync(BatchCreatePullRequestCommentsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • batchCreatePullRequestCommentsOperationCallable()

  • batchCreatePullRequestCommentsCallable()

ResolvePullRequestComments

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • resolvePullRequestCommentsAsync(ResolvePullRequestCommentsRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • resolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)

  • resolvePullRequestCommentsAsync(String parent, List<String> names)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • resolvePullRequestCommentsOperationCallable()

  • resolvePullRequestCommentsCallable()

UnresolvePullRequestComments

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • unresolvePullRequestCommentsAsync(UnresolvePullRequestCommentsRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • unresolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)

  • unresolvePullRequestCommentsAsync(String parent, List<String> names)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • unresolvePullRequestCommentsOperationCallable()

  • unresolvePullRequestCommentsCallable()

CreateIssueComment

Creates an issue comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createIssueCommentAsync(CreateIssueCommentRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createIssueCommentAsync(IssueName parent, IssueComment issueComment)

  • createIssueCommentAsync(String parent, IssueComment issueComment)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createIssueCommentOperationCallable()

  • createIssueCommentCallable()

GetIssueComment

Gets an issue comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIssueComment(GetIssueCommentRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIssueComment(IssueCommentName name)

  • getIssueComment(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIssueCommentCallable()

ListIssueComments

Lists comments in an issue.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listIssueComments(ListIssueCommentsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listIssueComments(IssueName parent)

  • listIssueComments(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listIssueCommentsPagedCallable()

  • listIssueCommentsCallable()

UpdateIssueComment

Updates an issue comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateIssueCommentAsync(UpdateIssueCommentRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateIssueCommentAsync(IssueComment issueComment, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateIssueCommentOperationCallable()

  • updateIssueCommentCallable()

DeleteIssueComment

Deletes an issue comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteIssueCommentAsync(DeleteIssueCommentRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteIssueCommentAsync(IssueCommentName name)

  • deleteIssueCommentAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteIssueCommentOperationCallable()

  • deleteIssueCommentCallable()

ListLocations

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of SecureSourceManagerSettings to create(). For example:

To customize credentials:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecureSourceManagerSettings secureSourceManagerSettings =
     SecureSourceManagerSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 SecureSourceManagerClient secureSourceManagerClient =
     SecureSourceManagerClient.create(secureSourceManagerSettings);
 

To customize the endpoint:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecureSourceManagerSettings secureSourceManagerSettings =
     SecureSourceManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
 SecureSourceManagerClient secureSourceManagerClient =
     SecureSourceManagerClient.create(secureSourceManagerSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecureSourceManagerSettings secureSourceManagerSettings =
     SecureSourceManagerSettings.newHttpJsonBuilder().build();
 SecureSourceManagerClient secureSourceManagerClient =
     SecureSourceManagerClient.create(secureSourceManagerSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • SecureSourceManagerClient

      protected SecureSourceManagerClient(SecureSourceManagerSettings settings) throws IOException
      Constructs an instance of SecureSourceManagerClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
      Throws:
      IOException
    • SecureSourceManagerClient

      protected SecureSourceManagerClient(SecureSourceManagerStub stub)
  • Method Details

    • create

      public static final SecureSourceManagerClient create() throws IOException
      Constructs an instance of SecureSourceManagerClient with default settings.
      Throws:
      IOException
    • create

      public static final SecureSourceManagerClient create(SecureSourceManagerSettings settings) throws IOException
      Constructs an instance of SecureSourceManagerClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

      public static final SecureSourceManagerClient create(SecureSourceManagerStub stub)
      Constructs an instance of SecureSourceManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecureSourceManagerSettings).
    • getSettings

      public final SecureSourceManagerSettings getSettings()
    • getStub

      public SecureSourceManagerStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • listInstances

      Lists Instances in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Instance element : secureSourceManagerClient.listInstances(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListInstancesRequest.
      Throws:
      ApiException - if the remote call fails
    • listInstances

      public final SecureSourceManagerClient.ListInstancesPagedResponse listInstances(String parent)
      Lists Instances in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Instance element : secureSourceManagerClient.listInstances(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListInstancesRequest.
      Throws:
      ApiException - if the remote call fails
    • listInstances

      Lists Instances in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListInstancesRequest request =
             ListInstancesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Instance element : secureSourceManagerClient.listInstances(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listInstancesPagedCallable

      Lists Instances in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListInstancesRequest request =
             ListInstancesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Instance> future =
             secureSourceManagerClient.listInstancesPagedCallable().futureCall(request);
         // Do something.
         for (Instance element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listInstancesCallable

      public final UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()
      Lists Instances in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListInstancesRequest request =
             ListInstancesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListInstancesResponse response =
               secureSourceManagerClient.listInstancesCallable().call(request);
           for (Instance element : response.getInstancesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getInstance

      public final Instance getInstance(InstanceName name)
      Gets details of a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
         Instance response = secureSourceManagerClient.getInstance(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getInstance

      public final Instance getInstance(String name)
      Gets details of a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
         Instance response = secureSourceManagerClient.getInstance(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getInstance

      public final Instance getInstance(GetInstanceRequest request)
      Gets details of a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetInstanceRequest request =
             GetInstanceRequest.newBuilder()
                 .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .build();
         Instance response = secureSourceManagerClient.getInstance(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getInstanceCallable

      public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()
      Gets details of a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetInstanceRequest request =
             GetInstanceRequest.newBuilder()
                 .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .build();
         ApiFuture<Instance> future =
             secureSourceManagerClient.getInstanceCallable().futureCall(request);
         // Do something.
         Instance response = future.get();
       }
       
    • createInstanceAsync

      public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(LocationName parent, Instance instance, String instanceId)
      Creates a new instance in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Instance instance = Instance.newBuilder().build();
         String instanceId = "instanceId902024336";
         Instance response =
             secureSourceManagerClient.createInstanceAsync(parent, instance, instanceId).get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      instance - Required. The resource being created.
      instanceId - Required. ID of the instance to be created.
      Throws:
      ApiException - if the remote call fails
    • createInstanceAsync

      public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(String parent, Instance instance, String instanceId)
      Creates a new instance in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Instance instance = Instance.newBuilder().build();
         String instanceId = "instanceId902024336";
         Instance response =
             secureSourceManagerClient.createInstanceAsync(parent, instance, instanceId).get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      instance - Required. The resource being created.
      instanceId - Required. ID of the instance to be created.
      Throws:
      ApiException - if the remote call fails
    • createInstanceAsync

      public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(CreateInstanceRequest request)
      Creates a new instance in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateInstanceRequest request =
             CreateInstanceRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInstanceId("instanceId902024336")
                 .setInstance(Instance.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Instance response = secureSourceManagerClient.createInstanceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createInstanceOperationCallable

      public final OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> createInstanceOperationCallable()
      Creates a new instance in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateInstanceRequest request =
             CreateInstanceRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInstanceId("instanceId902024336")
                 .setInstance(Instance.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Instance, OperationMetadata> future =
             secureSourceManagerClient.createInstanceOperationCallable().futureCall(request);
         // Do something.
         Instance response = future.get();
       }
       
    • createInstanceCallable

      public final UnaryCallable<CreateInstanceRequest,Operation> createInstanceCallable()
      Creates a new instance in a given project and location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateInstanceRequest request =
             CreateInstanceRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInstanceId("instanceId902024336")
                 .setInstance(Instance.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createInstanceCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteInstanceAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(InstanceName name)
      Deletes a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
         secureSourceManagerClient.deleteInstanceAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteInstanceAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(String name)
      Deletes a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
         secureSourceManagerClient.deleteInstanceAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteInstanceAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(DeleteInstanceRequest request)
      Deletes a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteInstanceRequest request =
             DeleteInstanceRequest.newBuilder()
                 .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         secureSourceManagerClient.deleteInstanceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteInstanceOperationCallable

      public final OperationCallable<DeleteInstanceRequest,com.google.protobuf.Empty,OperationMetadata> deleteInstanceOperationCallable()
      Deletes a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteInstanceRequest request =
             DeleteInstanceRequest.newBuilder()
                 .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             secureSourceManagerClient.deleteInstanceOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteInstanceCallable

      public final UnaryCallable<DeleteInstanceRequest,Operation> deleteInstanceCallable()
      Deletes a single instance.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteInstanceRequest request =
             DeleteInstanceRequest.newBuilder()
                 .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.deleteInstanceCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listRepositories

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Repository element : secureSourceManagerClient.listRepositories(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListRepositoriesRequest.
      Throws:
      ApiException - if the remote call fails
    • listRepositories

      public final SecureSourceManagerClient.ListRepositoriesPagedResponse listRepositories(String parent)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Repository element : secureSourceManagerClient.listRepositories(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListRepositoriesRequest.
      Throws:
      ApiException - if the remote call fails
    • listRepositories

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListRepositoriesRequest request =
             ListRepositoriesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .build();
         for (Repository element : secureSourceManagerClient.listRepositories(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listRepositoriesPagedCallable

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListRepositoriesRequest request =
             ListRepositoriesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .build();
         ApiFuture<Repository> future =
             secureSourceManagerClient.listRepositoriesPagedCallable().futureCall(request);
         // Do something.
         for (Repository element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listRepositoriesCallable

      public final UnaryCallable<ListRepositoriesRequest,ListRepositoriesResponse> listRepositoriesCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListRepositoriesRequest request =
             ListRepositoriesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .build();
         while (true) {
           ListRepositoriesResponse response =
               secureSourceManagerClient.listRepositoriesCallable().call(request);
           for (Repository element : response.getRepositoriesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getRepository

      public final Repository getRepository(RepositoryName name)
      Gets metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         Repository response = secureSourceManagerClient.getRepository(name);
       }
       
      Parameters:
      name - Required. Name of the repository to retrieve. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
      Throws:
      ApiException - if the remote call fails
    • getRepository

      public final Repository getRepository(String name)
      Gets metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         Repository response = secureSourceManagerClient.getRepository(name);
       }
       
      Parameters:
      name - Required. Name of the repository to retrieve. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
      Throws:
      ApiException - if the remote call fails
    • getRepository

      public final Repository getRepository(GetRepositoryRequest request)
      Gets metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetRepositoryRequest request =
             GetRepositoryRequest.newBuilder()
                 .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .build();
         Repository response = secureSourceManagerClient.getRepository(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getRepositoryCallable

      public final UnaryCallable<GetRepositoryRequest,Repository> getRepositoryCallable()
      Gets metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetRepositoryRequest request =
             GetRepositoryRequest.newBuilder()
                 .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .build();
         ApiFuture<Repository> future =
             secureSourceManagerClient.getRepositoryCallable().futureCall(request);
         // Do something.
         Repository response = future.get();
       }
       
    • createRepositoryAsync

      public final OperationFuture<Repository,OperationMetadata> createRepositoryAsync(LocationName parent, Repository repository, String repositoryId)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Repository repository = Repository.newBuilder().build();
         String repositoryId = "repositoryId2113747461";
         Repository response =
             secureSourceManagerClient.createRepositoryAsync(parent, repository, repositoryId).get();
       }
       
      Parameters:
      parent - Required. The project in which to create the repository. Values are of the form `projects/{project_number}/locations/{location_id}`
      repository - Required. The resource being created.
      repositoryId - 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]-/.
      Throws:
      ApiException - if the remote call fails
    • createRepositoryAsync

      public final OperationFuture<Repository,OperationMetadata> createRepositoryAsync(String parent, Repository repository, String repositoryId)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Repository repository = Repository.newBuilder().build();
         String repositoryId = "repositoryId2113747461";
         Repository response =
             secureSourceManagerClient.createRepositoryAsync(parent, repository, repositoryId).get();
       }
       
      Parameters:
      parent - Required. The project in which to create the repository. Values are of the form `projects/{project_number}/locations/{location_id}`
      repository - Required. The resource being created.
      repositoryId - 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]-/.
      Throws:
      ApiException - if the remote call fails
    • createRepositoryAsync

      public final OperationFuture<Repository,OperationMetadata> createRepositoryAsync(CreateRepositoryRequest request)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateRepositoryRequest request =
             CreateRepositoryRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setRepository(Repository.newBuilder().build())
                 .setRepositoryId("repositoryId2113747461")
                 .build();
         Repository response = secureSourceManagerClient.createRepositoryAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createRepositoryOperationCallable

      public final OperationCallable<CreateRepositoryRequest,Repository,OperationMetadata> createRepositoryOperationCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateRepositoryRequest request =
             CreateRepositoryRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setRepository(Repository.newBuilder().build())
                 .setRepositoryId("repositoryId2113747461")
                 .build();
         OperationFuture<Repository, OperationMetadata> future =
             secureSourceManagerClient.createRepositoryOperationCallable().futureCall(request);
         // Do something.
         Repository response = future.get();
       }
       
    • createRepositoryCallable

      public final UnaryCallable<CreateRepositoryRequest,Operation> createRepositoryCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateRepositoryRequest request =
             CreateRepositoryRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setRepository(Repository.newBuilder().build())
                 .setRepositoryId("repositoryId2113747461")
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createRepositoryCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateRepositoryAsync

      public final OperationFuture<Repository,OperationMetadata> updateRepositoryAsync(Repository repository, com.google.protobuf.FieldMask updateMask)
      Updates the metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         Repository repository = Repository.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Repository response =
             secureSourceManagerClient.updateRepositoryAsync(repository, updateMask).get();
       }
       
      Parameters:
      repository - Required. The repository being updated.
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateRepositoryAsync

      public final OperationFuture<Repository,OperationMetadata> updateRepositoryAsync(UpdateRepositoryRequest request)
      Updates the metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateRepositoryRequest request =
             UpdateRepositoryRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRepository(Repository.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         Repository response = secureSourceManagerClient.updateRepositoryAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateRepositoryOperationCallable

      public final OperationCallable<UpdateRepositoryRequest,Repository,OperationMetadata> updateRepositoryOperationCallable()
      Updates the metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateRepositoryRequest request =
             UpdateRepositoryRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRepository(Repository.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         OperationFuture<Repository, OperationMetadata> future =
             secureSourceManagerClient.updateRepositoryOperationCallable().futureCall(request);
         // Do something.
         Repository response = future.get();
       }
       
    • updateRepositoryCallable

      public final UnaryCallable<UpdateRepositoryRequest,Operation> updateRepositoryCallable()
      Updates the metadata of a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateRepositoryRequest request =
             UpdateRepositoryRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRepository(Repository.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.updateRepositoryCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteRepositoryAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRepositoryAsync(RepositoryName name)
      Deletes a Repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         secureSourceManagerClient.deleteRepositoryAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the repository to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteRepositoryAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRepositoryAsync(String name)
      Deletes a Repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         secureSourceManagerClient.deleteRepositoryAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the repository to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteRepositoryAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRepositoryAsync(DeleteRepositoryRequest request)
      Deletes a Repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteRepositoryRequest request =
             DeleteRepositoryRequest.newBuilder()
                 .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setAllowMissing(true)
                 .build();
         secureSourceManagerClient.deleteRepositoryAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteRepositoryOperationCallable

      public final OperationCallable<DeleteRepositoryRequest,com.google.protobuf.Empty,OperationMetadata> deleteRepositoryOperationCallable()
      Deletes a Repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteRepositoryRequest request =
             DeleteRepositoryRequest.newBuilder()
                 .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setAllowMissing(true)
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             secureSourceManagerClient.deleteRepositoryOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteRepositoryCallable

      public final UnaryCallable<DeleteRepositoryRequest,Operation> deleteRepositoryCallable()
      Deletes a Repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteRepositoryRequest request =
             DeleteRepositoryRequest.newBuilder()
                 .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setAllowMissing(true)
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.deleteRepositoryCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listHooks

      Lists hooks in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         for (Hook element : secureSourceManagerClient.listHooks(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListHooksRequest.
      Throws:
      ApiException - if the remote call fails
    • listHooks

      Lists hooks in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         for (Hook element : secureSourceManagerClient.listHooks(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListHooksRequest.
      Throws:
      ApiException - if the remote call fails
    • listHooks

      Lists hooks in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListHooksRequest request =
             ListHooksRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Hook element : secureSourceManagerClient.listHooks(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listHooksPagedCallable

      Lists hooks in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListHooksRequest request =
             ListHooksRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Hook> future =
             secureSourceManagerClient.listHooksPagedCallable().futureCall(request);
         // Do something.
         for (Hook element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listHooksCallable

      public final UnaryCallable<ListHooksRequest,ListHooksResponse> listHooksCallable()
      Lists hooks in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListHooksRequest request =
             ListHooksRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListHooksResponse response = secureSourceManagerClient.listHooksCallable().call(request);
           for (Hook element : response.getHooksList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getHook

      public final Hook getHook(HookName name)
      Gets metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         HookName name = HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]");
         Hook response = secureSourceManagerClient.getHook(name);
       }
       
      Parameters:
      name - Required. Name of the hook to retrieve. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
      Throws:
      ApiException - if the remote call fails
    • getHook

      public final Hook getHook(String name)
      Gets metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString();
         Hook response = secureSourceManagerClient.getHook(name);
       }
       
      Parameters:
      name - Required. Name of the hook to retrieve. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
      Throws:
      ApiException - if the remote call fails
    • getHook

      public final Hook getHook(GetHookRequest request)
      Gets metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetHookRequest request =
             GetHookRequest.newBuilder()
                 .setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
                 .build();
         Hook response = secureSourceManagerClient.getHook(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getHookCallable

      public final UnaryCallable<GetHookRequest,Hook> getHookCallable()
      Gets metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetHookRequest request =
             GetHookRequest.newBuilder()
                 .setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
                 .build();
         ApiFuture<Hook> future = secureSourceManagerClient.getHookCallable().futureCall(request);
         // Do something.
         Hook response = future.get();
       }
       
    • createHookAsync

      public final OperationFuture<Hook,OperationMetadata> createHookAsync(RepositoryName parent, Hook hook, String hookId)
      Creates a new hook in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         Hook hook = Hook.newBuilder().build();
         String hookId = "hookId-1211612770";
         Hook response = secureSourceManagerClient.createHookAsync(parent, hook, hookId).get();
       }
       
      Parameters:
      parent - Required. The repository in which to create the hook. Values are of the form `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      hook - Required. The resource being created.
      hookId - 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.
      Throws:
      ApiException - if the remote call fails
    • createHookAsync

      public final OperationFuture<Hook,OperationMetadata> createHookAsync(String parent, Hook hook, String hookId)
      Creates a new hook in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         Hook hook = Hook.newBuilder().build();
         String hookId = "hookId-1211612770";
         Hook response = secureSourceManagerClient.createHookAsync(parent, hook, hookId).get();
       }
       
      Parameters:
      parent - Required. The repository in which to create the hook. Values are of the form `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      hook - Required. The resource being created.
      hookId - 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.
      Throws:
      ApiException - if the remote call fails
    • createHookAsync

      public final OperationFuture<Hook,OperationMetadata> createHookAsync(CreateHookRequest request)
      Creates a new hook in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateHookRequest request =
             CreateHookRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setHook(Hook.newBuilder().build())
                 .setHookId("hookId-1211612770")
                 .build();
         Hook response = secureSourceManagerClient.createHookAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createHookOperationCallable

      public final OperationCallable<CreateHookRequest,Hook,OperationMetadata> createHookOperationCallable()
      Creates a new hook in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateHookRequest request =
             CreateHookRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setHook(Hook.newBuilder().build())
                 .setHookId("hookId-1211612770")
                 .build();
         OperationFuture<Hook, OperationMetadata> future =
             secureSourceManagerClient.createHookOperationCallable().futureCall(request);
         // Do something.
         Hook response = future.get();
       }
       
    • createHookCallable

      public final UnaryCallable<CreateHookRequest,Operation> createHookCallable()
      Creates a new hook in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateHookRequest request =
             CreateHookRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setHook(Hook.newBuilder().build())
                 .setHookId("hookId-1211612770")
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createHookCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateHookAsync

      public final OperationFuture<Hook,OperationMetadata> updateHookAsync(Hook hook, com.google.protobuf.FieldMask updateMask)
      Updates the metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         Hook hook = Hook.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Hook response = secureSourceManagerClient.updateHookAsync(hook, updateMask).get();
       }
       
      Parameters:
      hook - Required. The hook being updated.
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateHookAsync

      public final OperationFuture<Hook,OperationMetadata> updateHookAsync(UpdateHookRequest request)
      Updates the metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateHookRequest request =
             UpdateHookRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setHook(Hook.newBuilder().build())
                 .build();
         Hook response = secureSourceManagerClient.updateHookAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateHookOperationCallable

      public final OperationCallable<UpdateHookRequest,Hook,OperationMetadata> updateHookOperationCallable()
      Updates the metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateHookRequest request =
             UpdateHookRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setHook(Hook.newBuilder().build())
                 .build();
         OperationFuture<Hook, OperationMetadata> future =
             secureSourceManagerClient.updateHookOperationCallable().futureCall(request);
         // Do something.
         Hook response = future.get();
       }
       
    • updateHookCallable

      public final UnaryCallable<UpdateHookRequest,Operation> updateHookCallable()
      Updates the metadata of a hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateHookRequest request =
             UpdateHookRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setHook(Hook.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.updateHookCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteHookAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHookAsync(HookName name)
      Deletes a Hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         HookName name = HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]");
         secureSourceManagerClient.deleteHookAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the hook to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteHookAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHookAsync(String name)
      Deletes a Hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString();
         secureSourceManagerClient.deleteHookAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the hook to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteHookAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHookAsync(DeleteHookRequest request)
      Deletes a Hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteHookRequest request =
             DeleteHookRequest.newBuilder()
                 .setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
                 .build();
         secureSourceManagerClient.deleteHookAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteHookOperationCallable

      public final OperationCallable<DeleteHookRequest,com.google.protobuf.Empty,OperationMetadata> deleteHookOperationCallable()
      Deletes a Hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteHookRequest request =
             DeleteHookRequest.newBuilder()
                 .setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             secureSourceManagerClient.deleteHookOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteHookCallable

      public final UnaryCallable<DeleteHookRequest,Operation> deleteHookCallable()
      Deletes a Hook.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteHookRequest request =
             DeleteHookRequest.newBuilder()
                 .setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.deleteHookCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getIamPolicyRepo

      public final Policy getIamPolicyRepo(ResourceName resource)
      Get IAM policy for a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         Policy response = secureSourceManagerClient.getIamPolicyRepo(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyRepo

      public final Policy getIamPolicyRepo(String resource)
      Get IAM policy for a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Policy response = secureSourceManagerClient.getIamPolicyRepo(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyRepo

      public final Policy getIamPolicyRepo(GetIamPolicyRequest request)
      Get IAM policy for a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = secureSourceManagerClient.getIamPolicyRepo(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyRepoCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyRepoCallable()
      Get IAM policy for a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             secureSourceManagerClient.getIamPolicyRepoCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • setIamPolicyRepo

      public final Policy setIamPolicyRepo(ResourceName resource)
      Set IAM policy on a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         Policy response = secureSourceManagerClient.setIamPolicyRepo(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyRepo

      public final Policy setIamPolicyRepo(String resource)
      Set IAM policy on a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Policy response = secureSourceManagerClient.setIamPolicyRepo(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyRepo

      public final Policy setIamPolicyRepo(SetIamPolicyRequest request)
      Set IAM policy on a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = secureSourceManagerClient.setIamPolicyRepo(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyRepoCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyRepoCallable()
      Set IAM policy on a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             secureSourceManagerClient.setIamPolicyRepoCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissionsRepo

      public final TestIamPermissionsResponse testIamPermissionsRepo(ResourceName resource)
      Test IAM permissions on a repository. IAM permission checks are not required on this method.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         TestIamPermissionsResponse response =
             secureSourceManagerClient.testIamPermissionsRepo(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsRepo

      public final TestIamPermissionsResponse testIamPermissionsRepo(String resource)
      Test IAM permissions on a repository. IAM permission checks are not required on this method.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         TestIamPermissionsResponse response =
             secureSourceManagerClient.testIamPermissionsRepo(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsRepo

      public final TestIamPermissionsResponse testIamPermissionsRepo(TestIamPermissionsRequest request)
      Test IAM permissions on a repository. IAM permission checks are not required on this method.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response =
             secureSourceManagerClient.testIamPermissionsRepo(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsRepoCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsRepoCallable()
      Test IAM permissions on a repository. IAM permission checks are not required on this method.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             secureSourceManagerClient.testIamPermissionsRepoCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse response = future.get();
       }
       
    • createBranchRuleAsync

      public final OperationFuture<BranchRule,OperationMetadata> createBranchRuleAsync(RepositoryName parent, BranchRule branchRule, String branchRuleId)
      CreateBranchRule creates a branch rule in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         BranchRule branchRule = BranchRule.newBuilder().build();
         String branchRuleId = "branchRuleId-1052663431";
         BranchRule response =
             secureSourceManagerClient.createBranchRuleAsync(parent, branchRule, branchRuleId).get();
       }
       
      Parameters:
      parent -
      branchRule -
      branchRuleId -
      Throws:
      ApiException - if the remote call fails
    • createBranchRuleAsync

      public final OperationFuture<BranchRule,OperationMetadata> createBranchRuleAsync(String parent, BranchRule branchRule, String branchRuleId)
      CreateBranchRule creates a branch rule in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         BranchRule branchRule = BranchRule.newBuilder().build();
         String branchRuleId = "branchRuleId-1052663431";
         BranchRule response =
             secureSourceManagerClient.createBranchRuleAsync(parent, branchRule, branchRuleId).get();
       }
       
      Parameters:
      parent -
      branchRule -
      branchRuleId -
      Throws:
      ApiException - if the remote call fails
    • createBranchRuleAsync

      public final OperationFuture<BranchRule,OperationMetadata> createBranchRuleAsync(CreateBranchRuleRequest request)
      CreateBranchRule creates a branch rule in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateBranchRuleRequest request =
             CreateBranchRuleRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setBranchRule(BranchRule.newBuilder().build())
                 .setBranchRuleId("branchRuleId-1052663431")
                 .build();
         BranchRule response = secureSourceManagerClient.createBranchRuleAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createBranchRuleOperationCallable

      public final OperationCallable<CreateBranchRuleRequest,BranchRule,OperationMetadata> createBranchRuleOperationCallable()
      CreateBranchRule creates a branch rule in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateBranchRuleRequest request =
             CreateBranchRuleRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setBranchRule(BranchRule.newBuilder().build())
                 .setBranchRuleId("branchRuleId-1052663431")
                 .build();
         OperationFuture<BranchRule, OperationMetadata> future =
             secureSourceManagerClient.createBranchRuleOperationCallable().futureCall(request);
         // Do something.
         BranchRule response = future.get();
       }
       
    • createBranchRuleCallable

      public final UnaryCallable<CreateBranchRuleRequest,Operation> createBranchRuleCallable()
      CreateBranchRule creates a branch rule in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateBranchRuleRequest request =
             CreateBranchRuleRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setBranchRule(BranchRule.newBuilder().build())
                 .setBranchRuleId("branchRuleId-1052663431")
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createBranchRuleCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listBranchRules

      ListBranchRules lists branch rules in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         for (BranchRule element : secureSourceManagerClient.listBranchRules(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent -
      Throws:
      ApiException - if the remote call fails
    • listBranchRules

      public final SecureSourceManagerClient.ListBranchRulesPagedResponse listBranchRules(String parent)
      ListBranchRules lists branch rules in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         for (BranchRule element : secureSourceManagerClient.listBranchRules(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent -
      Throws:
      ApiException - if the remote call fails
    • listBranchRules

      ListBranchRules lists branch rules in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListBranchRulesRequest request =
             ListBranchRulesRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (BranchRule element : secureSourceManagerClient.listBranchRules(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listBranchRulesPagedCallable

      ListBranchRules lists branch rules in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListBranchRulesRequest request =
             ListBranchRulesRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<BranchRule> future =
             secureSourceManagerClient.listBranchRulesPagedCallable().futureCall(request);
         // Do something.
         for (BranchRule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listBranchRulesCallable

      public final UnaryCallable<ListBranchRulesRequest,ListBranchRulesResponse> listBranchRulesCallable()
      ListBranchRules lists branch rules in a given repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListBranchRulesRequest request =
             ListBranchRulesRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListBranchRulesResponse response =
               secureSourceManagerClient.listBranchRulesCallable().call(request);
           for (BranchRule element : response.getBranchRulesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getBranchRule

      public final BranchRule getBranchRule(BranchRuleName name)
      GetBranchRule gets a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         BranchRuleName name =
             BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]");
         BranchRule response = secureSourceManagerClient.getBranchRule(name);
       }
       
      Parameters:
      name - Required. Name of the repository to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`.
      Throws:
      ApiException - if the remote call fails
    • getBranchRule

      public final BranchRule getBranchRule(String name)
      GetBranchRule gets a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]").toString();
         BranchRule response = secureSourceManagerClient.getBranchRule(name);
       }
       
      Parameters:
      name - Required. Name of the repository to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`.
      Throws:
      ApiException - if the remote call fails
    • getBranchRule

      public final BranchRule getBranchRule(GetBranchRuleRequest request)
      GetBranchRule gets a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetBranchRuleRequest request =
             GetBranchRuleRequest.newBuilder()
                 .setName(
                     BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
                         .toString())
                 .build();
         BranchRule response = secureSourceManagerClient.getBranchRule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getBranchRuleCallable

      public final UnaryCallable<GetBranchRuleRequest,BranchRule> getBranchRuleCallable()
      GetBranchRule gets a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetBranchRuleRequest request =
             GetBranchRuleRequest.newBuilder()
                 .setName(
                     BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
                         .toString())
                 .build();
         ApiFuture<BranchRule> future =
             secureSourceManagerClient.getBranchRuleCallable().futureCall(request);
         // Do something.
         BranchRule response = future.get();
       }
       
    • updateBranchRuleAsync

      public final OperationFuture<BranchRule,OperationMetadata> updateBranchRuleAsync(BranchRule branchRule, com.google.protobuf.FieldMask updateMask)
      UpdateBranchRule updates a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         BranchRule branchRule = BranchRule.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         BranchRule response =
             secureSourceManagerClient.updateBranchRuleAsync(branchRule, updateMask).get();
       }
       
      Parameters:
      branchRule -
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateBranchRuleAsync

      public final OperationFuture<BranchRule,OperationMetadata> updateBranchRuleAsync(UpdateBranchRuleRequest request)
      UpdateBranchRule updates a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateBranchRuleRequest request =
             UpdateBranchRuleRequest.newBuilder()
                 .setBranchRule(BranchRule.newBuilder().build())
                 .setValidateOnly(true)
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         BranchRule response = secureSourceManagerClient.updateBranchRuleAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateBranchRuleOperationCallable

      public final OperationCallable<UpdateBranchRuleRequest,BranchRule,OperationMetadata> updateBranchRuleOperationCallable()
      UpdateBranchRule updates a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateBranchRuleRequest request =
             UpdateBranchRuleRequest.newBuilder()
                 .setBranchRule(BranchRule.newBuilder().build())
                 .setValidateOnly(true)
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<BranchRule, OperationMetadata> future =
             secureSourceManagerClient.updateBranchRuleOperationCallable().futureCall(request);
         // Do something.
         BranchRule response = future.get();
       }
       
    • updateBranchRuleCallable

      public final UnaryCallable<UpdateBranchRuleRequest,Operation> updateBranchRuleCallable()
      UpdateBranchRule updates a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateBranchRuleRequest request =
             UpdateBranchRuleRequest.newBuilder()
                 .setBranchRule(BranchRule.newBuilder().build())
                 .setValidateOnly(true)
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.updateBranchRuleCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteBranchRuleAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBranchRuleAsync(BranchRuleName name)
      DeleteBranchRule deletes a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         BranchRuleName name =
             BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]");
         secureSourceManagerClient.deleteBranchRuleAsync(name).get();
       }
       
      Parameters:
      name -
      Throws:
      ApiException - if the remote call fails
    • deleteBranchRuleAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBranchRuleAsync(String name)
      DeleteBranchRule deletes a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]").toString();
         secureSourceManagerClient.deleteBranchRuleAsync(name).get();
       }
       
      Parameters:
      name -
      Throws:
      ApiException - if the remote call fails
    • deleteBranchRuleAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBranchRuleAsync(DeleteBranchRuleRequest request)
      DeleteBranchRule deletes a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteBranchRuleRequest request =
             DeleteBranchRuleRequest.newBuilder()
                 .setName(
                     BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
                         .toString())
                 .setAllowMissing(true)
                 .build();
         secureSourceManagerClient.deleteBranchRuleAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteBranchRuleOperationCallable

      public final OperationCallable<DeleteBranchRuleRequest,com.google.protobuf.Empty,OperationMetadata> deleteBranchRuleOperationCallable()
      DeleteBranchRule deletes a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteBranchRuleRequest request =
             DeleteBranchRuleRequest.newBuilder()
                 .setName(
                     BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
                         .toString())
                 .setAllowMissing(true)
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             secureSourceManagerClient.deleteBranchRuleOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteBranchRuleCallable

      public final UnaryCallable<DeleteBranchRuleRequest,Operation> deleteBranchRuleCallable()
      DeleteBranchRule deletes a branch rule.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteBranchRuleRequest request =
             DeleteBranchRuleRequest.newBuilder()
                 .setName(
                     BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
                         .toString())
                 .setAllowMissing(true)
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.deleteBranchRuleCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • createPullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> createPullRequestAsync(RepositoryName parent, PullRequest pullRequest)
      Creates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         PullRequest pullRequest = PullRequest.newBuilder().build();
         PullRequest response =
             secureSourceManagerClient.createPullRequestAsync(parent, pullRequest).get();
       }
       
      Parameters:
      parent - Required. The repository that the pull request is created from. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      pullRequest - Required. The pull request to create.
      Throws:
      ApiException - if the remote call fails
    • createPullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> createPullRequestAsync(String parent, PullRequest pullRequest)
      Creates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         PullRequest pullRequest = PullRequest.newBuilder().build();
         PullRequest response =
             secureSourceManagerClient.createPullRequestAsync(parent, pullRequest).get();
       }
       
      Parameters:
      parent - Required. The repository that the pull request is created from. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      pullRequest - Required. The pull request to create.
      Throws:
      ApiException - if the remote call fails
    • createPullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> createPullRequestAsync(CreatePullRequestRequest request)
      Creates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreatePullRequestRequest request =
             CreatePullRequestRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPullRequest(PullRequest.newBuilder().build())
                 .build();
         PullRequest response = secureSourceManagerClient.createPullRequestAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createPullRequestOperationCallable

      public final OperationCallable<CreatePullRequestRequest,PullRequest,OperationMetadata> createPullRequestOperationCallable()
      Creates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreatePullRequestRequest request =
             CreatePullRequestRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPullRequest(PullRequest.newBuilder().build())
                 .build();
         OperationFuture<PullRequest, OperationMetadata> future =
             secureSourceManagerClient.createPullRequestOperationCallable().futureCall(request);
         // Do something.
         PullRequest response = future.get();
       }
       
    • createPullRequestCallable

      public final UnaryCallable<CreatePullRequestRequest,Operation> createPullRequestCallable()
      Creates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreatePullRequestRequest request =
             CreatePullRequestRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPullRequest(PullRequest.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createPullRequestCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getPullRequest

      public final PullRequest getPullRequest(PullRequestName name)
      Gets a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         PullRequest response = secureSourceManagerClient.getPullRequest(name);
       }
       
      Parameters:
      name - Required. Name of the pull request to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`.
      Throws:
      ApiException - if the remote call fails
    • getPullRequest

      public final PullRequest getPullRequest(String name)
      Gets a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         PullRequest response = secureSourceManagerClient.getPullRequest(name);
       }
       
      Parameters:
      name - Required. Name of the pull request to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`.
      Throws:
      ApiException - if the remote call fails
    • getPullRequest

      public final PullRequest getPullRequest(GetPullRequestRequest request)
      Gets a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetPullRequestRequest request =
             GetPullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         PullRequest response = secureSourceManagerClient.getPullRequest(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getPullRequestCallable

      public final UnaryCallable<GetPullRequestRequest,PullRequest> getPullRequestCallable()
      Gets a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetPullRequestRequest request =
             GetPullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         ApiFuture<PullRequest> future =
             secureSourceManagerClient.getPullRequestCallable().futureCall(request);
         // Do something.
         PullRequest response = future.get();
       }
       
    • listPullRequests

      Lists pull requests in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         for (PullRequest element : secureSourceManagerClient.listPullRequests(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The repository in which to list pull requests. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      Throws:
      ApiException - if the remote call fails
    • listPullRequests

      public final SecureSourceManagerClient.ListPullRequestsPagedResponse listPullRequests(String parent)
      Lists pull requests in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         for (PullRequest element : secureSourceManagerClient.listPullRequests(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The repository in which to list pull requests. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      Throws:
      ApiException - if the remote call fails
    • listPullRequests

      Lists pull requests in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestsRequest request =
             ListPullRequestsRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (PullRequest element : secureSourceManagerClient.listPullRequests(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listPullRequestsPagedCallable

      Lists pull requests in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestsRequest request =
             ListPullRequestsRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<PullRequest> future =
             secureSourceManagerClient.listPullRequestsPagedCallable().futureCall(request);
         // Do something.
         for (PullRequest element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listPullRequestsCallable

      public final UnaryCallable<ListPullRequestsRequest,ListPullRequestsResponse> listPullRequestsCallable()
      Lists pull requests in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestsRequest request =
             ListPullRequestsRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListPullRequestsResponse response =
               secureSourceManagerClient.listPullRequestsCallable().call(request);
           for (PullRequest element : response.getPullRequestsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • updatePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> updatePullRequestAsync(PullRequest pullRequest, com.google.protobuf.FieldMask updateMask)
      Updates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequest pullRequest = PullRequest.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         PullRequest response =
             secureSourceManagerClient.updatePullRequestAsync(pullRequest, updateMask).get();
       }
       
      Parameters:
      pullRequest - Required. The pull request to update.
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updatePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> updatePullRequestAsync(UpdatePullRequestRequest request)
      Updates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdatePullRequestRequest request =
             UpdatePullRequestRequest.newBuilder()
                 .setPullRequest(PullRequest.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         PullRequest response = secureSourceManagerClient.updatePullRequestAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updatePullRequestOperationCallable

      public final OperationCallable<UpdatePullRequestRequest,PullRequest,OperationMetadata> updatePullRequestOperationCallable()
      Updates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdatePullRequestRequest request =
             UpdatePullRequestRequest.newBuilder()
                 .setPullRequest(PullRequest.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<PullRequest, OperationMetadata> future =
             secureSourceManagerClient.updatePullRequestOperationCallable().futureCall(request);
         // Do something.
         PullRequest response = future.get();
       }
       
    • updatePullRequestCallable

      public final UnaryCallable<UpdatePullRequestRequest,Operation> updatePullRequestCallable()
      Updates a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdatePullRequestRequest request =
             UpdatePullRequestRequest.newBuilder()
                 .setPullRequest(PullRequest.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.updatePullRequestCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • mergePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> mergePullRequestAsync(PullRequestName name)
      Merges a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         PullRequest response = secureSourceManagerClient.mergePullRequestAsync(name).get();
       }
       
      Parameters:
      name - Required. The pull request to merge. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • mergePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> mergePullRequestAsync(String name)
      Merges a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         PullRequest response = secureSourceManagerClient.mergePullRequestAsync(name).get();
       }
       
      Parameters:
      name - Required. The pull request to merge. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • mergePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> mergePullRequestAsync(MergePullRequestRequest request)
      Merges a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         MergePullRequestRequest request =
             MergePullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         PullRequest response = secureSourceManagerClient.mergePullRequestAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • mergePullRequestOperationCallable

      public final OperationCallable<MergePullRequestRequest,PullRequest,OperationMetadata> mergePullRequestOperationCallable()
      Merges a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         MergePullRequestRequest request =
             MergePullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         OperationFuture<PullRequest, OperationMetadata> future =
             secureSourceManagerClient.mergePullRequestOperationCallable().futureCall(request);
         // Do something.
         PullRequest response = future.get();
       }
       
    • mergePullRequestCallable

      public final UnaryCallable<MergePullRequestRequest,Operation> mergePullRequestCallable()
      Merges a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         MergePullRequestRequest request =
             MergePullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.mergePullRequestCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • openPullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> openPullRequestAsync(PullRequestName name)
      Opens a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         PullRequest response = secureSourceManagerClient.openPullRequestAsync(name).get();
       }
       
      Parameters:
      name - Required. The pull request to open. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • openPullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> openPullRequestAsync(String name)
      Opens a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         PullRequest response = secureSourceManagerClient.openPullRequestAsync(name).get();
       }
       
      Parameters:
      name - Required. The pull request to open. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • openPullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> openPullRequestAsync(OpenPullRequestRequest request)
      Opens a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         OpenPullRequestRequest request =
             OpenPullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         PullRequest response = secureSourceManagerClient.openPullRequestAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • openPullRequestOperationCallable

      public final OperationCallable<OpenPullRequestRequest,PullRequest,OperationMetadata> openPullRequestOperationCallable()
      Opens a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         OpenPullRequestRequest request =
             OpenPullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         OperationFuture<PullRequest, OperationMetadata> future =
             secureSourceManagerClient.openPullRequestOperationCallable().futureCall(request);
         // Do something.
         PullRequest response = future.get();
       }
       
    • openPullRequestCallable

      public final UnaryCallable<OpenPullRequestRequest,Operation> openPullRequestCallable()
      Opens a pull request.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         OpenPullRequestRequest request =
             OpenPullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.openPullRequestCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • closePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> closePullRequestAsync(PullRequestName name)
      Closes a pull request without merging.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         PullRequest response = secureSourceManagerClient.closePullRequestAsync(name).get();
       }
       
      Parameters:
      name - Required. The pull request to close. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • closePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> closePullRequestAsync(String name)
      Closes a pull request without merging.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         PullRequest response = secureSourceManagerClient.closePullRequestAsync(name).get();
       }
       
      Parameters:
      name - Required. The pull request to close. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • closePullRequestAsync

      public final OperationFuture<PullRequest,OperationMetadata> closePullRequestAsync(ClosePullRequestRequest request)
      Closes a pull request without merging.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ClosePullRequestRequest request =
             ClosePullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         PullRequest response = secureSourceManagerClient.closePullRequestAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • closePullRequestOperationCallable

      public final OperationCallable<ClosePullRequestRequest,PullRequest,OperationMetadata> closePullRequestOperationCallable()
      Closes a pull request without merging.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ClosePullRequestRequest request =
             ClosePullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         OperationFuture<PullRequest, OperationMetadata> future =
             secureSourceManagerClient.closePullRequestOperationCallable().futureCall(request);
         // Do something.
         PullRequest response = future.get();
       }
       
    • closePullRequestCallable

      public final UnaryCallable<ClosePullRequestRequest,Operation> closePullRequestCallable()
      Closes a pull request without merging.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ClosePullRequestRequest request =
             ClosePullRequestRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.closePullRequestCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listPullRequestFileDiffs

      Lists a pull request's file diffs.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         for (FileDiff element :
             secureSourceManagerClient.listPullRequestFileDiffs(name).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      name - Required. The pull request to list file diffs for. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • listPullRequestFileDiffs

      public final SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse listPullRequestFileDiffs(String name)
      Lists a pull request's file diffs.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         for (FileDiff element :
             secureSourceManagerClient.listPullRequestFileDiffs(name).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      name - Required. The pull request to list file diffs for. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
      Throws:
      ApiException - if the remote call fails
    • listPullRequestFileDiffs

      Lists a pull request's file diffs.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestFileDiffsRequest request =
             ListPullRequestFileDiffsRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (FileDiff element :
             secureSourceManagerClient.listPullRequestFileDiffs(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listPullRequestFileDiffsPagedCallable

      Lists a pull request's file diffs.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestFileDiffsRequest request =
             ListPullRequestFileDiffsRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<FileDiff> future =
             secureSourceManagerClient.listPullRequestFileDiffsPagedCallable().futureCall(request);
         // Do something.
         for (FileDiff element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listPullRequestFileDiffsCallable

      public final UnaryCallable<ListPullRequestFileDiffsRequest,ListPullRequestFileDiffsResponse> listPullRequestFileDiffsCallable()
      Lists a pull request's file diffs.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestFileDiffsRequest request =
             ListPullRequestFileDiffsRequest.newBuilder()
                 .setName(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListPullRequestFileDiffsResponse response =
               secureSourceManagerClient.listPullRequestFileDiffsCallable().call(request);
           for (FileDiff element : response.getFileDiffsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • fetchTree

      Fetches a tree from a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         FetchTreeRequest request =
             FetchTreeRequest.newBuilder()
                 .setRepository(
                     RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setRef("ref112787")
                 .setRecursive(true)
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (TreeEntry element : secureSourceManagerClient.fetchTree(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • fetchTreePagedCallable

      Fetches a tree from a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         FetchTreeRequest request =
             FetchTreeRequest.newBuilder()
                 .setRepository(
                     RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setRef("ref112787")
                 .setRecursive(true)
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<TreeEntry> future =
             secureSourceManagerClient.fetchTreePagedCallable().futureCall(request);
         // Do something.
         for (TreeEntry element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • fetchTreeCallable

      public final UnaryCallable<FetchTreeRequest,FetchTreeResponse> fetchTreeCallable()
      Fetches a tree from a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         FetchTreeRequest request =
             FetchTreeRequest.newBuilder()
                 .setRepository(
                     RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setRef("ref112787")
                 .setRecursive(true)
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           FetchTreeResponse response = secureSourceManagerClient.fetchTreeCallable().call(request);
           for (TreeEntry element : response.getTreeEntriesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • fetchBlob

      public final FetchBlobResponse fetchBlob(FetchBlobRequest request)
      Fetches a blob from a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         FetchBlobRequest request =
             FetchBlobRequest.newBuilder()
                 .setRepository(
                     RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setSha("sha113836")
                 .build();
         FetchBlobResponse response = secureSourceManagerClient.fetchBlob(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • fetchBlobCallable

      public final UnaryCallable<FetchBlobRequest,FetchBlobResponse> fetchBlobCallable()
      Fetches a blob from a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         FetchBlobRequest request =
             FetchBlobRequest.newBuilder()
                 .setRepository(
                     RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setSha("sha113836")
                 .build();
         ApiFuture<FetchBlobResponse> future =
             secureSourceManagerClient.fetchBlobCallable().futureCall(request);
         // Do something.
         FetchBlobResponse response = future.get();
       }
       
    • createIssueAsync

      public final OperationFuture<Issue,OperationMetadata> createIssueAsync(RepositoryName parent, Issue issue)
      Creates an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         Issue issue = Issue.newBuilder().build();
         Issue response = secureSourceManagerClient.createIssueAsync(parent, issue).get();
       }
       
      Parameters:
      parent - Required. The repository in which to create the issue. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      issue - Required. The issue to create.
      Throws:
      ApiException - if the remote call fails
    • createIssueAsync

      public final OperationFuture<Issue,OperationMetadata> createIssueAsync(String parent, Issue issue)
      Creates an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         Issue issue = Issue.newBuilder().build();
         Issue response = secureSourceManagerClient.createIssueAsync(parent, issue).get();
       }
       
      Parameters:
      parent - Required. The repository in which to create the issue. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      issue - Required. The issue to create.
      Throws:
      ApiException - if the remote call fails
    • createIssueAsync

      public final OperationFuture<Issue,OperationMetadata> createIssueAsync(CreateIssueRequest request)
      Creates an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateIssueRequest request =
             CreateIssueRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setIssue(Issue.newBuilder().build())
                 .build();
         Issue response = secureSourceManagerClient.createIssueAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createIssueOperationCallable

      public final OperationCallable<CreateIssueRequest,Issue,OperationMetadata> createIssueOperationCallable()
      Creates an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateIssueRequest request =
             CreateIssueRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setIssue(Issue.newBuilder().build())
                 .build();
         OperationFuture<Issue, OperationMetadata> future =
             secureSourceManagerClient.createIssueOperationCallable().futureCall(request);
         // Do something.
         Issue response = future.get();
       }
       
    • createIssueCallable

      public final UnaryCallable<CreateIssueRequest,Operation> createIssueCallable()
      Creates an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateIssueRequest request =
             CreateIssueRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setIssue(Issue.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createIssueCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getIssue

      public final Issue getIssue(IssueName name)
      Gets an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueName name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
         Issue response = secureSourceManagerClient.getIssue(name);
       }
       
      Parameters:
      name - Required. Name of the issue to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • getIssue

      public final Issue getIssue(String name)
      Gets an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
         Issue response = secureSourceManagerClient.getIssue(name);
       }
       
      Parameters:
      name - Required. Name of the issue to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • getIssue

      public final Issue getIssue(GetIssueRequest request)
      Gets an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIssueRequest request =
             GetIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .build();
         Issue response = secureSourceManagerClient.getIssue(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIssueCallable

      public final UnaryCallable<GetIssueRequest,Issue> getIssueCallable()
      Gets an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIssueRequest request =
             GetIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .build();
         ApiFuture<Issue> future = secureSourceManagerClient.getIssueCallable().futureCall(request);
         // Do something.
         Issue response = future.get();
       }
       
    • listIssues

      Lists issues in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
         for (Issue element : secureSourceManagerClient.listIssues(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The repository in which to list issues. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      Throws:
      ApiException - if the remote call fails
    • listIssues

      Lists issues in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
         for (Issue element : secureSourceManagerClient.listIssues(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The repository in which to list issues. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`
      Throws:
      ApiException - if the remote call fails
    • listIssues

      Lists issues in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListIssuesRequest request =
             ListIssuesRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         for (Issue element : secureSourceManagerClient.listIssues(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listIssuesPagedCallable

      Lists issues in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListIssuesRequest request =
             ListIssuesRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<Issue> future =
             secureSourceManagerClient.listIssuesPagedCallable().futureCall(request);
         // Do something.
         for (Issue element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listIssuesCallable

      public final UnaryCallable<ListIssuesRequest,ListIssuesResponse> listIssuesCallable()
      Lists issues in a repository.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListIssuesRequest request =
             ListIssuesRequest.newBuilder()
                 .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListIssuesResponse response = secureSourceManagerClient.listIssuesCallable().call(request);
           for (Issue element : response.getIssuesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • updateIssueAsync

      public final OperationFuture<Issue,OperationMetadata> updateIssueAsync(Issue issue, com.google.protobuf.FieldMask updateMask)
      Updates a issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         Issue issue = Issue.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Issue response = secureSourceManagerClient.updateIssueAsync(issue, updateMask).get();
       }
       
      Parameters:
      issue - Required. The issue to update.
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateIssueAsync

      public final OperationFuture<Issue,OperationMetadata> updateIssueAsync(UpdateIssueRequest request)
      Updates a issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateIssueRequest request =
             UpdateIssueRequest.newBuilder()
                 .setIssue(Issue.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Issue response = secureSourceManagerClient.updateIssueAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateIssueOperationCallable

      public final OperationCallable<UpdateIssueRequest,Issue,OperationMetadata> updateIssueOperationCallable()
      Updates a issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateIssueRequest request =
             UpdateIssueRequest.newBuilder()
                 .setIssue(Issue.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<Issue, OperationMetadata> future =
             secureSourceManagerClient.updateIssueOperationCallable().futureCall(request);
         // Do something.
         Issue response = future.get();
       }
       
    • updateIssueCallable

      public final UnaryCallable<UpdateIssueRequest,Operation> updateIssueCallable()
      Updates a issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateIssueRequest request =
             UpdateIssueRequest.newBuilder()
                 .setIssue(Issue.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.updateIssueCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteIssueAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueAsync(IssueName name)
      Deletes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueName name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
         secureSourceManagerClient.deleteIssueAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the issue to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteIssueAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueAsync(String name)
      Deletes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
         secureSourceManagerClient.deleteIssueAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the issue to delete. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteIssueAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueAsync(DeleteIssueRequest request)
      Deletes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteIssueRequest request =
             DeleteIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         secureSourceManagerClient.deleteIssueAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteIssueOperationCallable

      public final OperationCallable<DeleteIssueRequest,com.google.protobuf.Empty,OperationMetadata> deleteIssueOperationCallable()
      Deletes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteIssueRequest request =
             DeleteIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             secureSourceManagerClient.deleteIssueOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteIssueCallable

      public final UnaryCallable<DeleteIssueRequest,Operation> deleteIssueCallable()
      Deletes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteIssueRequest request =
             DeleteIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.deleteIssueCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • openIssueAsync

      public final OperationFuture<Issue,OperationMetadata> openIssueAsync(IssueName name)
      Opens an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueName name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
         Issue response = secureSourceManagerClient.openIssueAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the issue to open. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • openIssueAsync

      public final OperationFuture<Issue,OperationMetadata> openIssueAsync(String name)
      Opens an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
         Issue response = secureSourceManagerClient.openIssueAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the issue to open. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • openIssueAsync

      public final OperationFuture<Issue,OperationMetadata> openIssueAsync(OpenIssueRequest request)
      Opens an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         OpenIssueRequest request =
             OpenIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         Issue response = secureSourceManagerClient.openIssueAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • openIssueOperationCallable

      public final OperationCallable<OpenIssueRequest,Issue,OperationMetadata> openIssueOperationCallable()
      Opens an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         OpenIssueRequest request =
             OpenIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Issue, OperationMetadata> future =
             secureSourceManagerClient.openIssueOperationCallable().futureCall(request);
         // Do something.
         Issue response = future.get();
       }
       
    • openIssueCallable

      public final UnaryCallable<OpenIssueRequest,Operation> openIssueCallable()
      Opens an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         OpenIssueRequest request =
             OpenIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.openIssueCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • closeIssueAsync

      public final OperationFuture<Issue,OperationMetadata> closeIssueAsync(IssueName name)
      Closes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueName name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
         Issue response = secureSourceManagerClient.closeIssueAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the issue to close. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • closeIssueAsync

      public final OperationFuture<Issue,OperationMetadata> closeIssueAsync(String name)
      Closes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
         Issue response = secureSourceManagerClient.closeIssueAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the issue to close. The format is `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`.
      Throws:
      ApiException - if the remote call fails
    • closeIssueAsync

      public final OperationFuture<Issue,OperationMetadata> closeIssueAsync(CloseIssueRequest request)
      Closes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CloseIssueRequest request =
             CloseIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         Issue response = secureSourceManagerClient.closeIssueAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • closeIssueOperationCallable

      public final OperationCallable<CloseIssueRequest,Issue,OperationMetadata> closeIssueOperationCallable()
      Closes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CloseIssueRequest request =
             CloseIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Issue, OperationMetadata> future =
             secureSourceManagerClient.closeIssueOperationCallable().futureCall(request);
         // Do something.
         Issue response = future.get();
       }
       
    • closeIssueCallable

      public final UnaryCallable<CloseIssueRequest,Operation> closeIssueCallable()
      Closes an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CloseIssueRequest request =
             CloseIssueRequest.newBuilder()
                 .setName(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.closeIssueCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getPullRequestComment

      public final PullRequestComment getPullRequestComment(PullRequestCommentName name)
      Gets a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestCommentName name =
             PullRequestCommentName.of(
                 "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]");
         PullRequestComment response = secureSourceManagerClient.getPullRequestComment(name);
       }
       
      Parameters:
      name - 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}`.
      Throws:
      ApiException - if the remote call fails
    • getPullRequestComment

      public final PullRequestComment getPullRequestComment(String name)
      Gets a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             PullRequestCommentName.of(
                     "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
                 .toString();
         PullRequestComment response = secureSourceManagerClient.getPullRequestComment(name);
       }
       
      Parameters:
      name - 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}`.
      Throws:
      ApiException - if the remote call fails
    • getPullRequestComment

      public final PullRequestComment getPullRequestComment(GetPullRequestCommentRequest request)
      Gets a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetPullRequestCommentRequest request =
             GetPullRequestCommentRequest.newBuilder()
                 .setName(
                     PullRequestCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
                         .toString())
                 .build();
         PullRequestComment response = secureSourceManagerClient.getPullRequestComment(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getPullRequestCommentCallable

      public final UnaryCallable<GetPullRequestCommentRequest,PullRequestComment> getPullRequestCommentCallable()
      Gets a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetPullRequestCommentRequest request =
             GetPullRequestCommentRequest.newBuilder()
                 .setName(
                     PullRequestCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
                         .toString())
                 .build();
         ApiFuture<PullRequestComment> future =
             secureSourceManagerClient.getPullRequestCommentCallable().futureCall(request);
         // Do something.
         PullRequestComment response = future.get();
       }
       
    • listPullRequestComments

      Lists pull request comments.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         for (PullRequestComment element :
             secureSourceManagerClient.listPullRequestComments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - 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}`
      Throws:
      ApiException - if the remote call fails
    • listPullRequestComments

      public final SecureSourceManagerClient.ListPullRequestCommentsPagedResponse listPullRequestComments(String parent)
      Lists pull request comments.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         for (PullRequestComment element :
             secureSourceManagerClient.listPullRequestComments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - 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}`
      Throws:
      ApiException - if the remote call fails
    • listPullRequestComments

      Lists pull request comments.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestCommentsRequest request =
             ListPullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (PullRequestComment element :
             secureSourceManagerClient.listPullRequestComments(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listPullRequestCommentsPagedCallable

      Lists pull request comments.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestCommentsRequest request =
             ListPullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<PullRequestComment> future =
             secureSourceManagerClient.listPullRequestCommentsPagedCallable().futureCall(request);
         // Do something.
         for (PullRequestComment element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listPullRequestCommentsCallable

      public final UnaryCallable<ListPullRequestCommentsRequest,ListPullRequestCommentsResponse> listPullRequestCommentsCallable()
      Lists pull request comments.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListPullRequestCommentsRequest request =
             ListPullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListPullRequestCommentsResponse response =
               secureSourceManagerClient.listPullRequestCommentsCallable().call(request);
           for (PullRequestComment element : response.getPullRequestCommentsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createPullRequestCommentAsync

      public final OperationFuture<PullRequestComment,OperationMetadata> createPullRequestCommentAsync(PullRequestName parent, PullRequestComment pullRequestComment)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         PullRequestComment pullRequestComment = PullRequestComment.newBuilder().build();
         PullRequestComment response =
             secureSourceManagerClient.createPullRequestCommentAsync(parent, pullRequestComment).get();
       }
       
      Parameters:
      parent - 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}`
      pullRequestComment - Required. The pull request comment to create.
      Throws:
      ApiException - if the remote call fails
    • createPullRequestCommentAsync

      public final OperationFuture<PullRequestComment,OperationMetadata> createPullRequestCommentAsync(String parent, PullRequestComment pullRequestComment)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         PullRequestComment pullRequestComment = PullRequestComment.newBuilder().build();
         PullRequestComment response =
             secureSourceManagerClient.createPullRequestCommentAsync(parent, pullRequestComment).get();
       }
       
      Parameters:
      parent - 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}`
      pullRequestComment - Required. The pull request comment to create.
      Throws:
      ApiException - if the remote call fails
    • createPullRequestCommentAsync

      public final OperationFuture<PullRequestComment,OperationMetadata> createPullRequestCommentAsync(CreatePullRequestCommentRequest request)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreatePullRequestCommentRequest request =
             CreatePullRequestCommentRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPullRequestComment(PullRequestComment.newBuilder().build())
                 .build();
         PullRequestComment response =
             secureSourceManagerClient.createPullRequestCommentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createPullRequestCommentOperationCallable

      public final OperationCallable<CreatePullRequestCommentRequest,PullRequestComment,OperationMetadata> createPullRequestCommentOperationCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreatePullRequestCommentRequest request =
             CreatePullRequestCommentRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPullRequestComment(PullRequestComment.newBuilder().build())
                 .build();
         OperationFuture<PullRequestComment, OperationMetadata> future =
             secureSourceManagerClient.createPullRequestCommentOperationCallable().futureCall(request);
         // Do something.
         PullRequestComment response = future.get();
       }
       
    • createPullRequestCommentCallable

      public final UnaryCallable<CreatePullRequestCommentRequest,Operation> createPullRequestCommentCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreatePullRequestCommentRequest request =
             CreatePullRequestCommentRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .setPullRequestComment(PullRequestComment.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createPullRequestCommentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updatePullRequestCommentAsync

      public final OperationFuture<PullRequestComment,OperationMetadata> updatePullRequestCommentAsync(PullRequestComment pullRequestComment, com.google.protobuf.FieldMask updateMask)
      Updates a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestComment pullRequestComment = PullRequestComment.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         PullRequestComment response =
             secureSourceManagerClient
                 .updatePullRequestCommentAsync(pullRequestComment, updateMask)
                 .get();
       }
       
      Parameters:
      pullRequestComment - Required. The pull request comment to update.
      updateMask - 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`.
      Throws:
      ApiException - if the remote call fails
    • updatePullRequestCommentAsync

      public final OperationFuture<PullRequestComment,OperationMetadata> updatePullRequestCommentAsync(UpdatePullRequestCommentRequest request)
      Updates a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdatePullRequestCommentRequest request =
             UpdatePullRequestCommentRequest.newBuilder()
                 .setPullRequestComment(PullRequestComment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         PullRequestComment response =
             secureSourceManagerClient.updatePullRequestCommentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updatePullRequestCommentOperationCallable

      public final OperationCallable<UpdatePullRequestCommentRequest,PullRequestComment,OperationMetadata> updatePullRequestCommentOperationCallable()
      Updates a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdatePullRequestCommentRequest request =
             UpdatePullRequestCommentRequest.newBuilder()
                 .setPullRequestComment(PullRequestComment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<PullRequestComment, OperationMetadata> future =
             secureSourceManagerClient.updatePullRequestCommentOperationCallable().futureCall(request);
         // Do something.
         PullRequestComment response = future.get();
       }
       
    • updatePullRequestCommentCallable

      public final UnaryCallable<UpdatePullRequestCommentRequest,Operation> updatePullRequestCommentCallable()
      Updates a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdatePullRequestCommentRequest request =
             UpdatePullRequestCommentRequest.newBuilder()
                 .setPullRequestComment(PullRequestComment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.updatePullRequestCommentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deletePullRequestCommentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePullRequestCommentAsync(PullRequestCommentName name)
      Deletes a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestCommentName name =
             PullRequestCommentName.of(
                 "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]");
         secureSourceManagerClient.deletePullRequestCommentAsync(name).get();
       }
       
      Parameters:
      name - 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}`.
      Throws:
      ApiException - if the remote call fails
    • deletePullRequestCommentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePullRequestCommentAsync(String name)
      Deletes a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             PullRequestCommentName.of(
                     "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
                 .toString();
         secureSourceManagerClient.deletePullRequestCommentAsync(name).get();
       }
       
      Parameters:
      name - 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}`.
      Throws:
      ApiException - if the remote call fails
    • deletePullRequestCommentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePullRequestCommentAsync(DeletePullRequestCommentRequest request)
      Deletes a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeletePullRequestCommentRequest request =
             DeletePullRequestCommentRequest.newBuilder()
                 .setName(
                     PullRequestCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
                         .toString())
                 .build();
         secureSourceManagerClient.deletePullRequestCommentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deletePullRequestCommentOperationCallable

      public final OperationCallable<DeletePullRequestCommentRequest,com.google.protobuf.Empty,OperationMetadata> deletePullRequestCommentOperationCallable()
      Deletes a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeletePullRequestCommentRequest request =
             DeletePullRequestCommentRequest.newBuilder()
                 .setName(
                     PullRequestCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             secureSourceManagerClient.deletePullRequestCommentOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deletePullRequestCommentCallable

      public final UnaryCallable<DeletePullRequestCommentRequest,Operation> deletePullRequestCommentCallable()
      Deletes a pull request comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeletePullRequestCommentRequest request =
             DeletePullRequestCommentRequest.newBuilder()
                 .setName(
                     PullRequestCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.deletePullRequestCommentCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • batchCreatePullRequestCommentsAsync

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         List<CreatePullRequestCommentRequest> requests = new ArrayList<>();
         BatchCreatePullRequestCommentsResponse response =
             secureSourceManagerClient.batchCreatePullRequestCommentsAsync(parent, requests).get();
       }
       
      Parameters:
      parent - 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}`
      requests - 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
      Throws:
      ApiException - if the remote call fails
    • batchCreatePullRequestCommentsAsync

      public final OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> batchCreatePullRequestCommentsAsync(String parent, List<CreatePullRequestCommentRequest> requests)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         List<CreatePullRequestCommentRequest> requests = new ArrayList<>();
         BatchCreatePullRequestCommentsResponse response =
             secureSourceManagerClient.batchCreatePullRequestCommentsAsync(parent, requests).get();
       }
       
      Parameters:
      parent - 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}`
      requests - 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
      Throws:
      ApiException - if the remote call fails
    • batchCreatePullRequestCommentsAsync

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         BatchCreatePullRequestCommentsRequest request =
             BatchCreatePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllRequests(new ArrayList<CreatePullRequestCommentRequest>())
                 .build();
         BatchCreatePullRequestCommentsResponse response =
             secureSourceManagerClient.batchCreatePullRequestCommentsAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • batchCreatePullRequestCommentsOperationCallable

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         BatchCreatePullRequestCommentsRequest request =
             BatchCreatePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllRequests(new ArrayList<CreatePullRequestCommentRequest>())
                 .build();
         OperationFuture<BatchCreatePullRequestCommentsResponse, OperationMetadata> future =
             secureSourceManagerClient
                 .batchCreatePullRequestCommentsOperationCallable()
                 .futureCall(request);
         // Do something.
         BatchCreatePullRequestCommentsResponse response = future.get();
       }
       
    • batchCreatePullRequestCommentsCallable

      public final UnaryCallable<BatchCreatePullRequestCommentsRequest,Operation> batchCreatePullRequestCommentsCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         BatchCreatePullRequestCommentsRequest request =
             BatchCreatePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllRequests(new ArrayList<CreatePullRequestCommentRequest>())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.batchCreatePullRequestCommentsCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • resolvePullRequestCommentsAsync

      public final OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> resolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         List<String> names = new ArrayList<>();
         ResolvePullRequestCommentsResponse response =
             secureSourceManagerClient.resolvePullRequestCommentsAsync(parent, names).get();
       }
       
      Parameters:
      parent - 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}`
      names - 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.
      Throws:
      ApiException - if the remote call fails
    • resolvePullRequestCommentsAsync

      public final OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> resolvePullRequestCommentsAsync(String parent, List<String> names)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         List<String> names = new ArrayList<>();
         ResolvePullRequestCommentsResponse response =
             secureSourceManagerClient.resolvePullRequestCommentsAsync(parent, names).get();
       }
       
      Parameters:
      parent - 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}`
      names - 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.
      Throws:
      ApiException - if the remote call fails
    • resolvePullRequestCommentsAsync

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ResolvePullRequestCommentsRequest request =
             ResolvePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllNames(new ArrayList<String>())
                 .setAutoFill(true)
                 .build();
         ResolvePullRequestCommentsResponse response =
             secureSourceManagerClient.resolvePullRequestCommentsAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • resolvePullRequestCommentsOperationCallable

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ResolvePullRequestCommentsRequest request =
             ResolvePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllNames(new ArrayList<String>())
                 .setAutoFill(true)
                 .build();
         OperationFuture<ResolvePullRequestCommentsResponse, OperationMetadata> future =
             secureSourceManagerClient
                 .resolvePullRequestCommentsOperationCallable()
                 .futureCall(request);
         // Do something.
         ResolvePullRequestCommentsResponse response = future.get();
       }
       
    • resolvePullRequestCommentsCallable

      public final UnaryCallable<ResolvePullRequestCommentsRequest,Operation> resolvePullRequestCommentsCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ResolvePullRequestCommentsRequest request =
             ResolvePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllNames(new ArrayList<String>())
                 .setAutoFill(true)
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.resolvePullRequestCommentsCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • unresolvePullRequestCommentsAsync

      public final OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> unresolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         PullRequestName parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
         List<String> names = new ArrayList<>();
         UnresolvePullRequestCommentsResponse response =
             secureSourceManagerClient.unresolvePullRequestCommentsAsync(parent, names).get();
       }
       
      Parameters:
      parent - 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}`
      names - 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.
      Throws:
      ApiException - if the remote call fails
    • unresolvePullRequestCommentsAsync

      public final OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> unresolvePullRequestCommentsAsync(String parent, List<String> names)
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent =
             PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                 .toString();
         List<String> names = new ArrayList<>();
         UnresolvePullRequestCommentsResponse response =
             secureSourceManagerClient.unresolvePullRequestCommentsAsync(parent, names).get();
       }
       
      Parameters:
      parent - 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}`
      names - 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.
      Throws:
      ApiException - if the remote call fails
    • unresolvePullRequestCommentsAsync

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UnresolvePullRequestCommentsRequest request =
             UnresolvePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllNames(new ArrayList<String>())
                 .setAutoFill(true)
                 .build();
         UnresolvePullRequestCommentsResponse response =
             secureSourceManagerClient.unresolvePullRequestCommentsAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • unresolvePullRequestCommentsOperationCallable

      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UnresolvePullRequestCommentsRequest request =
             UnresolvePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllNames(new ArrayList<String>())
                 .setAutoFill(true)
                 .build();
         OperationFuture<UnresolvePullRequestCommentsResponse, OperationMetadata> future =
             secureSourceManagerClient
                 .unresolvePullRequestCommentsOperationCallable()
                 .futureCall(request);
         // Do something.
         UnresolvePullRequestCommentsResponse response = future.get();
       }
       
    • unresolvePullRequestCommentsCallable

      public final UnaryCallable<UnresolvePullRequestCommentsRequest,Operation> unresolvePullRequestCommentsCallable()
      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.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UnresolvePullRequestCommentsRequest request =
             UnresolvePullRequestCommentsRequest.newBuilder()
                 .setParent(
                     PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
                         .toString())
                 .addAllNames(new ArrayList<String>())
                 .setAutoFill(true)
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.unresolvePullRequestCommentsCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createIssueCommentAsync

      public final OperationFuture<IssueComment,OperationMetadata> createIssueCommentAsync(IssueName parent, IssueComment issueComment)
      Creates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueName parent = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
         IssueComment issueComment = IssueComment.newBuilder().build();
         IssueComment response =
             secureSourceManagerClient.createIssueCommentAsync(parent, issueComment).get();
       }
       
      Parameters:
      parent - Required. The issue in which to create the issue comment. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
      issueComment - Required. The issue comment to create.
      Throws:
      ApiException - if the remote call fails
    • createIssueCommentAsync

      public final OperationFuture<IssueComment,OperationMetadata> createIssueCommentAsync(String parent, IssueComment issueComment)
      Creates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
         IssueComment issueComment = IssueComment.newBuilder().build();
         IssueComment response =
             secureSourceManagerClient.createIssueCommentAsync(parent, issueComment).get();
       }
       
      Parameters:
      parent - Required. The issue in which to create the issue comment. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
      issueComment - Required. The issue comment to create.
      Throws:
      ApiException - if the remote call fails
    • createIssueCommentAsync

      public final OperationFuture<IssueComment,OperationMetadata> createIssueCommentAsync(CreateIssueCommentRequest request)
      Creates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateIssueCommentRequest request =
             CreateIssueCommentRequest.newBuilder()
                 .setParent(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setIssueComment(IssueComment.newBuilder().build())
                 .build();
         IssueComment response = secureSourceManagerClient.createIssueCommentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createIssueCommentOperationCallable

      public final OperationCallable<CreateIssueCommentRequest,IssueComment,OperationMetadata> createIssueCommentOperationCallable()
      Creates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateIssueCommentRequest request =
             CreateIssueCommentRequest.newBuilder()
                 .setParent(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setIssueComment(IssueComment.newBuilder().build())
                 .build();
         OperationFuture<IssueComment, OperationMetadata> future =
             secureSourceManagerClient.createIssueCommentOperationCallable().futureCall(request);
         // Do something.
         IssueComment response = future.get();
       }
       
    • createIssueCommentCallable

      public final UnaryCallable<CreateIssueCommentRequest,Operation> createIssueCommentCallable()
      Creates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         CreateIssueCommentRequest request =
             CreateIssueCommentRequest.newBuilder()
                 .setParent(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setIssueComment(IssueComment.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.createIssueCommentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getIssueComment

      public final IssueComment getIssueComment(IssueCommentName name)
      Gets an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueCommentName name =
             IssueCommentName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]");
         IssueComment response = secureSourceManagerClient.getIssueComment(name);
       }
       
      Parameters:
      name - Required. Name of the issue comment to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`.
      Throws:
      ApiException - if the remote call fails
    • getIssueComment

      public final IssueComment getIssueComment(String name)
      Gets an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             IssueCommentName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
                 .toString();
         IssueComment response = secureSourceManagerClient.getIssueComment(name);
       }
       
      Parameters:
      name - Required. Name of the issue comment to retrieve. The format is `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`.
      Throws:
      ApiException - if the remote call fails
    • getIssueComment

      public final IssueComment getIssueComment(GetIssueCommentRequest request)
      Gets an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIssueCommentRequest request =
             GetIssueCommentRequest.newBuilder()
                 .setName(
                     IssueCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
                         .toString())
                 .build();
         IssueComment response = secureSourceManagerClient.getIssueComment(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIssueCommentCallable

      public final UnaryCallable<GetIssueCommentRequest,IssueComment> getIssueCommentCallable()
      Gets an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIssueCommentRequest request =
             GetIssueCommentRequest.newBuilder()
                 .setName(
                     IssueCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
                         .toString())
                 .build();
         ApiFuture<IssueComment> future =
             secureSourceManagerClient.getIssueCommentCallable().futureCall(request);
         // Do something.
         IssueComment response = future.get();
       }
       
    • listIssueComments

      Lists comments in an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueName parent = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
         for (IssueComment element :
             secureSourceManagerClient.listIssueComments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The issue in which to list the comments. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
      Throws:
      ApiException - if the remote call fails
    • listIssueComments

      public final SecureSourceManagerClient.ListIssueCommentsPagedResponse listIssueComments(String parent)
      Lists comments in an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String parent = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
         for (IssueComment element :
             secureSourceManagerClient.listIssueComments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The issue in which to list the comments. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`
      Throws:
      ApiException - if the remote call fails
    • listIssueComments

      Lists comments in an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListIssueCommentsRequest request =
             ListIssueCommentsRequest.newBuilder()
                 .setParent(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (IssueComment element :
             secureSourceManagerClient.listIssueComments(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listIssueCommentsPagedCallable

      Lists comments in an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListIssueCommentsRequest request =
             ListIssueCommentsRequest.newBuilder()
                 .setParent(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<IssueComment> future =
             secureSourceManagerClient.listIssueCommentsPagedCallable().futureCall(request);
         // Do something.
         for (IssueComment element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listIssueCommentsCallable

      public final UnaryCallable<ListIssueCommentsRequest,ListIssueCommentsResponse> listIssueCommentsCallable()
      Lists comments in an issue.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListIssueCommentsRequest request =
             ListIssueCommentsRequest.newBuilder()
                 .setParent(
                     IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListIssueCommentsResponse response =
               secureSourceManagerClient.listIssueCommentsCallable().call(request);
           for (IssueComment element : response.getIssueCommentsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • updateIssueCommentAsync

      public final OperationFuture<IssueComment,OperationMetadata> updateIssueCommentAsync(IssueComment issueComment, com.google.protobuf.FieldMask updateMask)
      Updates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueComment issueComment = IssueComment.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         IssueComment response =
             secureSourceManagerClient.updateIssueCommentAsync(issueComment, updateMask).get();
       }
       
      Parameters:
      issueComment - Required. The issue comment to update.
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateIssueCommentAsync

      public final OperationFuture<IssueComment,OperationMetadata> updateIssueCommentAsync(UpdateIssueCommentRequest request)
      Updates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateIssueCommentRequest request =
             UpdateIssueCommentRequest.newBuilder()
                 .setIssueComment(IssueComment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         IssueComment response = secureSourceManagerClient.updateIssueCommentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateIssueCommentOperationCallable

      public final OperationCallable<UpdateIssueCommentRequest,IssueComment,OperationMetadata> updateIssueCommentOperationCallable()
      Updates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateIssueCommentRequest request =
             UpdateIssueCommentRequest.newBuilder()
                 .setIssueComment(IssueComment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<IssueComment, OperationMetadata> future =
             secureSourceManagerClient.updateIssueCommentOperationCallable().futureCall(request);
         // Do something.
         IssueComment response = future.get();
       }
       
    • updateIssueCommentCallable

      public final UnaryCallable<UpdateIssueCommentRequest,Operation> updateIssueCommentCallable()
      Updates an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         UpdateIssueCommentRequest request =
             UpdateIssueCommentRequest.newBuilder()
                 .setIssueComment(IssueComment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.updateIssueCommentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteIssueCommentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueCommentAsync(IssueCommentName name)
      Deletes an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         IssueCommentName name =
             IssueCommentName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]");
         secureSourceManagerClient.deleteIssueCommentAsync(name).get();
       }
       
      Parameters:
      name - 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}`.
      Throws:
      ApiException - if the remote call fails
    • deleteIssueCommentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueCommentAsync(String name)
      Deletes an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         String name =
             IssueCommentName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
                 .toString();
         secureSourceManagerClient.deleteIssueCommentAsync(name).get();
       }
       
      Parameters:
      name - 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}`.
      Throws:
      ApiException - if the remote call fails
    • deleteIssueCommentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueCommentAsync(DeleteIssueCommentRequest request)
      Deletes an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteIssueCommentRequest request =
             DeleteIssueCommentRequest.newBuilder()
                 .setName(
                     IssueCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
                         .toString())
                 .build();
         secureSourceManagerClient.deleteIssueCommentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteIssueCommentOperationCallable

      public final OperationCallable<DeleteIssueCommentRequest,com.google.protobuf.Empty,OperationMetadata> deleteIssueCommentOperationCallable()
      Deletes an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteIssueCommentRequest request =
             DeleteIssueCommentRequest.newBuilder()
                 .setName(
                     IssueCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             secureSourceManagerClient.deleteIssueCommentOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteIssueCommentCallable

      public final UnaryCallable<DeleteIssueCommentRequest,Operation> deleteIssueCommentCallable()
      Deletes an issue comment.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         DeleteIssueCommentRequest request =
             DeleteIssueCommentRequest.newBuilder()
                 .setName(
                     IssueCommentName.of(
                             "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             secureSourceManagerClient.deleteIssueCommentCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : secureSourceManagerClient.listLocations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             secureSourceManagerClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               secureSourceManagerClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = secureSourceManagerClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             secureSourceManagerClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = secureSourceManagerClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             secureSourceManagerClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = secureSourceManagerClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             secureSourceManagerClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response = secureSourceManagerClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      Sample code:

      
       // 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.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             secureSourceManagerClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException