@Generated(value="by gapic-generator-java") public class RapidMigrationAssessmentClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
AnnotationName name = AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]");
Annotation response = rapidMigrationAssessmentClient.getAnnotation(name);
}
Note: close() needs to be called on the RapidMigrationAssessmentClient 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 |
|---|---|---|
| CreateCollector | Create a Collector to manage the on-prem appliance which collects information about Customer assets. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| CreateAnnotation | Creates an Annotation |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| GetAnnotation | Gets details of a single Annotation. |
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.
|
| ListCollectors | Lists Collectors 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.
|
| GetCollector | Gets details of a single Collector. |
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.
|
| UpdateCollector | Updates the parameters of a single Collector. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| DeleteCollector | Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion thorugh producer api. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| ResumeCollector | Resumes the given collector. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| RegisterCollector | Registers the given collector. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| PauseCollector | Pauses the given collector. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| ListLocations | Lists information about the supported locations for this service. |
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.
|
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 RapidMigrationAssessmentSettings 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
RapidMigrationAssessmentSettings rapidMigrationAssessmentSettings =
RapidMigrationAssessmentSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create(rapidMigrationAssessmentSettings);
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
RapidMigrationAssessmentSettings rapidMigrationAssessmentSettings =
RapidMigrationAssessmentSettings.newBuilder().setEndpoint(myEndpoint).build();
RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create(rapidMigrationAssessmentSettings);
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
RapidMigrationAssessmentSettings rapidMigrationAssessmentSettings =
RapidMigrationAssessmentSettings.newHttpJsonBuilder().build();
RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create(rapidMigrationAssessmentSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
RapidMigrationAssessmentClient.ListCollectorsFixedSizeCollection |
static class |
RapidMigrationAssessmentClient.ListCollectorsPage |
static class |
RapidMigrationAssessmentClient.ListCollectorsPagedResponse |
static class |
RapidMigrationAssessmentClient.ListLocationsFixedSizeCollection |
static class |
RapidMigrationAssessmentClient.ListLocationsPage |
static class |
RapidMigrationAssessmentClient.ListLocationsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
RapidMigrationAssessmentClient(RapidMigrationAssessmentSettings settings)
Constructs an instance of RapidMigrationAssessmentClient, using the given settings.
|
protected |
RapidMigrationAssessmentClient(RapidMigrationAssessmentStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static RapidMigrationAssessmentClient |
create()
Constructs an instance of RapidMigrationAssessmentClient with default settings.
|
static RapidMigrationAssessmentClient |
create(RapidMigrationAssessmentSettings settings)
Constructs an instance of RapidMigrationAssessmentClient, using the given settings.
|
static RapidMigrationAssessmentClient |
create(RapidMigrationAssessmentStub stub)
Constructs an instance of RapidMigrationAssessmentClient, using the given stub for making
calls.
|
com.google.api.gax.longrunning.OperationFuture<Annotation,OperationMetadata> |
createAnnotationAsync(CreateAnnotationRequest request)
Creates an Annotation
|
com.google.api.gax.longrunning.OperationFuture<Annotation,OperationMetadata> |
createAnnotationAsync(LocationName parent,
Annotation annotation)
Creates an Annotation
|
com.google.api.gax.longrunning.OperationFuture<Annotation,OperationMetadata> |
createAnnotationAsync(String parent,
Annotation annotation)
Creates an Annotation
|
com.google.api.gax.rpc.UnaryCallable<CreateAnnotationRequest,com.google.longrunning.Operation> |
createAnnotationCallable()
Creates an Annotation
|
com.google.api.gax.rpc.OperationCallable<CreateAnnotationRequest,Annotation,OperationMetadata> |
createAnnotationOperationCallable()
Creates an Annotation
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
createCollectorAsync(CreateCollectorRequest request)
Create a Collector to manage the on-prem appliance which collects information about Customer
assets.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
createCollectorAsync(LocationName parent,
Collector collector,
String collectorId)
Create a Collector to manage the on-prem appliance which collects information about Customer
assets.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
createCollectorAsync(String parent,
Collector collector,
String collectorId)
Create a Collector to manage the on-prem appliance which collects information about Customer
assets.
|
com.google.api.gax.rpc.UnaryCallable<CreateCollectorRequest,com.google.longrunning.Operation> |
createCollectorCallable()
Create a Collector to manage the on-prem appliance which collects information about Customer
assets.
|
com.google.api.gax.rpc.OperationCallable<CreateCollectorRequest,Collector,OperationMetadata> |
createCollectorOperationCallable()
Create a Collector to manage the on-prem appliance which collects information about Customer
assets.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
deleteCollectorAsync(CollectorName name)
Deletes a single Collector - changes state of collector to "Deleting".
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
deleteCollectorAsync(DeleteCollectorRequest request)
Deletes a single Collector - changes state of collector to "Deleting".
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
deleteCollectorAsync(String name)
Deletes a single Collector - changes state of collector to "Deleting".
|
com.google.api.gax.rpc.UnaryCallable<DeleteCollectorRequest,com.google.longrunning.Operation> |
deleteCollectorCallable()
Deletes a single Collector - changes state of collector to "Deleting".
|
com.google.api.gax.rpc.OperationCallable<DeleteCollectorRequest,Collector,OperationMetadata> |
deleteCollectorOperationCallable()
Deletes a single Collector - changes state of collector to "Deleting".
|
Annotation |
getAnnotation(AnnotationName name)
Gets details of a single Annotation.
|
Annotation |
getAnnotation(GetAnnotationRequest request)
Gets details of a single Annotation.
|
Annotation |
getAnnotation(String name)
Gets details of a single Annotation.
|
com.google.api.gax.rpc.UnaryCallable<GetAnnotationRequest,Annotation> |
getAnnotationCallable()
Gets details of a single Annotation.
|
Collector |
getCollector(CollectorName name)
Gets details of a single Collector.
|
Collector |
getCollector(GetCollectorRequest request)
Gets details of a single Collector.
|
Collector |
getCollector(String name)
Gets details of a single Collector.
|
com.google.api.gax.rpc.UnaryCallable<GetCollectorRequest,Collector> |
getCollectorCallable()
Gets details of a single Collector.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
RapidMigrationAssessmentSettings |
getSettings() |
RapidMigrationAssessmentStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
RapidMigrationAssessmentClient.ListCollectorsPagedResponse |
listCollectors(ListCollectorsRequest request)
Lists Collectors in a given project and location.
|
RapidMigrationAssessmentClient.ListCollectorsPagedResponse |
listCollectors(LocationName parent)
Lists Collectors in a given project and location.
|
RapidMigrationAssessmentClient.ListCollectorsPagedResponse |
listCollectors(String parent)
Lists Collectors in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListCollectorsRequest,ListCollectorsResponse> |
listCollectorsCallable()
Lists Collectors in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListCollectorsRequest,RapidMigrationAssessmentClient.ListCollectorsPagedResponse> |
listCollectorsPagedCallable()
Lists Collectors in a given project and location.
|
RapidMigrationAssessmentClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,RapidMigrationAssessmentClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
pauseCollectorAsync(CollectorName name)
Pauses the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
pauseCollectorAsync(PauseCollectorRequest request)
Pauses the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
pauseCollectorAsync(String name)
Pauses the given collector.
|
com.google.api.gax.rpc.UnaryCallable<PauseCollectorRequest,com.google.longrunning.Operation> |
pauseCollectorCallable()
Pauses the given collector.
|
com.google.api.gax.rpc.OperationCallable<PauseCollectorRequest,Collector,OperationMetadata> |
pauseCollectorOperationCallable()
Pauses the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
registerCollectorAsync(CollectorName name)
Registers the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
registerCollectorAsync(RegisterCollectorRequest request)
Registers the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
registerCollectorAsync(String name)
Registers the given collector.
|
com.google.api.gax.rpc.UnaryCallable<RegisterCollectorRequest,com.google.longrunning.Operation> |
registerCollectorCallable()
Registers the given collector.
|
com.google.api.gax.rpc.OperationCallable<RegisterCollectorRequest,Collector,OperationMetadata> |
registerCollectorOperationCallable()
Registers the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
resumeCollectorAsync(CollectorName name)
Resumes the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
resumeCollectorAsync(ResumeCollectorRequest request)
Resumes the given collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
resumeCollectorAsync(String name)
Resumes the given collector.
|
com.google.api.gax.rpc.UnaryCallable<ResumeCollectorRequest,com.google.longrunning.Operation> |
resumeCollectorCallable()
Resumes the given collector.
|
com.google.api.gax.rpc.OperationCallable<ResumeCollectorRequest,Collector,OperationMetadata> |
resumeCollectorOperationCallable()
Resumes the given collector.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
updateCollectorAsync(Collector collector,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Collector.
|
com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> |
updateCollectorAsync(UpdateCollectorRequest request)
Updates the parameters of a single Collector.
|
com.google.api.gax.rpc.UnaryCallable<UpdateCollectorRequest,com.google.longrunning.Operation> |
updateCollectorCallable()
Updates the parameters of a single Collector.
|
com.google.api.gax.rpc.OperationCallable<UpdateCollectorRequest,Collector,OperationMetadata> |
updateCollectorOperationCallable()
Updates the parameters of a single Collector.
|
protected RapidMigrationAssessmentClient(RapidMigrationAssessmentSettings settings) throws IOException
IOExceptionprotected RapidMigrationAssessmentClient(RapidMigrationAssessmentStub stub)
public static final RapidMigrationAssessmentClient create() throws IOException
IOExceptionpublic static final RapidMigrationAssessmentClient create(RapidMigrationAssessmentSettings settings) throws IOException
IOExceptionpublic static final RapidMigrationAssessmentClient create(RapidMigrationAssessmentStub stub)
public final RapidMigrationAssessmentSettings getSettings()
public RapidMigrationAssessmentStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> createCollectorAsync(LocationName parent, Collector collector, String collectorId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Collector collector = Collector.newBuilder().build();
String collectorId = "collectorId1854072456";
Collector response =
rapidMigrationAssessmentClient.createCollectorAsync(parent, collector, collectorId).get();
}
parent - Required. Name of the parent (project+location).collector - Required. The resource being created.collectorId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> createCollectorAsync(String parent, Collector collector, String collectorId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Collector collector = Collector.newBuilder().build();
String collectorId = "collectorId1854072456";
Collector response =
rapidMigrationAssessmentClient.createCollectorAsync(parent, collector, collectorId).get();
}
parent - Required. Name of the parent (project+location).collector - Required. The resource being created.collectorId - Required. Id of the requesting object.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> createCollectorAsync(CreateCollectorRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CreateCollectorRequest request =
CreateCollectorRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCollectorId("collectorId1854072456")
.setCollector(Collector.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Collector response = rapidMigrationAssessmentClient.createCollectorAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateCollectorRequest,Collector,OperationMetadata> createCollectorOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CreateCollectorRequest request =
CreateCollectorRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCollectorId("collectorId1854072456")
.setCollector(Collector.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Collector, OperationMetadata> future =
rapidMigrationAssessmentClient.createCollectorOperationCallable().futureCall(request);
// Do something.
Collector response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateCollectorRequest,com.google.longrunning.Operation> createCollectorCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CreateCollectorRequest request =
CreateCollectorRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCollectorId("collectorId1854072456")
.setCollector(Collector.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
rapidMigrationAssessmentClient.createCollectorCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Annotation,OperationMetadata> createAnnotationAsync(LocationName parent, Annotation annotation)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Annotation annotation = Annotation.newBuilder().build();
Annotation response =
rapidMigrationAssessmentClient.createAnnotationAsync(parent, annotation).get();
}
parent - Required. Name of the parent (project+location).annotation - Required. The resource being created.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Annotation,OperationMetadata> createAnnotationAsync(String parent, Annotation annotation)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Annotation annotation = Annotation.newBuilder().build();
Annotation response =
rapidMigrationAssessmentClient.createAnnotationAsync(parent, annotation).get();
}
parent - Required. Name of the parent (project+location).annotation - Required. The resource being created.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Annotation,OperationMetadata> createAnnotationAsync(CreateAnnotationRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CreateAnnotationRequest request =
CreateAnnotationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAnnotation(Annotation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Annotation response = rapidMigrationAssessmentClient.createAnnotationAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateAnnotationRequest,Annotation,OperationMetadata> createAnnotationOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CreateAnnotationRequest request =
CreateAnnotationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAnnotation(Annotation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Annotation, OperationMetadata> future =
rapidMigrationAssessmentClient.createAnnotationOperationCallable().futureCall(request);
// Do something.
Annotation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAnnotationRequest,com.google.longrunning.Operation> createAnnotationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CreateAnnotationRequest request =
CreateAnnotationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAnnotation(Annotation.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
rapidMigrationAssessmentClient.createAnnotationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final Annotation getAnnotation(AnnotationName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
AnnotationName name = AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]");
Annotation response = rapidMigrationAssessmentClient.getAnnotation(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Annotation getAnnotation(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String name = AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]").toString();
Annotation response = rapidMigrationAssessmentClient.getAnnotation(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Annotation getAnnotation(GetAnnotationRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
GetAnnotationRequest request =
GetAnnotationRequest.newBuilder()
.setName(AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]").toString())
.build();
Annotation response = rapidMigrationAssessmentClient.getAnnotation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAnnotationRequest,Annotation> getAnnotationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
GetAnnotationRequest request =
GetAnnotationRequest.newBuilder()
.setName(AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]").toString())
.build();
ApiFuture<Annotation> future =
rapidMigrationAssessmentClient.getAnnotationCallable().futureCall(request);
// Do something.
Annotation response = future.get();
}
public final RapidMigrationAssessmentClient.ListCollectorsPagedResponse listCollectors(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Collector element : rapidMigrationAssessmentClient.listCollectors(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListCollectorsRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RapidMigrationAssessmentClient.ListCollectorsPagedResponse listCollectors(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Collector element : rapidMigrationAssessmentClient.listCollectors(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. Parent value for ListCollectorsRequest.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RapidMigrationAssessmentClient.ListCollectorsPagedResponse listCollectors(ListCollectorsRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ListCollectorsRequest request =
ListCollectorsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Collector element :
rapidMigrationAssessmentClient.listCollectors(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListCollectorsRequest,RapidMigrationAssessmentClient.ListCollectorsPagedResponse> listCollectorsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ListCollectorsRequest request =
ListCollectorsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Collector> future =
rapidMigrationAssessmentClient.listCollectorsPagedCallable().futureCall(request);
// Do something.
for (Collector element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListCollectorsRequest,ListCollectorsResponse> listCollectorsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ListCollectorsRequest request =
ListCollectorsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListCollectorsResponse response =
rapidMigrationAssessmentClient.listCollectorsCallable().call(request);
for (Collector element : response.getCollectorsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Collector getCollector(CollectorName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
Collector response = rapidMigrationAssessmentClient.getCollector(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Collector getCollector(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
Collector response = rapidMigrationAssessmentClient.getCollector(name);
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Collector getCollector(GetCollectorRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
GetCollectorRequest request =
GetCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.build();
Collector response = rapidMigrationAssessmentClient.getCollector(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetCollectorRequest,Collector> getCollectorCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
GetCollectorRequest request =
GetCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.build();
ApiFuture<Collector> future =
rapidMigrationAssessmentClient.getCollectorCallable().futureCall(request);
// Do something.
Collector response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> updateCollectorAsync(Collector collector, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
Collector collector = Collector.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Collector response =
rapidMigrationAssessmentClient.updateCollectorAsync(collector, updateMask).get();
}
collector - Required. The resource being updated.updateMask - Required. Field mask is used to specify the fields to be overwritten in the
Collector 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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> updateCollectorAsync(UpdateCollectorRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
UpdateCollectorRequest request =
UpdateCollectorRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCollector(Collector.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Collector response = rapidMigrationAssessmentClient.updateCollectorAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateCollectorRequest,Collector,OperationMetadata> updateCollectorOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
UpdateCollectorRequest request =
UpdateCollectorRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCollector(Collector.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Collector, OperationMetadata> future =
rapidMigrationAssessmentClient.updateCollectorOperationCallable().futureCall(request);
// Do something.
Collector response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateCollectorRequest,com.google.longrunning.Operation> updateCollectorCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
UpdateCollectorRequest request =
UpdateCollectorRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCollector(Collector.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
rapidMigrationAssessmentClient.updateCollectorCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(CollectorName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
Collector response = rapidMigrationAssessmentClient.deleteCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
Collector response = rapidMigrationAssessmentClient.deleteCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(DeleteCollectorRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
DeleteCollectorRequest request =
DeleteCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
Collector response = rapidMigrationAssessmentClient.deleteCollectorAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteCollectorRequest,Collector,OperationMetadata> deleteCollectorOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
DeleteCollectorRequest request =
DeleteCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Collector, OperationMetadata> future =
rapidMigrationAssessmentClient.deleteCollectorOperationCallable().futureCall(request);
// Do something.
Collector response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteCollectorRequest,com.google.longrunning.Operation> deleteCollectorCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
DeleteCollectorRequest request =
DeleteCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
rapidMigrationAssessmentClient.deleteCollectorCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> resumeCollectorAsync(CollectorName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
Collector response = rapidMigrationAssessmentClient.resumeCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> resumeCollectorAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
Collector response = rapidMigrationAssessmentClient.resumeCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> resumeCollectorAsync(ResumeCollectorRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ResumeCollectorRequest request =
ResumeCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
Collector response = rapidMigrationAssessmentClient.resumeCollectorAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<ResumeCollectorRequest,Collector,OperationMetadata> resumeCollectorOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ResumeCollectorRequest request =
ResumeCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Collector, OperationMetadata> future =
rapidMigrationAssessmentClient.resumeCollectorOperationCallable().futureCall(request);
// Do something.
Collector response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<ResumeCollectorRequest,com.google.longrunning.Operation> resumeCollectorCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ResumeCollectorRequest request =
ResumeCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
rapidMigrationAssessmentClient.resumeCollectorCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> registerCollectorAsync(CollectorName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
Collector response = rapidMigrationAssessmentClient.registerCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> registerCollectorAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
Collector response = rapidMigrationAssessmentClient.registerCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> registerCollectorAsync(RegisterCollectorRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
RegisterCollectorRequest request =
RegisterCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
Collector response = rapidMigrationAssessmentClient.registerCollectorAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<RegisterCollectorRequest,Collector,OperationMetadata> registerCollectorOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
RegisterCollectorRequest request =
RegisterCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Collector, OperationMetadata> future =
rapidMigrationAssessmentClient.registerCollectorOperationCallable().futureCall(request);
// Do something.
Collector response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<RegisterCollectorRequest,com.google.longrunning.Operation> registerCollectorCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
RegisterCollectorRequest request =
RegisterCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
rapidMigrationAssessmentClient.registerCollectorCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> pauseCollectorAsync(CollectorName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
Collector response = rapidMigrationAssessmentClient.pauseCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> pauseCollectorAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
Collector response = rapidMigrationAssessmentClient.pauseCollectorAsync(name).get();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collector,OperationMetadata> pauseCollectorAsync(PauseCollectorRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
PauseCollectorRequest request =
PauseCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
Collector response = rapidMigrationAssessmentClient.pauseCollectorAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<PauseCollectorRequest,Collector,OperationMetadata> pauseCollectorOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
PauseCollectorRequest request =
PauseCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Collector, OperationMetadata> future =
rapidMigrationAssessmentClient.pauseCollectorOperationCallable().futureCall(request);
// Do something.
Collector response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<PauseCollectorRequest,com.google.longrunning.Operation> pauseCollectorCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
PauseCollectorRequest request =
PauseCollectorRequest.newBuilder()
.setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
rapidMigrationAssessmentClient.pauseCollectorCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final RapidMigrationAssessmentClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : rapidMigrationAssessmentClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,RapidMigrationAssessmentClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
rapidMigrationAssessmentClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
rapidMigrationAssessmentClient.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;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = rapidMigrationAssessmentClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
RapidMigrationAssessmentClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
rapidMigrationAssessmentClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.