GitHub Repository | Product Reference |
Service Description: Secure Source Manager API
Access Secure Source Manager instances, resources, and repositories.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = secureSourceManagerClient.getInstance(name);
}
Note: close() needs to be called on the SecureSourceManagerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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. |
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
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
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
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. |
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. |
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
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 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
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
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
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
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. |
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 |
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 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.
Static Methods
create()
public static final SecureSourceManagerClient create()
Constructs an instance of SecureSourceManagerClient with default settings.
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(SecureSourceManagerSettings settings)
public static final SecureSourceManagerClient create(SecureSourceManagerSettings settings)
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.
Parameter | |
---|---|
Name | Description |
settings |
SecureSourceManagerSettings |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(SecureSourceManagerStub stub)
public static final SecureSourceManagerClient create(SecureSourceManagerStub stub)
Constructs an instance of SecureSourceManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecureSourceManagerSettings).
Parameter | |
---|---|
Name | Description |
stub |
SecureSourceManagerStub |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient |
Constructors
SecureSourceManagerClient(SecureSourceManagerSettings settings)
protected SecureSourceManagerClient(SecureSourceManagerSettings settings)
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.
Parameter | |
---|---|
Name | Description |
settings |
SecureSourceManagerSettings |
SecureSourceManagerClient(SecureSourceManagerStub stub)
protected SecureSourceManagerClient(SecureSourceManagerStub stub)
Parameter | |
---|---|
Name | Description |
stub |
SecureSourceManagerStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration |
long |
unit |
TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
batchCreatePullRequestCommentsAsync(BatchCreatePullRequestCommentsRequest request)
public final OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> batchCreatePullRequestCommentsAsync(BatchCreatePullRequestCommentsRequest request)
Batch creates 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()) {
BatchCreatePullRequestCommentsRequest request =
BatchCreatePullRequestCommentsRequest.newBuilder()
.setParent(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.addAllRequests(new ArrayList<CreatePullRequestCommentRequest>())
.build();
BatchCreatePullRequestCommentsResponse response =
secureSourceManagerClient.batchCreatePullRequestCommentsAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
BatchCreatePullRequestCommentsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> |
batchCreatePullRequestCommentsAsync(PullRequestName parent, List<CreatePullRequestCommentRequest> requests)
public final OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> batchCreatePullRequestCommentsAsync(PullRequestName parent, List<CreatePullRequestCommentRequest> requests)
Batch creates 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]");
List<CreatePullRequestCommentRequest> requests = new ArrayList<>();
BatchCreatePullRequestCommentsResponse response =
secureSourceManagerClient.batchCreatePullRequestCommentsAsync(parent, requests).get();
}
Parameters | |
---|---|
Name | Description |
parent |
PullRequestName Required. The pull request in which to create the pull request comments. Format:
|
requests |
List<CreatePullRequestCommentRequest> 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 |
Returns | |
---|---|
Type | Description |
OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> |
batchCreatePullRequestCommentsAsync(String parent, List<CreatePullRequestCommentRequest> requests)
public final OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> batchCreatePullRequestCommentsAsync(String parent, List<CreatePullRequestCommentRequest> requests)
Batch creates 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();
List<CreatePullRequestCommentRequest> requests = new ArrayList<>();
BatchCreatePullRequestCommentsResponse response =
secureSourceManagerClient.batchCreatePullRequestCommentsAsync(parent, requests).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The pull request in which to create the pull request comments. Format:
|
requests |
List<CreatePullRequestCommentRequest> 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 |
Returns | |
---|---|
Type | Description |
OperationFuture<BatchCreatePullRequestCommentsResponse,OperationMetadata> |
batchCreatePullRequestCommentsCallable()
public final UnaryCallable<BatchCreatePullRequestCommentsRequest,Operation> batchCreatePullRequestCommentsCallable()
Batch creates 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()) {
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<BatchCreatePullRequestCommentsRequest,Operation> |
batchCreatePullRequestCommentsOperationCallable()
public final OperationCallable<BatchCreatePullRequestCommentsRequest,BatchCreatePullRequestCommentsResponse,OperationMetadata> batchCreatePullRequestCommentsOperationCallable()
Batch creates 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()) {
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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<BatchCreatePullRequestCommentsRequest,BatchCreatePullRequestCommentsResponse,OperationMetadata> |
close()
public final void close()
closeIssueAsync(CloseIssueRequest request)
public final OperationFuture<Issue,OperationMetadata> closeIssueAsync(CloseIssueRequest request)
Closes an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CloseIssueRequest request =
CloseIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
Issue response = secureSourceManagerClient.closeIssueAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CloseIssueRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
closeIssueAsync(IssueName name)
public final OperationFuture<Issue,OperationMetadata> closeIssueAsync(IssueName name)
Closes an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
IssueName name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
Issue response = secureSourceManagerClient.closeIssueAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
IssueName Required. Name of the issue to close. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
closeIssueAsync(String name)
public final OperationFuture<Issue,OperationMetadata> closeIssueAsync(String name)
Closes an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
Issue response = secureSourceManagerClient.closeIssueAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the issue to close. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
closeIssueCallable()
public final UnaryCallable<CloseIssueRequest,Operation> closeIssueCallable()
Closes an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CloseIssueRequest request =
CloseIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.closeIssueCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CloseIssueRequest,Operation> |
closeIssueOperationCallable()
public final OperationCallable<CloseIssueRequest,Issue,OperationMetadata> closeIssueOperationCallable()
Closes an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CloseIssueRequest request =
CloseIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Issue, OperationMetadata> future =
secureSourceManagerClient.closeIssueOperationCallable().futureCall(request);
// Do something.
Issue response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CloseIssueRequest,Issue,OperationMetadata> |
closePullRequestAsync(ClosePullRequestRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
ClosePullRequestRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
closePullRequestAsync(PullRequestName name)
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();
}
Parameter | |
---|---|
Name | Description |
name |
PullRequestName Required. The pull request to close. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
closePullRequestAsync(String name)
public final OperationFuture<PullRequest,OperationMetadata> closePullRequestAsync(String name)
Closes a pull request without merging.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString();
PullRequest response = secureSourceManagerClient.closePullRequestAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The pull request to close. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
closePullRequestCallable()
public final UnaryCallable<ClosePullRequestRequest,Operation> closePullRequestCallable()
Closes a pull request without merging.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ClosePullRequestRequest request =
ClosePullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.closePullRequestCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ClosePullRequestRequest,Operation> |
closePullRequestOperationCallable()
public final OperationCallable<ClosePullRequestRequest,PullRequest,OperationMetadata> closePullRequestOperationCallable()
Closes a pull request without merging.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ClosePullRequestRequest request =
ClosePullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
OperationFuture<PullRequest, OperationMetadata> future =
secureSourceManagerClient.closePullRequestOperationCallable().futureCall(request);
// Do something.
PullRequest response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ClosePullRequestRequest,PullRequest,OperationMetadata> |
createBranchRuleAsync(CreateBranchRuleRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
CreateBranchRuleRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<BranchRule,OperationMetadata> |
createBranchRuleAsync(RepositoryName parent, BranchRule branchRule, String branchRuleId)
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 | |
---|---|
Name | Description |
parent |
RepositoryName |
branchRule |
BranchRule |
branchRuleId |
String |
Returns | |
---|---|
Type | Description |
OperationFuture<BranchRule,OperationMetadata> |
createBranchRuleAsync(String parent, BranchRule branchRule, String branchRuleId)
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 | |
---|---|
Name | Description |
parent |
String |
branchRule |
BranchRule |
branchRuleId |
String |
Returns | |
---|---|
Type | Description |
OperationFuture<BranchRule,OperationMetadata> |
createBranchRuleCallable()
public final UnaryCallable<CreateBranchRuleRequest,Operation> createBranchRuleCallable()
CreateBranchRule creates a branch rule in a given repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateBranchRuleRequest request =
CreateBranchRuleRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setBranchRule(BranchRule.newBuilder().build())
.setBranchRuleId("branchRuleId-1052663431")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.createBranchRuleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateBranchRuleRequest,Operation> |
createBranchRuleOperationCallable()
public final OperationCallable<CreateBranchRuleRequest,BranchRule,OperationMetadata> createBranchRuleOperationCallable()
CreateBranchRule creates a branch rule in a given repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateBranchRuleRequest request =
CreateBranchRuleRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setBranchRule(BranchRule.newBuilder().build())
.setBranchRuleId("branchRuleId-1052663431")
.build();
OperationFuture<BranchRule, OperationMetadata> future =
secureSourceManagerClient.createBranchRuleOperationCallable().futureCall(request);
// Do something.
BranchRule response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateBranchRuleRequest,BranchRule,OperationMetadata> |
createHookAsync(CreateHookRequest request)
public final OperationFuture<Hook,OperationMetadata> createHookAsync(CreateHookRequest request)
Creates a new hook in a given repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateHookRequest request =
CreateHookRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setHook(Hook.newBuilder().build())
.setHookId("hookId-1211612770")
.build();
Hook response = secureSourceManagerClient.createHookAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateHookRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Hook,OperationMetadata> |
createHookAsync(RepositoryName parent, Hook hook, String hookId)
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 | |
---|---|
Name | Description |
parent |
RepositoryName Required. The repository in which to create the hook. Values are of the form
|
hook |
Hook Required. The resource being created. |
hookId |
String 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<Hook,OperationMetadata> |
createHookAsync(String parent, Hook hook, String hookId)
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 | |
---|---|
Name | Description |
parent |
String Required. The repository in which to create the hook. Values are of the form
|
hook |
Hook Required. The resource being created. |
hookId |
String 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<Hook,OperationMetadata> |
createHookCallable()
public final UnaryCallable<CreateHookRequest,Operation> createHookCallable()
Creates a new hook in a given repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateHookRequest request =
CreateHookRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setHook(Hook.newBuilder().build())
.setHookId("hookId-1211612770")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.createHookCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateHookRequest,Operation> |
createHookOperationCallable()
public final OperationCallable<CreateHookRequest,Hook,OperationMetadata> createHookOperationCallable()
Creates a new hook in a given repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateHookRequest request =
CreateHookRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setHook(Hook.newBuilder().build())
.setHookId("hookId-1211612770")
.build();
OperationFuture<Hook, OperationMetadata> future =
secureSourceManagerClient.createHookOperationCallable().futureCall(request);
// Do something.
Hook response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateHookRequest,Hook,OperationMetadata> |
createInstanceAsync(CreateInstanceRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
CreateInstanceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Instance,OperationMetadata> |
createInstanceAsync(LocationName parent, Instance instance, String instanceId)
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 | |
---|---|
Name | Description |
parent |
LocationName Required. Value for parent. |
instance |
Instance Required. The resource being created. |
instanceId |
String Required. ID of the instance to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<Instance,OperationMetadata> |
createInstanceAsync(String parent, Instance instance, String instanceId)
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 | |
---|---|
Name | Description |
parent |
String Required. Value for parent. |
instance |
Instance Required. The resource being created. |
instanceId |
String Required. ID of the instance to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<Instance,OperationMetadata> |
createInstanceCallable()
public final UnaryCallable<CreateInstanceRequest,Operation> createInstanceCallable()
Creates a new instance in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.createInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateInstanceRequest,Operation> |
createInstanceOperationCallable()
public final OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> createInstanceOperationCallable()
Creates a new instance in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Instance, OperationMetadata> future =
secureSourceManagerClient.createInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> |
createIssueAsync(CreateIssueRequest request)
public final OperationFuture<Issue,OperationMetadata> createIssueAsync(CreateIssueRequest request)
Creates an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateIssueRequest request =
CreateIssueRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setIssue(Issue.newBuilder().build())
.build();
Issue response = secureSourceManagerClient.createIssueAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateIssueRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
createIssueAsync(RepositoryName parent, Issue issue)
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 | |
---|---|
Name | Description |
parent |
RepositoryName Required. The repository in which to create the issue. Format:
|
issue |
Issue Required. The issue to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
createIssueAsync(String parent, Issue issue)
public final OperationFuture<Issue,OperationMetadata> createIssueAsync(String parent, Issue issue)
Creates an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
Issue issue = Issue.newBuilder().build();
Issue response = secureSourceManagerClient.createIssueAsync(parent, issue).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The repository in which to create the issue. Format:
|
issue |
Issue Required. The issue to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
createIssueCallable()
public final UnaryCallable<CreateIssueRequest,Operation> createIssueCallable()
Creates an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateIssueRequest request =
CreateIssueRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setIssue(Issue.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.createIssueCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateIssueRequest,Operation> |
createIssueCommentAsync(CreateIssueCommentRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
CreateIssueCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<IssueComment,OperationMetadata> |
createIssueCommentAsync(IssueName parent, IssueComment issueComment)
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 | |
---|---|
Name | Description |
parent |
IssueName Required. The issue in which to create the issue comment. Format:
|
issueComment |
IssueComment Required. The issue comment to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<IssueComment,OperationMetadata> |
createIssueCommentAsync(String parent, IssueComment issueComment)
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 | |
---|---|
Name | Description |
parent |
String Required. The issue in which to create the issue comment. Format:
|
issueComment |
IssueComment Required. The issue comment to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<IssueComment,OperationMetadata> |
createIssueCommentCallable()
public final UnaryCallable<CreateIssueCommentRequest,Operation> createIssueCommentCallable()
Creates an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateIssueCommentRequest request =
CreateIssueCommentRequest.newBuilder()
.setParent(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setIssueComment(IssueComment.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.createIssueCommentCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateIssueCommentRequest,Operation> |
createIssueCommentOperationCallable()
public final OperationCallable<CreateIssueCommentRequest,IssueComment,OperationMetadata> createIssueCommentOperationCallable()
Creates an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateIssueCommentRequest request =
CreateIssueCommentRequest.newBuilder()
.setParent(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setIssueComment(IssueComment.newBuilder().build())
.build();
OperationFuture<IssueComment, OperationMetadata> future =
secureSourceManagerClient.createIssueCommentOperationCallable().futureCall(request);
// Do something.
IssueComment response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateIssueCommentRequest,IssueComment,OperationMetadata> |
createIssueOperationCallable()
public final OperationCallable<CreateIssueRequest,Issue,OperationMetadata> createIssueOperationCallable()
Creates an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateIssueRequest request =
CreateIssueRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setIssue(Issue.newBuilder().build())
.build();
OperationFuture<Issue, OperationMetadata> future =
secureSourceManagerClient.createIssueOperationCallable().futureCall(request);
// Do something.
Issue response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateIssueRequest,Issue,OperationMetadata> |
createPullRequestAsync(CreatePullRequestRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
CreatePullRequestRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
createPullRequestAsync(RepositoryName parent, PullRequest pullRequest)
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 | |
---|---|
Name | Description |
parent |
RepositoryName Required. The repository that the pull request is created from. Format:
|
pullRequest |
PullRequest Required. The pull request to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
createPullRequestAsync(String parent, PullRequest pullRequest)
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 | |
---|---|
Name | Description |
parent |
String Required. The repository that the pull request is created from. Format:
|
pullRequest |
PullRequest Required. The pull request to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
createPullRequestCallable()
public final UnaryCallable<CreatePullRequestRequest,Operation> createPullRequestCallable()
Creates a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreatePullRequestRequest request =
CreatePullRequestRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setPullRequest(PullRequest.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.createPullRequestCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreatePullRequestRequest,Operation> |
createPullRequestCommentAsync(CreatePullRequestCommentRequest request)
public final OperationFuture<PullRequestComment,OperationMetadata> createPullRequestCommentAsync(CreatePullRequestCommentRequest request)
Creates 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()) {
CreatePullRequestCommentRequest request =
CreatePullRequestCommentRequest.newBuilder()
.setParent(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.setPullRequestComment(PullRequestComment.newBuilder().build())
.build();
PullRequestComment response =
secureSourceManagerClient.createPullRequestCommentAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreatePullRequestCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequestComment,OperationMetadata> |
createPullRequestCommentAsync(PullRequestName parent, PullRequestComment pullRequestComment)
public final OperationFuture<PullRequestComment,OperationMetadata> createPullRequestCommentAsync(PullRequestName parent, PullRequestComment pullRequestComment)
Creates 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()) {
PullRequestName parent =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
PullRequestComment pullRequestComment = PullRequestComment.newBuilder().build();
PullRequestComment response =
secureSourceManagerClient.createPullRequestCommentAsync(parent, pullRequestComment).get();
}
Parameters | |
---|---|
Name | Description |
parent |
PullRequestName Required. The pull request in which to create the pull request comment. Format:
|
pullRequestComment |
PullRequestComment Required. The pull request comment to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequestComment,OperationMetadata> |
createPullRequestCommentAsync(String parent, PullRequestComment pullRequestComment)
public final OperationFuture<PullRequestComment,OperationMetadata> createPullRequestCommentAsync(String parent, PullRequestComment pullRequestComment)
Creates 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 parent =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString();
PullRequestComment pullRequestComment = PullRequestComment.newBuilder().build();
PullRequestComment response =
secureSourceManagerClient.createPullRequestCommentAsync(parent, pullRequestComment).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The pull request in which to create the pull request comment. Format:
|
pullRequestComment |
PullRequestComment Required. The pull request comment to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequestComment,OperationMetadata> |
createPullRequestCommentCallable()
public final UnaryCallable<CreatePullRequestCommentRequest,Operation> createPullRequestCommentCallable()
Creates 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()) {
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreatePullRequestCommentRequest,Operation> |
createPullRequestCommentOperationCallable()
public final OperationCallable<CreatePullRequestCommentRequest,PullRequestComment,OperationMetadata> createPullRequestCommentOperationCallable()
Creates 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()) {
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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreatePullRequestCommentRequest,PullRequestComment,OperationMetadata> |
createPullRequestOperationCallable()
public final OperationCallable<CreatePullRequestRequest,PullRequest,OperationMetadata> createPullRequestOperationCallable()
Creates a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreatePullRequestRequest request =
CreatePullRequestRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setPullRequest(PullRequest.newBuilder().build())
.build();
OperationFuture<PullRequest, OperationMetadata> future =
secureSourceManagerClient.createPullRequestOperationCallable().futureCall(request);
// Do something.
PullRequest response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreatePullRequestRequest,PullRequest,OperationMetadata> |
createRepositoryAsync(CreateRepositoryRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
CreateRepositoryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Repository,OperationMetadata> |
createRepositoryAsync(LocationName parent, Repository repository, String repositoryId)
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 | |
---|---|
Name | Description |
parent |
LocationName Required. The project in which to create the repository. Values are of the form
|
repository |
Repository Required. The resource being created. |
repositoryId |
String 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-/. |
Returns | |
---|---|
Type | Description |
OperationFuture<Repository,OperationMetadata> |
createRepositoryAsync(String parent, Repository repository, String repositoryId)
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 | |
---|---|
Name | Description |
parent |
String Required. The project in which to create the repository. Values are of the form
|
repository |
Repository Required. The resource being created. |
repositoryId |
String 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-/. |
Returns | |
---|---|
Type | Description |
OperationFuture<Repository,OperationMetadata> |
createRepositoryCallable()
public final UnaryCallable<CreateRepositoryRequest,Operation> createRepositoryCallable()
Creates a new repository in a given project and location.
The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateRepositoryRequest request =
CreateRepositoryRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setRepository(Repository.newBuilder().build())
.setRepositoryId("repositoryId2113747461")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.createRepositoryCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateRepositoryRequest,Operation> |
createRepositoryOperationCallable()
public final OperationCallable<CreateRepositoryRequest,Repository,OperationMetadata> createRepositoryOperationCallable()
Creates a new repository in a given project and location.
The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
CreateRepositoryRequest request =
CreateRepositoryRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setRepository(Repository.newBuilder().build())
.setRepositoryId("repositoryId2113747461")
.build();
OperationFuture<Repository, OperationMetadata> future =
secureSourceManagerClient.createRepositoryOperationCallable().futureCall(request);
// Do something.
Repository response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateRepositoryRequest,Repository,OperationMetadata> |
deleteBranchRuleAsync(BranchRuleName name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
BranchRuleName |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBranchRuleAsync(DeleteBranchRuleRequest request)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteBranchRuleRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBranchRuleAsync(String name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
String |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBranchRuleCallable()
public final UnaryCallable<DeleteBranchRuleRequest,Operation> deleteBranchRuleCallable()
DeleteBranchRule deletes a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteBranchRuleRequest request =
DeleteBranchRuleRequest.newBuilder()
.setName(
BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
.toString())
.setAllowMissing(true)
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.deleteBranchRuleCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteBranchRuleRequest,Operation> |
deleteBranchRuleOperationCallable()
public final OperationCallable<DeleteBranchRuleRequest,Empty,OperationMetadata> deleteBranchRuleOperationCallable()
DeleteBranchRule deletes a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteBranchRuleRequest request =
DeleteBranchRuleRequest.newBuilder()
.setName(
BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
.toString())
.setAllowMissing(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
secureSourceManagerClient.deleteBranchRuleOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteBranchRuleRequest,Empty,OperationMetadata> |
deleteHookAsync(DeleteHookRequest request)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteHookRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteHookAsync(HookName name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
HookName Required. Name of the hook to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteHookAsync(String name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the hook to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteHookCallable()
public final UnaryCallable<DeleteHookRequest,Operation> deleteHookCallable()
Deletes a Hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteHookRequest request =
DeleteHookRequest.newBuilder()
.setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.deleteHookCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteHookRequest,Operation> |
deleteHookOperationCallable()
public final OperationCallable<DeleteHookRequest,Empty,OperationMetadata> deleteHookOperationCallable()
Deletes a Hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteHookRequest request =
DeleteHookRequest.newBuilder()
.setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
secureSourceManagerClient.deleteHookOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteHookRequest,Empty,OperationMetadata> |
deleteInstanceAsync(DeleteInstanceRequest request)
public final OperationFuture<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")
.build();
secureSourceManagerClient.deleteInstanceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteInstanceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInstanceAsync(InstanceName name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
InstanceName Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInstanceAsync(String name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteInstanceCallable()
public final UnaryCallable<DeleteInstanceRequest,Operation> deleteInstanceCallable()
Deletes a single instance.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.deleteInstanceCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteInstanceRequest,Operation> |
deleteInstanceOperationCallable()
public final OperationCallable<DeleteInstanceRequest,Empty,OperationMetadata> deleteInstanceOperationCallable()
Deletes a single instance.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
secureSourceManagerClient.deleteInstanceOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteInstanceRequest,Empty,OperationMetadata> |
deleteIssueAsync(DeleteIssueRequest request)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteIssueRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteIssueAsync(IssueName name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
IssueName Required. Name of the issue to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteIssueAsync(String name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the issue to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteIssueCallable()
public final UnaryCallable<DeleteIssueRequest,Operation> deleteIssueCallable()
Deletes an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteIssueRequest request =
DeleteIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.deleteIssueCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteIssueRequest,Operation> |
deleteIssueCommentAsync(DeleteIssueCommentRequest request)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteIssueCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteIssueCommentAsync(IssueCommentName name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
IssueCommentName Required. Name of the issue comment to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteIssueCommentAsync(String name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the issue comment to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteIssueCommentCallable()
public final UnaryCallable<DeleteIssueCommentRequest,Operation> deleteIssueCommentCallable()
Deletes an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteIssueCommentRequest request =
DeleteIssueCommentRequest.newBuilder()
.setName(
IssueCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
.toString())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.deleteIssueCommentCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteIssueCommentRequest,Operation> |
deleteIssueCommentOperationCallable()
public final OperationCallable<DeleteIssueCommentRequest,Empty,OperationMetadata> deleteIssueCommentOperationCallable()
Deletes an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteIssueCommentRequest request =
DeleteIssueCommentRequest.newBuilder()
.setName(
IssueCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
secureSourceManagerClient.deleteIssueCommentOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteIssueCommentRequest,Empty,OperationMetadata> |
deleteIssueOperationCallable()
public final OperationCallable<DeleteIssueRequest,Empty,OperationMetadata> deleteIssueOperationCallable()
Deletes an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteIssueRequest request =
DeleteIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
secureSourceManagerClient.deleteIssueOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteIssueRequest,Empty,OperationMetadata> |
deletePullRequestCommentAsync(DeletePullRequestCommentRequest request)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
request |
DeletePullRequestCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deletePullRequestCommentAsync(PullRequestCommentName name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
PullRequestCommentName Required. Name of the pull request comment to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deletePullRequestCommentAsync(String name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the pull request comment to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeletePullRequestCommentRequest,Operation> |
deletePullRequestCommentOperationCallable()
public final OperationCallable<DeletePullRequestCommentRequest,Empty,OperationMetadata> deletePullRequestCommentOperationCallable()
Deletes a pull request comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeletePullRequestCommentRequest request =
DeletePullRequestCommentRequest.newBuilder()
.setName(
PullRequestCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
secureSourceManagerClient.deletePullRequestCommentOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeletePullRequestCommentRequest,Empty,OperationMetadata> |
deleteRepositoryAsync(DeleteRepositoryRequest request)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteRepositoryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRepositoryAsync(RepositoryName name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
RepositoryName Required. Name of the repository to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRepositoryAsync(String name)
public final OperationFuture<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();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the repository to delete. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRepositoryCallable()
public final UnaryCallable<DeleteRepositoryRequest,Operation> deleteRepositoryCallable()
Deletes a Repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteRepositoryRequest request =
DeleteRepositoryRequest.newBuilder()
.setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setAllowMissing(true)
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.deleteRepositoryCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteRepositoryRequest,Operation> |
deleteRepositoryOperationCallable()
public final OperationCallable<DeleteRepositoryRequest,Empty,OperationMetadata> deleteRepositoryOperationCallable()
Deletes a Repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
DeleteRepositoryRequest request =
DeleteRepositoryRequest.newBuilder()
.setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setAllowMissing(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
secureSourceManagerClient.deleteRepositoryOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteRepositoryRequest,Empty,OperationMetadata> |
fetchBlob(FetchBlobRequest request)
public final FetchBlobResponse fetchBlob(FetchBlobRequest request)
Fetches a blob from a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
FetchBlobRequest request =
FetchBlobRequest.newBuilder()
.setRepository(
RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setSha("sha113836")
.build();
FetchBlobResponse response = secureSourceManagerClient.fetchBlob(request);
}
Parameter | |
---|---|
Name | Description |
request |
FetchBlobRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
FetchBlobResponse |
fetchBlobCallable()
public final UnaryCallable<FetchBlobRequest,FetchBlobResponse> fetchBlobCallable()
Fetches a blob from a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
FetchBlobRequest request =
FetchBlobRequest.newBuilder()
.setRepository(
RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setSha("sha113836")
.build();
ApiFuture<FetchBlobResponse> future =
secureSourceManagerClient.fetchBlobCallable().futureCall(request);
// Do something.
FetchBlobResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<FetchBlobRequest,FetchBlobResponse> |
fetchTree(FetchTreeRequest request)
public final SecureSourceManagerClient.FetchTreePagedResponse fetchTree(FetchTreeRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
FetchTreeRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.FetchTreePagedResponse |
fetchTreeCallable()
public final UnaryCallable<FetchTreeRequest,FetchTreeResponse> fetchTreeCallable()
Fetches a tree from a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
FetchTreeRequest request =
FetchTreeRequest.newBuilder()
.setRepository(
RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setRef("ref112787")
.setRecursive(true)
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
FetchTreeResponse response = secureSourceManagerClient.fetchTreeCallable().call(request);
for (TreeEntry element : response.getTreeEntriesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<FetchTreeRequest,FetchTreeResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<FetchTreeRequest,FetchTreePagedResponse> |
getBranchRule(BranchRuleName name)
public final BranchRule getBranchRule(BranchRuleName name)
GetBranchRule gets a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
BranchRuleName name =
BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]");
BranchRule response = secureSourceManagerClient.getBranchRule(name);
}
Parameter | |
---|---|
Name | Description |
name |
BranchRuleName Required. Name of the repository to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
BranchRule |
getBranchRule(GetBranchRuleRequest request)
public final BranchRule getBranchRule(GetBranchRuleRequest request)
GetBranchRule gets a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetBranchRuleRequest request =
GetBranchRuleRequest.newBuilder()
.setName(
BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
.toString())
.build();
BranchRule response = secureSourceManagerClient.getBranchRule(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetBranchRuleRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BranchRule |
getBranchRule(String name)
public final BranchRule getBranchRule(String name)
GetBranchRule gets a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name =
BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]").toString();
BranchRule response = secureSourceManagerClient.getBranchRule(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the repository to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
BranchRule |
getBranchRuleCallable()
public final UnaryCallable<GetBranchRuleRequest,BranchRule> getBranchRuleCallable()
GetBranchRule gets a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetBranchRuleRequest request =
GetBranchRuleRequest.newBuilder()
.setName(
BranchRuleName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[BRANCH_RULE]")
.toString())
.build();
ApiFuture<BranchRule> future =
secureSourceManagerClient.getBranchRuleCallable().futureCall(request);
// Do something.
BranchRule response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetBranchRuleRequest,BranchRule> |
getHook(GetHookRequest request)
public final Hook getHook(GetHookRequest request)
Gets metadata of a hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetHookRequest request =
GetHookRequest.newBuilder()
.setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
.build();
Hook response = secureSourceManagerClient.getHook(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetHookRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Hook |
getHook(HookName name)
public final Hook getHook(HookName name)
Gets metadata of a hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
HookName name = HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]");
Hook response = secureSourceManagerClient.getHook(name);
}
Parameter | |
---|---|
Name | Description |
name |
HookName Required. Name of the hook to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
Hook |
getHook(String name)
public final Hook getHook(String name)
Gets metadata of a hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name = HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString();
Hook response = secureSourceManagerClient.getHook(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the hook to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
Hook |
getHookCallable()
public final UnaryCallable<GetHookRequest,Hook> getHookCallable()
Gets metadata of a hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetHookRequest request =
GetHookRequest.newBuilder()
.setName(HookName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[HOOK]").toString())
.build();
ApiFuture<Hook> future = secureSourceManagerClient.getHookCallable().futureCall(request);
// Do something.
Hook response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetHookRequest,Hook> |
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = secureSourceManagerClient.getIamPolicy(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future =
secureSourceManagerClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getIamPolicyRepo(ResourceName resource)
public final Policy getIamPolicyRepo(ResourceName resource)
Get IAM policy for a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
Policy response = secureSourceManagerClient.getIamPolicyRepo(resource);
}
Parameter | |
---|---|
Name | Description |
resource |
com.google.api.resourcenames.ResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicyRepo(GetIamPolicyRequest request)
public final Policy getIamPolicyRepo(GetIamPolicyRequest request)
Get IAM policy for a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = secureSourceManagerClient.getIamPolicyRepo(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicyRepo(String resource)
public final Policy getIamPolicyRepo(String resource)
Get IAM policy for a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Policy response = secureSourceManagerClient.getIamPolicyRepo(resource);
}
Parameter | |
---|---|
Name | Description |
resource |
String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicyRepoCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyRepoCallable()
Get IAM policy for a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future =
secureSourceManagerClient.getIamPolicyRepoCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getInstance(GetInstanceRequest request)
public final Instance getInstance(GetInstanceRequest request)
Gets details of a single instance.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
Instance response = secureSourceManagerClient.getInstance(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetInstanceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Instance |
getInstance(InstanceName name)
public final Instance getInstance(InstanceName name)
Gets details of a single instance.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = secureSourceManagerClient.getInstance(name);
}
Parameter | |
---|---|
Name | Description |
name |
InstanceName Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
Instance |
getInstance(String name)
public final Instance getInstance(String name)
Gets details of a single instance.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
Instance response = secureSourceManagerClient.getInstance(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
Instance |
getInstanceCallable()
public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()
Gets details of a single instance.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
ApiFuture<Instance> future =
secureSourceManagerClient.getInstanceCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetInstanceRequest,Instance> |
getIssue(GetIssueRequest request)
public final Issue getIssue(GetIssueRequest request)
Gets an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIssueRequest request =
GetIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.build();
Issue response = secureSourceManagerClient.getIssue(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetIssueRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Issue |
getIssue(IssueName name)
public final Issue getIssue(IssueName name)
Gets an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
IssueName name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
Issue response = secureSourceManagerClient.getIssue(name);
}
Parameter | |
---|---|
Name | Description |
name |
IssueName Required. Name of the issue to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
Issue |
getIssue(String name)
public final Issue getIssue(String name)
Gets an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
Issue response = secureSourceManagerClient.getIssue(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the issue to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
Issue |
getIssueCallable()
public final UnaryCallable<GetIssueRequest,Issue> getIssueCallable()
Gets an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIssueRequest request =
GetIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.build();
ApiFuture<Issue> future = secureSourceManagerClient.getIssueCallable().futureCall(request);
// Do something.
Issue response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetIssueRequest,Issue> |
getIssueComment(GetIssueCommentRequest request)
public final IssueComment getIssueComment(GetIssueCommentRequest request)
Gets an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIssueCommentRequest request =
GetIssueCommentRequest.newBuilder()
.setName(
IssueCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
.toString())
.build();
IssueComment response = secureSourceManagerClient.getIssueComment(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetIssueCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
IssueComment |
getIssueComment(IssueCommentName name)
public final IssueComment getIssueComment(IssueCommentName name)
Gets an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
IssueCommentName name =
IssueCommentName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]");
IssueComment response = secureSourceManagerClient.getIssueComment(name);
}
Parameter | |
---|---|
Name | Description |
name |
IssueCommentName Required. Name of the issue comment to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
IssueComment |
getIssueComment(String name)
public final IssueComment getIssueComment(String name)
Gets an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name =
IssueCommentName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
.toString();
IssueComment response = secureSourceManagerClient.getIssueComment(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the issue comment to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
IssueComment |
getIssueCommentCallable()
public final UnaryCallable<GetIssueCommentRequest,IssueComment> getIssueCommentCallable()
Gets an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetIssueCommentRequest request =
GetIssueCommentRequest.newBuilder()
.setName(
IssueCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]", "[COMMENT]")
.toString())
.build();
ApiFuture<IssueComment> future =
secureSourceManagerClient.getIssueCommentCallable().futureCall(request);
// Do something.
IssueComment response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetIssueCommentRequest,IssueComment> |
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)
Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = secureSourceManagerClient.getLocation(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.GetLocationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.cloud.location.Location |
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
secureSourceManagerClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getPullRequest(GetPullRequestRequest request)
public final PullRequest getPullRequest(GetPullRequestRequest request)
Gets a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetPullRequestRequest request =
GetPullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
PullRequest response = secureSourceManagerClient.getPullRequest(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetPullRequestRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
PullRequest |
getPullRequest(PullRequestName name)
public final PullRequest getPullRequest(PullRequestName name)
Gets a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
PullRequestName name =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
PullRequest response = secureSourceManagerClient.getPullRequest(name);
}
Parameter | |
---|---|
Name | Description |
name |
PullRequestName Required. Name of the pull request to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
PullRequest |
getPullRequest(String name)
public final PullRequest getPullRequest(String name)
Gets a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString();
PullRequest response = secureSourceManagerClient.getPullRequest(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the pull request to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
PullRequest |
getPullRequestCallable()
public final UnaryCallable<GetPullRequestRequest,PullRequest> getPullRequestCallable()
Gets a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetPullRequestRequest request =
GetPullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
ApiFuture<PullRequest> future =
secureSourceManagerClient.getPullRequestCallable().futureCall(request);
// Do something.
PullRequest response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetPullRequestRequest,PullRequest> |
getPullRequestComment(GetPullRequestCommentRequest request)
public final PullRequestComment getPullRequestComment(GetPullRequestCommentRequest request)
Gets a pull request comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetPullRequestCommentRequest request =
GetPullRequestCommentRequest.newBuilder()
.setName(
PullRequestCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
.toString())
.build();
PullRequestComment response = secureSourceManagerClient.getPullRequestComment(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetPullRequestCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
PullRequestComment |
getPullRequestComment(PullRequestCommentName name)
public final PullRequestComment getPullRequestComment(PullRequestCommentName name)
Gets a pull request comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
PullRequestCommentName name =
PullRequestCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]");
PullRequestComment response = secureSourceManagerClient.getPullRequestComment(name);
}
Parameter | |
---|---|
Name | Description |
name |
PullRequestCommentName Required. Name of the pull request comment to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
PullRequestComment |
getPullRequestComment(String name)
public final PullRequestComment getPullRequestComment(String name)
Gets a pull request comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name =
PullRequestCommentName.of(
"[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]", "[COMMENT]")
.toString();
PullRequestComment response = secureSourceManagerClient.getPullRequestComment(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the pull request comment to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
PullRequestComment |
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetPullRequestCommentRequest,PullRequestComment> |
getRepository(GetRepositoryRequest request)
public final Repository getRepository(GetRepositoryRequest request)
Gets metadata of a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetRepositoryRequest request =
GetRepositoryRequest.newBuilder()
.setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.build();
Repository response = secureSourceManagerClient.getRepository(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetRepositoryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Repository |
getRepository(RepositoryName name)
public final Repository getRepository(RepositoryName name)
Gets metadata of a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
Repository response = secureSourceManagerClient.getRepository(name);
}
Parameter | |
---|---|
Name | Description |
name |
RepositoryName Required. Name of the repository to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
Repository |
getRepository(String name)
public final Repository getRepository(String name)
Gets metadata of a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
Repository response = secureSourceManagerClient.getRepository(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the repository to retrieve. The format is
|
Returns | |
---|---|
Type | Description |
Repository |
getRepositoryCallable()
public final UnaryCallable<GetRepositoryRequest,Repository> getRepositoryCallable()
Gets metadata of a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
GetRepositoryRequest request =
GetRepositoryRequest.newBuilder()
.setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.build();
ApiFuture<Repository> future =
secureSourceManagerClient.getRepositoryCallable().futureCall(request);
// Do something.
Repository response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetRepositoryRequest,Repository> |
getSettings()
public final SecureSourceManagerSettings getSettings()
Returns | |
---|---|
Type | Description |
SecureSourceManagerSettings |
getStub()
public SecureSourceManagerStub getStub()
Returns | |
---|---|
Type | Description |
SecureSourceManagerStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listBranchRules(ListBranchRulesRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListBranchRulesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListBranchRulesPagedResponse |
listBranchRules(RepositoryName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
RepositoryName |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListBranchRulesPagedResponse |
listBranchRules(String parent)
public final SecureSourceManagerClient.ListBranchRulesPagedResponse listBranchRules(String parent)
ListBranchRules lists branch rules in a given repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
for (BranchRule element : secureSourceManagerClient.listBranchRules(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListBranchRulesPagedResponse |
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListBranchRulesRequest,ListBranchRulesResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListBranchRulesRequest,ListBranchRulesPagedResponse> |
listHooks(ListHooksRequest request)
public final SecureSourceManagerClient.ListHooksPagedResponse listHooks(ListHooksRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListHooksRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListHooksPagedResponse |
listHooks(RepositoryName parent)
public final SecureSourceManagerClient.ListHooksPagedResponse listHooks(RepositoryName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
RepositoryName Required. Parent value for ListHooksRequest. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListHooksPagedResponse |
listHooks(String parent)
public final SecureSourceManagerClient.ListHooksPagedResponse listHooks(String parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. Parent value for ListHooksRequest. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListHooksPagedResponse |
listHooksCallable()
public final UnaryCallable<ListHooksRequest,ListHooksResponse> listHooksCallable()
Lists hooks in a given repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ListHooksRequest request =
ListHooksRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListHooksResponse response = secureSourceManagerClient.listHooksCallable().call(request);
for (Hook element : response.getHooksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListHooksRequest,ListHooksResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListHooksRequest,ListHooksPagedResponse> |
listInstances(ListInstancesRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListInstancesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListInstancesPagedResponse |
listInstances(LocationName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. Parent value for ListInstancesRequest. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListInstancesPagedResponse |
listInstances(String parent)
public final SecureSourceManagerClient.ListInstancesPagedResponse listInstances(String parent)
Lists Instances in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Instance element : secureSourceManagerClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. Parent value for ListInstancesRequest. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListInstancesPagedResponse |
listInstancesCallable()
public final UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()
Lists Instances in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListInstancesResponse response =
secureSourceManagerClient.listInstancesCallable().call(request);
for (Instance element : response.getInstancesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesPagedResponse> |
listIssueComments(IssueName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
IssueName Required. The issue in which to list the comments. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListIssueCommentsPagedResponse |
listIssueComments(ListIssueCommentsRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListIssueCommentsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListIssueCommentsPagedResponse |
listIssueComments(String parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The issue in which to list the comments. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListIssueCommentsPagedResponse |
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListIssueCommentsRequest,ListIssueCommentsResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListIssueCommentsRequest,ListIssueCommentsPagedResponse> |
listIssues(ListIssuesRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListIssuesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListIssuesPagedResponse |
listIssues(RepositoryName parent)
public final SecureSourceManagerClient.ListIssuesPagedResponse listIssues(RepositoryName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
RepositoryName Required. The repository in which to list issues. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListIssuesPagedResponse |
listIssues(String parent)
public final SecureSourceManagerClient.ListIssuesPagedResponse listIssues(String parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The repository in which to list issues. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListIssuesPagedResponse |
listIssuesCallable()
public final UnaryCallable<ListIssuesRequest,ListIssuesResponse> listIssuesCallable()
Lists issues in a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ListIssuesRequest request =
ListIssuesRequest.newBuilder()
.setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
ListIssuesResponse response = secureSourceManagerClient.listIssuesCallable().call(request);
for (Issue element : response.getIssuesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListIssuesRequest,ListIssuesResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListIssuesRequest,ListIssuesPagedResponse> |
listLocations(ListLocationsRequest request)
public final SecureSourceManagerClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)
Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.ListLocationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListLocationsPagedResponse |
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsPagedCallable()
public final UnaryCallable<ListLocationsRequest,SecureSourceManagerClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
listPullRequestComments(ListPullRequestCommentsRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListPullRequestCommentsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestCommentsPagedResponse |
listPullRequestComments(PullRequestName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
PullRequestName Required. The pull request in which to list pull request comments. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestCommentsPagedResponse |
listPullRequestComments(String parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The pull request in which to list pull request comments. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestCommentsPagedResponse |
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPullRequestCommentsRequest,ListPullRequestCommentsResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPullRequestCommentsRequest,ListPullRequestCommentsPagedResponse> |
listPullRequestFileDiffs(ListPullRequestFileDiffsRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListPullRequestFileDiffsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse |
listPullRequestFileDiffs(PullRequestName name)
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);
}
}
Parameter | |
---|---|
Name | Description |
name |
PullRequestName Required. The pull request to list file diffs for. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse |
listPullRequestFileDiffs(String name)
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);
}
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The pull request to list file diffs for. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestFileDiffsPagedResponse |
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPullRequestFileDiffsRequest,ListPullRequestFileDiffsResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPullRequestFileDiffsRequest,ListPullRequestFileDiffsPagedResponse> |
listPullRequests(ListPullRequestsRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListPullRequestsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestsPagedResponse |
listPullRequests(RepositoryName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
RepositoryName Required. The repository in which to list pull requests. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestsPagedResponse |
listPullRequests(String parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The repository in which to list pull requests. Format:
|
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListPullRequestsPagedResponse |
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPullRequestsRequest,ListPullRequestsResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPullRequestsRequest,ListPullRequestsPagedResponse> |
listRepositories(ListRepositoriesRequest request)
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);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListRepositoriesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListRepositoriesPagedResponse |
listRepositories(LocationName parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
LocationName Required. Parent value for ListRepositoriesRequest. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListRepositoriesPagedResponse |
listRepositories(String parent)
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);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. Parent value for ListRepositoriesRequest. |
Returns | |
---|---|
Type | Description |
SecureSourceManagerClient.ListRepositoriesPagedResponse |
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListRepositoriesRequest,ListRepositoriesResponse> |
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListRepositoriesRequest,ListRepositoriesPagedResponse> |
mergePullRequestAsync(MergePullRequestRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
MergePullRequestRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
mergePullRequestAsync(PullRequestName name)
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();
}
Parameter | |
---|---|
Name | Description |
name |
PullRequestName Required. The pull request to merge. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
mergePullRequestAsync(String name)
public final OperationFuture<PullRequest,OperationMetadata> mergePullRequestAsync(String name)
Merges a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString();
PullRequest response = secureSourceManagerClient.mergePullRequestAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The pull request to merge. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
mergePullRequestCallable()
public final UnaryCallable<MergePullRequestRequest,Operation> mergePullRequestCallable()
Merges a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
MergePullRequestRequest request =
MergePullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.mergePullRequestCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<MergePullRequestRequest,Operation> |
mergePullRequestOperationCallable()
public final OperationCallable<MergePullRequestRequest,PullRequest,OperationMetadata> mergePullRequestOperationCallable()
Merges a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
MergePullRequestRequest request =
MergePullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
OperationFuture<PullRequest, OperationMetadata> future =
secureSourceManagerClient.mergePullRequestOperationCallable().futureCall(request);
// Do something.
PullRequest response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<MergePullRequestRequest,PullRequest,OperationMetadata> |
openIssueAsync(IssueName name)
public final OperationFuture<Issue,OperationMetadata> openIssueAsync(IssueName name)
Opens an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
IssueName name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]");
Issue response = secureSourceManagerClient.openIssueAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
IssueName Required. Name of the issue to open. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
openIssueAsync(OpenIssueRequest request)
public final OperationFuture<Issue,OperationMetadata> openIssueAsync(OpenIssueRequest request)
Opens an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
OpenIssueRequest request =
OpenIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
Issue response = secureSourceManagerClient.openIssueAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
OpenIssueRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
openIssueAsync(String name)
public final OperationFuture<Issue,OperationMetadata> openIssueAsync(String name)
Opens an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name = IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString();
Issue response = secureSourceManagerClient.openIssueAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the issue to open. The format is
|
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
openIssueCallable()
public final UnaryCallable<OpenIssueRequest,Operation> openIssueCallable()
Opens an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
OpenIssueRequest request =
OpenIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.openIssueCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<OpenIssueRequest,Operation> |
openIssueOperationCallable()
public final OperationCallable<OpenIssueRequest,Issue,OperationMetadata> openIssueOperationCallable()
Opens an issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
OpenIssueRequest request =
OpenIssueRequest.newBuilder()
.setName(
IssueName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[ISSUE]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Issue, OperationMetadata> future =
secureSourceManagerClient.openIssueOperationCallable().futureCall(request);
// Do something.
Issue response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<OpenIssueRequest,Issue,OperationMetadata> |
openPullRequestAsync(OpenPullRequestRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
OpenPullRequestRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
openPullRequestAsync(PullRequestName name)
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();
}
Parameter | |
---|---|
Name | Description |
name |
PullRequestName Required. The pull request to open. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
openPullRequestAsync(String name)
public final OperationFuture<PullRequest,OperationMetadata> openPullRequestAsync(String name)
Opens a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String name =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString();
PullRequest response = secureSourceManagerClient.openPullRequestAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The pull request to open. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
openPullRequestCallable()
public final UnaryCallable<OpenPullRequestRequest,Operation> openPullRequestCallable()
Opens a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
OpenPullRequestRequest request =
OpenPullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.openPullRequestCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<OpenPullRequestRequest,Operation> |
openPullRequestOperationCallable()
public final OperationCallable<OpenPullRequestRequest,PullRequest,OperationMetadata> openPullRequestOperationCallable()
Opens a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
OpenPullRequestRequest request =
OpenPullRequestRequest.newBuilder()
.setName(
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString())
.build();
OperationFuture<PullRequest, OperationMetadata> future =
secureSourceManagerClient.openPullRequestOperationCallable().futureCall(request);
// Do something.
PullRequest response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<OpenPullRequestRequest,PullRequest,OperationMetadata> |
resolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)
public final OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> resolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)
Resolves 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]");
List<String> names = new ArrayList<>();
ResolvePullRequestCommentsResponse response =
secureSourceManagerClient.resolvePullRequestCommentsAsync(parent, names).get();
}
Parameters | |
---|---|
Name | Description |
parent |
PullRequestName Required. The pull request in which to resolve the pull request comments. Format:
|
names |
List<String> Required. The names of the pull request comments to resolve. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> |
resolvePullRequestCommentsAsync(ResolvePullRequestCommentsRequest request)
public final OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> resolvePullRequestCommentsAsync(ResolvePullRequestCommentsRequest request)
Resolves 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()) {
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();
}
Parameter | |
---|---|
Name | Description |
request |
ResolvePullRequestCommentsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> |
resolvePullRequestCommentsAsync(String parent, List<String> names)
public final OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> resolvePullRequestCommentsAsync(String parent, List<String> names)
Resolves 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();
List<String> names = new ArrayList<>();
ResolvePullRequestCommentsResponse response =
secureSourceManagerClient.resolvePullRequestCommentsAsync(parent, names).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The pull request in which to resolve the pull request comments. Format:
|
names |
List<String> Required. The names of the pull request comments to resolve. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<ResolvePullRequestCommentsResponse,OperationMetadata> |
resolvePullRequestCommentsCallable()
public final UnaryCallable<ResolvePullRequestCommentsRequest,Operation> resolvePullRequestCommentsCallable()
Resolves 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()) {
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ResolvePullRequestCommentsRequest,Operation> |
resolvePullRequestCommentsOperationCallable()
public final OperationCallable<ResolvePullRequestCommentsRequest,ResolvePullRequestCommentsResponse,OperationMetadata> resolvePullRequestCommentsOperationCallable()
Resolves 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()) {
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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ResolvePullRequestCommentsRequest,ResolvePullRequestCommentsResponse,OperationMetadata> |
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)
Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = secureSourceManagerClient.setIamPolicy(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future =
secureSourceManagerClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
setIamPolicyRepo(ResourceName resource)
public final Policy setIamPolicyRepo(ResourceName resource)
Set IAM policy on a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
Policy response = secureSourceManagerClient.setIamPolicyRepo(resource);
}
Parameter | |
---|---|
Name | Description |
resource |
com.google.api.resourcenames.ResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
setIamPolicyRepo(SetIamPolicyRequest request)
public final Policy setIamPolicyRepo(SetIamPolicyRequest request)
Set IAM policy on a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = secureSourceManagerClient.setIamPolicyRepo(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
setIamPolicyRepo(String resource)
public final Policy setIamPolicyRepo(String resource)
Set IAM policy on a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Policy response = secureSourceManagerClient.setIamPolicyRepo(resource);
}
Parameter | |
---|---|
Name | Description |
resource |
String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
setIamPolicyRepoCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyRepoCallable()
Set IAM policy on a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future =
secureSourceManagerClient.setIamPolicyRepoCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
testIamPermissions(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND
error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = secureSourceManagerClient.testIamPermissions(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
testIamPermissionsRepo(ResourceName resource)
public final TestIamPermissionsResponse testIamPermissionsRepo(ResourceName resource)
Test IAM permissions on a repository. IAM permission checks are not required on this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
TestIamPermissionsResponse response =
secureSourceManagerClient.testIamPermissionsRepo(resource);
}
Parameter | |
---|---|
Name | Description |
resource |
com.google.api.resourcenames.ResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissionsRepo(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissionsRepo(TestIamPermissionsRequest request)
Test IAM permissions on a repository. IAM permission checks are not required on this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response =
secureSourceManagerClient.testIamPermissionsRepo(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissionsRepo(String resource)
public final TestIamPermissionsResponse testIamPermissionsRepo(String resource)
Test IAM permissions on a repository. IAM permission checks are not required on this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
TestIamPermissionsResponse response =
secureSourceManagerClient.testIamPermissionsRepo(resource);
}
Parameter | |
---|---|
Name | Description |
resource |
String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
unresolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)
public final OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> unresolvePullRequestCommentsAsync(PullRequestName parent, List<String> names)
Unresolves 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()) {
PullRequestName parent =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]");
List<String> names = new ArrayList<>();
UnresolvePullRequestCommentsResponse response =
secureSourceManagerClient.unresolvePullRequestCommentsAsync(parent, names).get();
}
Parameters | |
---|---|
Name | Description |
parent |
PullRequestName Required. The pull request in which to resolve the pull request comments. Format:
|
names |
List<String> Required. The names of the pull request comments to unresolve. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> |
unresolvePullRequestCommentsAsync(UnresolvePullRequestCommentsRequest request)
public final OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> unresolvePullRequestCommentsAsync(UnresolvePullRequestCommentsRequest request)
Unresolves 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()) {
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();
}
Parameter | |
---|---|
Name | Description |
request |
UnresolvePullRequestCommentsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> |
unresolvePullRequestCommentsAsync(String parent, List<String> names)
public final OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> unresolvePullRequestCommentsAsync(String parent, List<String> names)
Unresolves 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 parent =
PullRequestName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PULL_REQUEST]")
.toString();
List<String> names = new ArrayList<>();
UnresolvePullRequestCommentsResponse response =
secureSourceManagerClient.unresolvePullRequestCommentsAsync(parent, names).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The pull request in which to resolve the pull request comments. Format:
|
names |
List<String> Required. The names of the pull request comments to unresolve. Format:
|
Returns | |
---|---|
Type | Description |
OperationFuture<UnresolvePullRequestCommentsResponse,OperationMetadata> |
unresolvePullRequestCommentsCallable()
public final UnaryCallable<UnresolvePullRequestCommentsRequest,Operation> unresolvePullRequestCommentsCallable()
Unresolves 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()) {
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UnresolvePullRequestCommentsRequest,Operation> |
unresolvePullRequestCommentsOperationCallable()
public final OperationCallable<UnresolvePullRequestCommentsRequest,UnresolvePullRequestCommentsResponse,OperationMetadata> unresolvePullRequestCommentsOperationCallable()
Unresolves 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()) {
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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UnresolvePullRequestCommentsRequest,UnresolvePullRequestCommentsResponse,OperationMetadata> |
updateBranchRuleAsync(BranchRule branchRule, FieldMask updateMask)
public final OperationFuture<BranchRule,OperationMetadata> updateBranchRuleAsync(BranchRule branchRule, 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 | |
---|---|
Name | Description |
branchRule |
BranchRule |
updateMask |
FieldMask Required. 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<BranchRule,OperationMetadata> |
updateBranchRuleAsync(UpdateBranchRuleRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateBranchRuleRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<BranchRule,OperationMetadata> |
updateBranchRuleCallable()
public final UnaryCallable<UpdateBranchRuleRequest,Operation> updateBranchRuleCallable()
UpdateBranchRule updates a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateBranchRuleRequest request =
UpdateBranchRuleRequest.newBuilder()
.setBranchRule(BranchRule.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.updateBranchRuleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateBranchRuleRequest,Operation> |
updateBranchRuleOperationCallable()
public final OperationCallable<UpdateBranchRuleRequest,BranchRule,OperationMetadata> updateBranchRuleOperationCallable()
UpdateBranchRule updates a branch rule.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateBranchRuleRequest request =
UpdateBranchRuleRequest.newBuilder()
.setBranchRule(BranchRule.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<BranchRule, OperationMetadata> future =
secureSourceManagerClient.updateBranchRuleOperationCallable().futureCall(request);
// Do something.
BranchRule response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateBranchRuleRequest,BranchRule,OperationMetadata> |
updateHookAsync(Hook hook, FieldMask updateMask)
public final OperationFuture<Hook,OperationMetadata> updateHookAsync(Hook hook, 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 | |
---|---|
Name | Description |
hook |
Hook Required. The hook being updated. |
updateMask |
FieldMask Required. 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<Hook,OperationMetadata> |
updateHookAsync(UpdateHookRequest request)
public final OperationFuture<Hook,OperationMetadata> updateHookAsync(UpdateHookRequest request)
Updates the metadata of a hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateHookRequest request =
UpdateHookRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setHook(Hook.newBuilder().build())
.build();
Hook response = secureSourceManagerClient.updateHookAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateHookRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Hook,OperationMetadata> |
updateHookCallable()
public final UnaryCallable<UpdateHookRequest,Operation> updateHookCallable()
Updates the metadata of a hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateHookRequest request =
UpdateHookRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setHook(Hook.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.updateHookCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateHookRequest,Operation> |
updateHookOperationCallable()
public final OperationCallable<UpdateHookRequest,Hook,OperationMetadata> updateHookOperationCallable()
Updates the metadata of a hook.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateHookRequest request =
UpdateHookRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setHook(Hook.newBuilder().build())
.build();
OperationFuture<Hook, OperationMetadata> future =
secureSourceManagerClient.updateHookOperationCallable().futureCall(request);
// Do something.
Hook response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateHookRequest,Hook,OperationMetadata> |
updateIssueAsync(Issue issue, FieldMask updateMask)
public final OperationFuture<Issue,OperationMetadata> updateIssueAsync(Issue issue, 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 | |
---|---|
Name | Description |
issue |
Issue Required. The issue to update. |
updateMask |
FieldMask 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
updateIssueAsync(UpdateIssueRequest request)
public final OperationFuture<Issue,OperationMetadata> updateIssueAsync(UpdateIssueRequest request)
Updates a issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateIssueRequest request =
UpdateIssueRequest.newBuilder()
.setIssue(Issue.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Issue response = secureSourceManagerClient.updateIssueAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateIssueRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Issue,OperationMetadata> |
updateIssueCallable()
public final UnaryCallable<UpdateIssueRequest,Operation> updateIssueCallable()
Updates a issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateIssueRequest request =
UpdateIssueRequest.newBuilder()
.setIssue(Issue.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.updateIssueCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateIssueRequest,Operation> |
updateIssueCommentAsync(IssueComment issueComment, FieldMask updateMask)
public final OperationFuture<IssueComment,OperationMetadata> updateIssueCommentAsync(IssueComment issueComment, 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 | |
---|---|
Name | Description |
issueComment |
IssueComment Required. The issue comment to update. |
updateMask |
FieldMask 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<IssueComment,OperationMetadata> |
updateIssueCommentAsync(UpdateIssueCommentRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateIssueCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<IssueComment,OperationMetadata> |
updateIssueCommentCallable()
public final UnaryCallable<UpdateIssueCommentRequest,Operation> updateIssueCommentCallable()
Updates an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateIssueCommentRequest request =
UpdateIssueCommentRequest.newBuilder()
.setIssueComment(IssueComment.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.updateIssueCommentCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateIssueCommentRequest,Operation> |
updateIssueCommentOperationCallable()
public final OperationCallable<UpdateIssueCommentRequest,IssueComment,OperationMetadata> updateIssueCommentOperationCallable()
Updates an issue comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateIssueCommentRequest request =
UpdateIssueCommentRequest.newBuilder()
.setIssueComment(IssueComment.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<IssueComment, OperationMetadata> future =
secureSourceManagerClient.updateIssueCommentOperationCallable().futureCall(request);
// Do something.
IssueComment response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateIssueCommentRequest,IssueComment,OperationMetadata> |
updateIssueOperationCallable()
public final OperationCallable<UpdateIssueRequest,Issue,OperationMetadata> updateIssueOperationCallable()
Updates a issue.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateIssueRequest request =
UpdateIssueRequest.newBuilder()
.setIssue(Issue.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<Issue, OperationMetadata> future =
secureSourceManagerClient.updateIssueOperationCallable().futureCall(request);
// Do something.
Issue response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateIssueRequest,Issue,OperationMetadata> |
updatePullRequestAsync(PullRequest pullRequest, FieldMask updateMask)
public final OperationFuture<PullRequest,OperationMetadata> updatePullRequestAsync(PullRequest pullRequest, 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 | |
---|---|
Name | Description |
pullRequest |
PullRequest Required. The pull request to update. |
updateMask |
FieldMask 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
updatePullRequestAsync(UpdatePullRequestRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
UpdatePullRequestRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequest,OperationMetadata> |
updatePullRequestCallable()
public final UnaryCallable<UpdatePullRequestRequest,Operation> updatePullRequestCallable()
Updates a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdatePullRequestRequest request =
UpdatePullRequestRequest.newBuilder()
.setPullRequest(PullRequest.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.updatePullRequestCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdatePullRequestRequest,Operation> |
updatePullRequestCommentAsync(PullRequestComment pullRequestComment, FieldMask updateMask)
public final OperationFuture<PullRequestComment,OperationMetadata> updatePullRequestCommentAsync(PullRequestComment pullRequestComment, 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 | |
---|---|
Name | Description |
pullRequestComment |
PullRequestComment Required. The pull request comment to update. |
updateMask |
FieldMask Optional. Field mask is used to specify the fields to be overwritten in the
pull request comment resource by the update. Updatable fields are |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequestComment,OperationMetadata> |
updatePullRequestCommentAsync(UpdatePullRequestCommentRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
UpdatePullRequestCommentRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PullRequestComment,OperationMetadata> |
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdatePullRequestCommentRequest,Operation> |
updatePullRequestCommentOperationCallable()
public final OperationCallable<UpdatePullRequestCommentRequest,PullRequestComment,OperationMetadata> updatePullRequestCommentOperationCallable()
Updates a pull request comment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdatePullRequestCommentRequest request =
UpdatePullRequestCommentRequest.newBuilder()
.setPullRequestComment(PullRequestComment.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<PullRequestComment, OperationMetadata> future =
secureSourceManagerClient.updatePullRequestCommentOperationCallable().futureCall(request);
// Do something.
PullRequestComment response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdatePullRequestCommentRequest,PullRequestComment,OperationMetadata> |
updatePullRequestOperationCallable()
public final OperationCallable<UpdatePullRequestRequest,PullRequest,OperationMetadata> updatePullRequestOperationCallable()
Updates a pull request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdatePullRequestRequest request =
UpdatePullRequestRequest.newBuilder()
.setPullRequest(PullRequest.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<PullRequest, OperationMetadata> future =
secureSourceManagerClient.updatePullRequestOperationCallable().futureCall(request);
// Do something.
PullRequest response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdatePullRequestRequest,PullRequest,OperationMetadata> |
updateRepositoryAsync(Repository repository, FieldMask updateMask)
public final OperationFuture<Repository,OperationMetadata> updateRepositoryAsync(Repository repository, 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 | |
---|---|
Name | Description |
repository |
Repository Required. The repository being updated. |
updateMask |
FieldMask 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. |
Returns | |
---|---|
Type | Description |
OperationFuture<Repository,OperationMetadata> |
updateRepositoryAsync(UpdateRepositoryRequest request)
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();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateRepositoryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Repository,OperationMetadata> |
updateRepositoryCallable()
public final UnaryCallable<UpdateRepositoryRequest,Operation> updateRepositoryCallable()
Updates the metadata of a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateRepositoryRequest request =
UpdateRepositoryRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setRepository(Repository.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
secureSourceManagerClient.updateRepositoryCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateRepositoryRequest,Operation> |
updateRepositoryOperationCallable()
public final OperationCallable<UpdateRepositoryRequest,Repository,OperationMetadata> updateRepositoryOperationCallable()
Updates the metadata of a repository.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
UpdateRepositoryRequest request =
UpdateRepositoryRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setRepository(Repository.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Repository, OperationMetadata> future =
secureSourceManagerClient.updateRepositoryOperationCallable().futureCall(request);
// Do something.
Repository response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateRepositoryRequest,Repository,OperationMetadata> |