Class SecureSourceManagerClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteInstance |
Deletes a single instance. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRepository |
Gets metadata of a repository. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteRepository |
Deletes a Repository. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetHook |
Gets metadata of a hook. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteHook |
Deletes a Hook. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBranchRule |
GetBranchRule gets a branch rule. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateBranchRule |
UpdateBranchRule updates a branch rule. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBranchRule |
DeleteBranchRule deletes a branch rule. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreatePullRequest |
Creates a pull request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPullRequest |
Gets a pull request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdatePullRequest |
Updates a pull request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
MergePullRequest |
Merges a pull request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
OpenPullRequest |
Opens a pull request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateIssue |
Creates an issue. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIssue |
Gets an issue. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListIssues |
Lists issues in a repository. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateIssue |
Updates a issue. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteIssue |
Deletes an issue. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
OpenIssue |
Opens an issue. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CloseIssue |
Closes an issue. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPullRequestComment |
Gets a pull request comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListPullRequestComments |
Lists pull request comments. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdatePullRequestComment |
Updates a pull request comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeletePullRequestComment |
Deletes a pull request comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateIssueComment |
Creates an issue comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIssueComment |
Gets an issue comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListIssueComments |
Lists comments in an issue. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateIssueComment |
Updates an issue comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteIssueComment |
Deletes an issue comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of SecureSourceManagerClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) Batch creates pull request comments.batchCreatePullRequestCommentsAsync(PullRequestName parent, List<CreatePullRequestCommentRequest> requests) Batch creates pull request comments.batchCreatePullRequestCommentsAsync(String parent, List<CreatePullRequestCommentRequest> requests) Batch creates pull request comments.Batch creates pull request comments.final OperationCallable<BatchCreatePullRequestCommentsRequest,BatchCreatePullRequestCommentsResponse, OperationMetadata> Batch creates pull request comments.final voidclose()closeIssueAsync(CloseIssueRequest request) Closes an issue.closeIssueAsync(IssueName name) Closes an issue.closeIssueAsync(String name) Closes an issue.Closes an issue.Closes an issue.Closes a pull request without merging.Closes a pull request without merging.closePullRequestAsync(String name) Closes a pull request without merging.Closes a pull request without merging.Closes a pull request without merging.static final SecureSourceManagerClientcreate()Constructs an instance of SecureSourceManagerClient with default settings.static final SecureSourceManagerClientcreate(SecureSourceManagerSettings settings) Constructs an instance of SecureSourceManagerClient, using the given settings.static final SecureSourceManagerClientConstructs an instance of SecureSourceManagerClient, using the given stub for making calls.CreateBranchRule creates a branch rule in a given repository.createBranchRuleAsync(RepositoryName parent, BranchRule branchRule, String branchRuleId) CreateBranchRule creates a branch rule in a given repository.createBranchRuleAsync(String parent, BranchRule branchRule, String branchRuleId) CreateBranchRule creates a branch rule in a given repository.CreateBranchRule creates a branch rule in a given repository.CreateBranchRule creates a branch rule in a given repository.final OperationFuture<Hook,OperationMetadata> createHookAsync(CreateHookRequest request) Creates a new hook in a given repository.final OperationFuture<Hook,OperationMetadata> createHookAsync(RepositoryName parent, Hook hook, String hookId) Creates a new hook in a given repository.final OperationFuture<Hook,OperationMetadata> createHookAsync(String parent, Hook hook, String hookId) Creates a new hook in a given repository.Creates a new hook in a given repository.Creates a new hook in a given repository.createInstanceAsync(CreateInstanceRequest request) Creates a new instance in a given project and location.createInstanceAsync(LocationName parent, Instance instance, String instanceId) Creates a new instance in a given project and location.createInstanceAsync(String parent, Instance instance, String instanceId) Creates a new instance in a given project and location.Creates a new instance in a given project and location.Creates a new instance in a given project and location.createIssueAsync(CreateIssueRequest request) Creates an issue.createIssueAsync(RepositoryName parent, Issue issue) Creates an issue.createIssueAsync(String parent, Issue issue) Creates an issue.Creates an issue.Creates an issue comment.createIssueCommentAsync(IssueName parent, IssueComment issueComment) Creates an issue comment.createIssueCommentAsync(String parent, IssueComment issueComment) Creates an issue comment.Creates an issue comment.Creates an issue comment.Creates an issue.Creates a pull request.createPullRequestAsync(RepositoryName parent, PullRequest pullRequest) Creates a pull request.createPullRequestAsync(String parent, PullRequest pullRequest) Creates a pull request.Creates a pull request.Creates a pull request comment.createPullRequestCommentAsync(PullRequestName parent, PullRequestComment pullRequestComment) Creates a pull request comment.createPullRequestCommentAsync(String parent, PullRequestComment pullRequestComment) Creates a pull request comment.Creates a pull request comment.Creates a pull request comment.Creates a pull request.Creates a new repository in a given project and location.createRepositoryAsync(LocationName parent, Repository repository, String repositoryId) Creates a new repository in a given project and location.createRepositoryAsync(String parent, Repository repository, String repositoryId) Creates a new repository in a given project and location.Creates a new repository in a given project and location.Creates a new repository in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> DeleteBranchRule deletes a branch rule.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> DeleteBranchRule deletes a branch rule.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBranchRuleAsync(String name) DeleteBranchRule deletes a branch rule.DeleteBranchRule deletes a branch rule.final OperationCallable<DeleteBranchRuleRequest,com.google.protobuf.Empty, OperationMetadata> DeleteBranchRule deletes a branch rule.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHookAsync(DeleteHookRequest request) Deletes a Hook.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHookAsync(HookName name) Deletes a Hook.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHookAsync(String name) Deletes a Hook.Deletes a Hook.final OperationCallable<DeleteHookRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Hook.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(DeleteInstanceRequest request) Deletes a single instance.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single instance.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(String name) Deletes a single instance.Deletes a single instance.final OperationCallable<DeleteInstanceRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single instance.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueAsync(DeleteIssueRequest request) Deletes an issue.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueAsync(IssueName name) Deletes an issue.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteIssueAsync(String name) Deletes an issue.Deletes an issue.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an issue comment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an issue comment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an issue comment.Deletes an issue comment.final OperationCallable<DeleteIssueCommentRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an issue comment.final OperationCallable<DeleteIssueRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an issue.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a pull request comment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a pull request comment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a pull request comment.Deletes a pull request comment.final OperationCallable<DeletePullRequestCommentRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a pull request comment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Repository.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Repository.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRepositoryAsync(String name) Deletes a Repository.Deletes a Repository.final OperationCallable<DeleteRepositoryRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Repository.final FetchBlobResponsefetchBlob(FetchBlobRequest request) Fetches a blob from a repository.Fetches a blob from a repository.fetchTree(FetchTreeRequest request) Fetches a tree from a repository.Fetches a tree from a repository.Fetches a tree from a repository.final BranchRulegetBranchRule(BranchRuleName name) GetBranchRule gets a branch rule.final BranchRulegetBranchRule(GetBranchRuleRequest request) GetBranchRule gets a branch rule.final BranchRulegetBranchRule(String name) GetBranchRule gets a branch rule.GetBranchRule gets a branch rule.final HookgetHook(GetHookRequest request) Gets metadata of a hook.final HookGets metadata of a hook.final HookGets metadata of a hook.final UnaryCallable<GetHookRequest,Hook> Gets metadata of a hook.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final PolicygetIamPolicyRepo(ResourceName resource) Get IAM policy for a repository.final PolicygetIamPolicyRepo(GetIamPolicyRequest request) Get IAM policy for a repository.final PolicygetIamPolicyRepo(String resource) Get IAM policy for a repository.Get IAM policy for a repository.final InstancegetInstance(GetInstanceRequest request) Gets details of a single instance.final InstancegetInstance(InstanceName name) Gets details of a single instance.final InstancegetInstance(String name) Gets details of a single instance.Gets details of a single instance.final IssuegetIssue(GetIssueRequest request) Gets an issue.final IssueGets an issue.final IssueGets an issue.final UnaryCallable<GetIssueRequest,Issue> Gets an issue.final IssueCommentgetIssueComment(GetIssueCommentRequest request) Gets an issue comment.final IssueCommentGets an issue comment.final IssueCommentgetIssueComment(String name) Gets an issue comment.Gets an issue comment.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PullRequestgetPullRequest(GetPullRequestRequest request) Gets a pull request.final PullRequestGets a pull request.final PullRequestgetPullRequest(String name) Gets a pull request.Gets a pull request.final PullRequestCommentGets a pull request comment.final PullRequestCommentGets a pull request comment.final PullRequestCommentgetPullRequestComment(String name) Gets a pull request comment.Gets a pull request comment.final RepositorygetRepository(GetRepositoryRequest request) Gets metadata of a repository.final RepositorygetRepository(RepositoryName name) Gets metadata of a repository.final RepositorygetRepository(String name) Gets metadata of a repository.Gets metadata of a repository.getStub()booleanbooleanlistBranchRules(ListBranchRulesRequest request) ListBranchRules lists branch rules in a given repository.listBranchRules(RepositoryName parent) ListBranchRules lists branch rules in a given repository.listBranchRules(String parent) ListBranchRules lists branch rules in a given repository.ListBranchRules lists branch rules in a given repository.ListBranchRules lists branch rules in a given repository.listHooks(ListHooksRequest request) Lists hooks in a given repository.listHooks(RepositoryName parent) Lists hooks in a given repository.Lists hooks in a given repository.Lists hooks in a given repository.Lists hooks in a given repository.listInstances(ListInstancesRequest request) Lists Instances in a given project and location.listInstances(LocationName parent) Lists Instances in a given project and location.listInstances(String parent) Lists Instances in a given project and location.Lists Instances in a given project and location.Lists Instances in a given project and location.listIssueComments(IssueName parent) Lists comments in an issue.Lists comments in an issue.listIssueComments(String parent) Lists comments in an issue.Lists comments in an issue.final UnaryCallable<ListIssueCommentsRequest,SecureSourceManagerClient.ListIssueCommentsPagedResponse> Lists comments in an issue.listIssues(ListIssuesRequest request) Lists issues in a repository.listIssues(RepositoryName parent) Lists issues in a repository.listIssues(String parent) Lists issues in a repository.Lists issues in a repository.Lists issues in a repository.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists pull request comments.Lists pull request comments.listPullRequestComments(String parent) Lists pull request comments.Lists pull request comments.final UnaryCallable<ListPullRequestCommentsRequest,SecureSourceManagerClient.ListPullRequestCommentsPagedResponse> Lists pull request comments.Lists a pull request's file diffs.Lists a pull request's file diffs.Lists a pull request's file diffs.Lists a pull request's file diffs.final UnaryCallable<ListPullRequestFileDiffsRequest,SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse> Lists a pull request's file diffs.listPullRequests(ListPullRequestsRequest request) Lists pull requests in a repository.listPullRequests(RepositoryName parent) Lists pull requests in a repository.listPullRequests(String parent) Lists pull requests in a repository.Lists pull requests in a repository.final UnaryCallable<ListPullRequestsRequest,SecureSourceManagerClient.ListPullRequestsPagedResponse> Lists pull requests in a repository.listRepositories(ListRepositoriesRequest request) Lists Repositories in a given project and location.listRepositories(LocationName parent) Lists Repositories in a given project and location.listRepositories(String parent) Lists Repositories in a given project and location.Lists Repositories in a given project and location.final UnaryCallable<ListRepositoriesRequest,SecureSourceManagerClient.ListRepositoriesPagedResponse> Lists Repositories in a given project and location.Merges a pull request.Merges a pull request.mergePullRequestAsync(String name) Merges a pull request.Merges a pull request.Merges a pull request.openIssueAsync(IssueName name) Opens an issue.openIssueAsync(OpenIssueRequest request) Opens an issue.openIssueAsync(String name) Opens an issue.Opens an issue.Opens an issue.Opens a pull request.Opens a pull request.openPullRequestAsync(String name) Opens a pull request.Opens a pull request.Opens a pull request.resolvePullRequestCommentsAsync(PullRequestName parent, List<String> names) Resolves pull request comments.Resolves pull request comments.resolvePullRequestCommentsAsync(String parent, List<String> names) Resolves pull request comments.Resolves pull request comments.final OperationCallable<ResolvePullRequestCommentsRequest,ResolvePullRequestCommentsResponse, OperationMetadata> Resolves pull request comments.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.final PolicysetIamPolicyRepo(ResourceName resource) Set IAM policy on a repository.final PolicysetIamPolicyRepo(SetIamPolicyRequest request) Set IAM policy on a repository.final PolicysetIamPolicyRepo(String resource) Set IAM policy on a repository.Set IAM policy on a repository.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.testIamPermissionsRepo(ResourceName resource) Test IAM permissions on a repository.Test IAM permissions on a repository.testIamPermissionsRepo(String resource) Test IAM permissions on a repository.Test IAM permissions on a repository.unresolvePullRequestCommentsAsync(PullRequestName parent, List<String> names) Unresolves pull request comments.Unresolves pull request comments.unresolvePullRequestCommentsAsync(String parent, List<String> names) Unresolves pull request comments.Unresolves pull request comments.final OperationCallable<UnresolvePullRequestCommentsRequest,UnresolvePullRequestCommentsResponse, OperationMetadata> Unresolves pull request comments.updateBranchRuleAsync(BranchRule branchRule, com.google.protobuf.FieldMask updateMask) UpdateBranchRule updates a branch rule.UpdateBranchRule updates a branch rule.UpdateBranchRule updates a branch rule.UpdateBranchRule updates a branch rule.final OperationFuture<Hook,OperationMetadata> updateHookAsync(Hook hook, com.google.protobuf.FieldMask updateMask) Updates the metadata of a hook.final OperationFuture<Hook,OperationMetadata> updateHookAsync(UpdateHookRequest request) Updates the metadata of a hook.Updates the metadata of a hook.Updates the metadata of a hook.updateIssueAsync(Issue issue, com.google.protobuf.FieldMask updateMask) Updates a issue.updateIssueAsync(UpdateIssueRequest request) Updates a issue.Updates a issue.updateIssueCommentAsync(IssueComment issueComment, com.google.protobuf.FieldMask updateMask) Updates an issue comment.Updates an issue comment.Updates an issue comment.Updates an issue comment.Updates a issue.updatePullRequestAsync(PullRequest pullRequest, com.google.protobuf.FieldMask updateMask) Updates a pull request.Updates a pull request.Updates a pull request.updatePullRequestCommentAsync(PullRequestComment pullRequestComment, com.google.protobuf.FieldMask updateMask) Updates a pull request comment.Updates a pull request comment.Updates a pull request comment.Updates a pull request comment.Updates a pull request.updateRepositoryAsync(Repository repository, com.google.protobuf.FieldMask updateMask) Updates the metadata of a repository.Updates the metadata of a repository.Updates the metadata of a repository.Updates the metadata of a repository.
-
Constructor Details
-
SecureSourceManagerClient
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
-
-
Method Details
-
create
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
Constructs an instance of SecureSourceManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecureSourceManagerSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listInstances
public final SecureSourceManagerClient.ListInstancesPagedResponse listInstances(LocationName 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()) { 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
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
public final SecureSourceManagerClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request) 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
public final UnaryCallable<ListInstancesRequest,SecureSourceManagerClient.ListInstancesPagedResponse> 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
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
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
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
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
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, createInstanceOperationCallable()OperationMetadata> 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
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, deleteInstanceOperationCallable()OperationMetadata> 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
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
public final SecureSourceManagerClient.ListRepositoriesPagedResponse listRepositories(LocationName 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()) { 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
public final SecureSourceManagerClient.ListRepositoriesPagedResponse listRepositories(ListRepositoriesRequest request) 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
public final UnaryCallable<ListRepositoriesRequest,SecureSourceManagerClient.ListRepositoriesPagedResponse> 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
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
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
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
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, createRepositoryOperationCallable()OperationMetadata> 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
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, updateRepositoryOperationCallable()OperationMetadata> 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
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, deleteRepositoryOperationCallable()OperationMetadata> 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
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
public final UnaryCallable<ListHooksRequest,SecureSourceManagerClient.ListHooksPagedResponse> 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
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
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
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
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
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
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, createHookOperationCallable()OperationMetadata> 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
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
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, updateHookOperationCallable()OperationMetadata> 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
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, deleteHookOperationCallable()OperationMetadata> 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
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
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
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
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
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
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
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
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
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
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
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
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, createBranchRuleOperationCallable()OperationMetadata> 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
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
public final SecureSourceManagerClient.ListBranchRulesPagedResponse listBranchRules(RepositoryName 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()) { 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
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
public final SecureSourceManagerClient.ListBranchRulesPagedResponse listBranchRules(ListBranchRulesRequest request) 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
public final UnaryCallable<ListBranchRulesRequest,SecureSourceManagerClient.ListBranchRulesPagedResponse> 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
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
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
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
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, updateBranchRuleOperationCallable()OperationMetadata> 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
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, deleteBranchRuleOperationCallable()OperationMetadata> 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
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, createPullRequestOperationCallable()OperationMetadata> 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
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
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
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
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
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
public final SecureSourceManagerClient.ListPullRequestsPagedResponse listPullRequests(RepositoryName 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()) { 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
public final SecureSourceManagerClient.ListPullRequestsPagedResponse listPullRequests(ListPullRequestsRequest request) 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
public final UnaryCallable<ListPullRequestsRequest,SecureSourceManagerClient.ListPullRequestsPagedResponse> 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, updatePullRequestOperationCallable()OperationMetadata> 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
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
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, mergePullRequestOperationCallable()OperationMetadata> 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
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
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, openPullRequestOperationCallable()OperationMetadata> 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
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
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, closePullRequestOperationCallable()OperationMetadata> 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
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
public final SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse listPullRequestFileDiffs(PullRequestName 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()) { 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
public final SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse listPullRequestFileDiffs(ListPullRequestFileDiffsRequest request) 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
public final UnaryCallable<ListPullRequestFileDiffsRequest,SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse> 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
public final UnaryCallable<FetchTreeRequest,SecureSourceManagerClient.FetchTreePagedResponse> 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
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
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
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
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
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, createIssueOperationCallable()OperationMetadata> 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
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
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
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
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
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
public final SecureSourceManagerClient.ListIssuesPagedResponse listIssues(ListIssuesRequest request) 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
public final UnaryCallable<ListIssuesRequest,SecureSourceManagerClient.ListIssuesPagedResponse> 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
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
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, updateIssueOperationCallable()OperationMetadata> 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
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, deleteIssueOperationCallable()OperationMetadata> 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
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
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
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
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, openIssueOperationCallable()OperationMetadata> 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
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
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
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
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, closeIssueOperationCallable()OperationMetadata> 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
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
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
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
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
public final SecureSourceManagerClient.ListPullRequestCommentsPagedResponse listPullRequestComments(PullRequestName 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()) { 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
public final SecureSourceManagerClient.ListPullRequestCommentsPagedResponse listPullRequestComments(ListPullRequestCommentsRequest request) 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
public final UnaryCallable<ListPullRequestCommentsRequest,SecureSourceManagerClient.ListPullRequestCommentsPagedResponse> 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, createPullRequestCommentOperationCallable()OperationMetadata> 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, updatePullRequestCommentOperationCallable()OperationMetadata> 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, deletePullRequestCommentOperationCallable()OperationMetadata> 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
public final OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> batchCreatePullRequestCommentsAsync(PullRequestName 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()) { 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
public final OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> batchCreatePullRequestCommentsAsync(BatchCreatePullRequestCommentsRequest request) 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
public final OperationCallable<BatchCreatePullRequestCommentsRequest,BatchCreatePullRequestCommentsResponse, batchCreatePullRequestCommentsOperationCallable()OperationMetadata> 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
public final OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> resolvePullRequestCommentsAsync(ResolvePullRequestCommentsRequest request) 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
public final OperationCallable<ResolvePullRequestCommentsRequest,ResolvePullRequestCommentsResponse, resolvePullRequestCommentsOperationCallable()OperationMetadata> 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
public final OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> unresolvePullRequestCommentsAsync(UnresolvePullRequestCommentsRequest request) 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
public final OperationCallable<UnresolvePullRequestCommentsRequest,UnresolvePullRequestCommentsResponse, unresolvePullRequestCommentsOperationCallable()OperationMetadata> 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, createIssueCommentOperationCallable()OperationMetadata> 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
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
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
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
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
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
public final SecureSourceManagerClient.ListIssueCommentsPagedResponse listIssueComments(IssueName 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()) { 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
public final SecureSourceManagerClient.ListIssueCommentsPagedResponse listIssueComments(ListIssueCommentsRequest request) 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
public final UnaryCallable<ListIssueCommentsRequest,SecureSourceManagerClient.ListIssueCommentsPagedResponse> 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, updateIssueCommentOperationCallable()OperationMetadata> 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
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, deleteIssueCommentOperationCallable()OperationMetadata> 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
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
public final SecureSourceManagerClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) 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
public final UnaryCallable<ListLocationsRequest,SecureSourceManagerClient.ListLocationsPagedResponse> 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
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
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
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
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
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
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
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
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:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-