diff --git a/java-recommendations-ai/README.md b/java-recommendations-ai/README.md index f98043a57c70..4b0a8000a301 100644 --- a/java-recommendations-ai/README.md +++ b/java-recommendations-ai/README.md @@ -202,7 +202,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-recommendations-ai.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recommendations-ai/0.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-recommendations-ai/0.39.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient.java index b874af1f7b4a..2e23e053d512 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient.java @@ -62,19 +62,127 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateCatalogItem

Creates a catalog item.

+ *

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

+ *
    + *
  • createCatalogItem(CreateCatalogItemRequest request) + *
+ *

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

+ *
    + *
  • createCatalogItem(CatalogName parent, CatalogItem catalogItem) + *
  • createCatalogItem(String parent, CatalogItem catalogItem) + *
+ *

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

+ *
    + *
  • createCatalogItemCallable() + *
+ *
GetCatalogItem

Gets a specific catalog item.

+ *

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

+ *
    + *
  • getCatalogItem(GetCatalogItemRequest request) + *
+ *

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

+ *
    + *
  • getCatalogItem(CatalogItemPathName name) + *
  • getCatalogItem(String name) + *
+ *

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

+ *
    + *
  • getCatalogItemCallable() + *
+ *
ListCatalogItems

Gets a list of catalog items.

+ *

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

+ *
    + *
  • listCatalogItems(ListCatalogItemsRequest request) + *
+ *

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

+ *
    + *
  • listCatalogItems(CatalogName parent, String filter) + *
  • listCatalogItems(String parent, String filter) + *
+ *

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

+ *
    + *
  • listCatalogItemsPagedCallable() + *
  • listCatalogItemsCallable() + *
+ *
UpdateCatalogItem

Updates a catalog item. Partial updating is supported. Non-existing items will be created.

+ *

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

+ *
    + *
  • updateCatalogItem(UpdateCatalogItemRequest request) + *
+ *

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

+ *
    + *
  • updateCatalogItem(CatalogItemPathName name, CatalogItem catalogItem, FieldMask updateMask) + *
  • updateCatalogItem(String name, CatalogItem catalogItem, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCatalogItemCallable() + *
+ *
DeleteCatalogItem

Deletes a catalog item.

+ *

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

+ *
    + *
  • deleteCatalogItem(DeleteCatalogItemRequest request) + *
+ *

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

+ *
    + *
  • deleteCatalogItem(CatalogItemPathName name) + *
  • deleteCatalogItem(String name) + *
+ *

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

+ *
    + *
  • deleteCatalogItemCallable() + *
+ *
ImportCatalogItems

Bulk import of multiple catalog items. Request processing may be synchronous. No partial updating supported. Non-existing items will be created. + *

Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully updated.

+ *

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

+ *
    + *
  • importCatalogItemsAsync(CatalogName parent, String requestId, InputConfig inputConfig, ImportErrorsConfig errorsConfig) + *
  • importCatalogItemsAsync(String parent, String requestId, InputConfig inputConfig, ImportErrorsConfig errorsConfig) + *
  • importCatalogItemsAsync(ImportCatalogItemsRequest request) + *
+ *

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

+ *
    + *
  • importCatalogItemsOperationCallable() + *
  • importCatalogItemsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient.java index b62a6c1be68f..1639d9641a38 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient.java @@ -66,19 +66,71 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreatePredictionApiKeyRegistration

Register an API key for use with predict method.

+ *

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

+ *
    + *
  • createPredictionApiKeyRegistration(CreatePredictionApiKeyRegistrationRequest request) + *
+ *

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

+ *
    + *
  • createPredictionApiKeyRegistration(EventStoreName parent, PredictionApiKeyRegistration predictionApiKeyRegistration) + *
  • createPredictionApiKeyRegistration(String parent, PredictionApiKeyRegistration predictionApiKeyRegistration) + *
+ *

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

+ *
    + *
  • createPredictionApiKeyRegistrationCallable() + *
+ *
ListPredictionApiKeyRegistrations

List the registered apiKeys for use with predict method.

+ *

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

+ *
    + *
  • listPredictionApiKeyRegistrations(ListPredictionApiKeyRegistrationsRequest request) + *
+ *

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

+ *
    + *
  • listPredictionApiKeyRegistrations(EventStoreName parent) + *
  • listPredictionApiKeyRegistrations(String parent) + *
+ *

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

+ *
    + *
  • listPredictionApiKeyRegistrationsPagedCallable() + *
  • listPredictionApiKeyRegistrationsCallable() + *
+ *
DeletePredictionApiKeyRegistration

Unregister an apiKey from using for predict method.

+ *

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

+ *
    + *
  • deletePredictionApiKeyRegistration(DeletePredictionApiKeyRegistrationRequest request) + *
+ *

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

+ *
    + *
  • deletePredictionApiKeyRegistration(PredictionApiKeyRegistrationName name) + *
  • deletePredictionApiKeyRegistration(String name) + *
+ *

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

+ *
    + *
  • deletePredictionApiKeyRegistrationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient.java index f8114af64c7e..975fe01f79b8 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient.java @@ -63,19 +63,33 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Predict

Makes a recommendation prediction. If using API Key based authentication, the API Key must be registered using the [PredictionApiKeyRegistry][google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry] service. [Learn more](/recommendations-ai/docs/setting-up#register-key).

+ *

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

+ *
    + *
  • predict(PredictRequest request) + *
+ *

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

+ *
    + *
  • predict(PlacementName name, UserEvent userEvent) + *
  • predict(String name, UserEvent userEvent) + *
+ *

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

+ *
    + *
  • predictPagedCallable() + *
  • predictCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient.java index 6e5ec9701e76..865e69268cf9 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient.java @@ -63,19 +63,110 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
WriteUserEvent

Writes a single user event.

+ *

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

+ *
    + *
  • writeUserEvent(WriteUserEventRequest request) + *
+ *

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

+ *
    + *
  • writeUserEvent(EventStoreName parent, UserEvent userEvent) + *
  • writeUserEvent(String parent, UserEvent userEvent) + *
+ *

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

+ *
    + *
  • writeUserEventCallable() + *
+ *
CollectUserEvent

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. + *

This method is used only by the Recommendations AI JavaScript pixel. Users should not call this method directly.

+ *

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

+ *
    + *
  • collectUserEvent(CollectUserEventRequest request) + *
+ *

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

+ *
    + *
  • collectUserEvent(EventStoreName parent, String userEvent, String uri, long ets) + *
  • collectUserEvent(String parent, String userEvent, String uri, long ets) + *
+ *

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

+ *
    + *
  • collectUserEventCallable() + *
+ *
ListUserEvents

Gets a list of user events within a time range, with potential filtering.

+ *

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

+ *
    + *
  • listUserEvents(ListUserEventsRequest request) + *
+ *

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

+ *
    + *
  • listUserEvents(EventStoreName parent, String filter) + *
  • listUserEvents(String parent, String filter) + *
+ *

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

+ *
    + *
  • listUserEventsPagedCallable() + *
  • listUserEventsCallable() + *
+ *
PurgeUserEvents

Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

+ *

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

+ *
    + *
  • purgeUserEventsAsync(PurgeUserEventsRequest request) + *
+ *

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

+ *
    + *
  • purgeUserEventsAsync(EventStoreName parent, String filter, boolean force) + *
  • purgeUserEventsAsync(String parent, String filter, boolean force) + *
+ *

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

+ *
    + *
  • purgeUserEventsOperationCallable() + *
  • purgeUserEventsCallable() + *
+ *
ImportUserEvents

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. + *

Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.

+ *

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

+ *
    + *
  • importUserEventsAsync(EventStoreName parent, String requestId, InputConfig inputConfig, ImportErrorsConfig errorsConfig) + *
  • importUserEventsAsync(String parent, String requestId, InputConfig inputConfig, ImportErrorsConfig errorsConfig) + *
  • importUserEventsAsync(ImportUserEventsRequest request) + *
+ *

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

+ *
    + *
  • importUserEventsOperationCallable() + *
  • importUserEventsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/CatalogServiceStubSettings.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/CatalogServiceStubSettings.java index 4a7971379fc7..6df890c8fa54 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/CatalogServiceStubSettings.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/CatalogServiceStubSettings.java @@ -239,6 +239,12 @@ public CatalogServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "recommendationengine"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionApiKeyRegistryStubSettings.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionApiKeyRegistryStubSettings.java index 941c260597b1..c6112e76d9e3 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionApiKeyRegistryStubSettings.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionApiKeyRegistryStubSettings.java @@ -235,6 +235,12 @@ public PredictionApiKeyRegistryStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "recommendationengine"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionServiceStubSettings.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionServiceStubSettings.java index b6af52ff74c1..64e682250047 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionServiceStubSettings.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionServiceStubSettings.java @@ -181,6 +181,12 @@ public PredictionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "recommendationengine"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/UserEventServiceStubSettings.java b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/UserEventServiceStubSettings.java index 24253753cec1..40950c775089 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/UserEventServiceStubSettings.java +++ b/java-recommendations-ai/google-cloud-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/UserEventServiceStubSettings.java @@ -238,6 +238,12 @@ public UserEventServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "recommendationengine"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/RecommenderClient.java b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/RecommenderClient.java index 3001b3a2847d..ef99467e9141 100644 --- a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/RecommenderClient.java +++ b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/RecommenderClient.java @@ -61,19 +61,266 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListInsights

Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.

+ *

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

+ *
    + *
  • listInsights(ListInsightsRequest request) + *
+ *

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

+ *
    + *
  • listInsights(InsightTypeName parent) + *
  • listInsights(String parent) + *
+ *

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

+ *
    + *
  • listInsightsPagedCallable() + *
  • listInsightsCallable() + *
+ *
GetInsight

Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.

+ *

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

+ *
    + *
  • getInsight(GetInsightRequest request) + *
+ *

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

+ *
    + *
  • getInsight(InsightName name) + *
  • getInsight(String name) + *
+ *

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

+ *
    + *
  • getInsightCallable() + *
+ *
MarkInsightAccepted

Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. + *

MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.

+ *

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

+ *
    + *
  • markInsightAccepted(MarkInsightAcceptedRequest request) + *
+ *

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

+ *
    + *
  • markInsightAccepted(InsightName name, Map stateMetadata, String etag) + *
  • markInsightAccepted(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markInsightAcceptedCallable() + *
+ *
ListRecommendations

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • listRecommendations(ListRecommendationsRequest request) + *
+ *

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

+ *
    + *
  • listRecommendations(RecommenderName parent) + *
  • listRecommendations(String parent) + *
  • listRecommendations(RecommenderName parent, String filter) + *
  • listRecommendations(String parent, String filter) + *
+ *

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

+ *
    + *
  • listRecommendationsPagedCallable() + *
  • listRecommendationsCallable() + *
+ *
GetRecommendation

Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • getRecommendation(GetRecommendationRequest request) + *
+ *

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

+ *
    + *
  • getRecommendation(RecommendationName name) + *
  • getRecommendation(String name) + *
+ *

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

+ *
    + *
  • getRecommendationCallable() + *
+ *
MarkRecommendationDismissed

Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. + *

MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. + *

Requires the recommender.*.update IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • markRecommendationDismissed(MarkRecommendationDismissedRequest request) + *
+ *

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

+ *
    + *
  • markRecommendationDismissedCallable() + *
+ *
MarkRecommendationClaimed

Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. + *

MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state. + *

Requires the recommender.*.update IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • markRecommendationClaimed(MarkRecommendationClaimedRequest request) + *
+ *

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

+ *
    + *
  • markRecommendationClaimed(RecommendationName name, Map stateMetadata, String etag) + *
  • markRecommendationClaimed(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markRecommendationClaimedCallable() + *
+ *
MarkRecommendationSucceeded

Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. + *

MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. + *

Requires the recommender.*.update IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • markRecommendationSucceeded(MarkRecommendationSucceededRequest request) + *
+ *

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

+ *
    + *
  • markRecommendationSucceeded(RecommendationName name, Map stateMetadata, String etag) + *
  • markRecommendationSucceeded(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markRecommendationSucceededCallable() + *
+ *
MarkRecommendationFailed

Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. + *

MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. + *

Requires the recommender.*.update IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • markRecommendationFailed(MarkRecommendationFailedRequest request) + *
+ *

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

+ *
    + *
  • markRecommendationFailed(RecommendationName name, Map stateMetadata, String etag) + *
  • markRecommendationFailed(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markRecommendationFailedCallable() + *
+ *
GetRecommenderConfig

Gets the requested Recommender Config. There is only one instance of the config for each Recommender.

+ *

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

+ *
    + *
  • getRecommenderConfig(GetRecommenderConfigRequest request) + *
+ *

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

+ *
    + *
  • getRecommenderConfig(RecommenderConfigName name) + *
  • getRecommenderConfig(String name) + *
+ *

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

+ *
    + *
  • getRecommenderConfigCallable() + *
+ *
UpdateRecommenderConfig

Updates a Recommender Config. This will create a new revision of the config.

+ *

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

+ *
    + *
  • updateRecommenderConfig(UpdateRecommenderConfigRequest request) + *
+ *

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

+ *
    + *
  • updateRecommenderConfig(RecommenderConfig recommenderConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateRecommenderConfigCallable() + *
+ *
GetInsightTypeConfig

Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.

+ *

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

+ *
    + *
  • getInsightTypeConfig(GetInsightTypeConfigRequest request) + *
+ *

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

+ *
    + *
  • getInsightTypeConfig(InsightTypeConfigName name) + *
  • getInsightTypeConfig(String name) + *
+ *

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

+ *
    + *
  • getInsightTypeConfigCallable() + *
+ *
UpdateInsightTypeConfig

Updates an InsightTypeConfig change. This will create a new revision of the config.

+ *

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

+ *
    + *
  • updateInsightTypeConfig(UpdateInsightTypeConfigRequest request) + *
+ *

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

+ *
    + *
  • updateInsightTypeConfig(InsightTypeConfig insightTypeConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateInsightTypeConfigCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/stub/RecommenderStubSettings.java b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/stub/RecommenderStubSettings.java index 1311a531eec2..d7cc5e82db0d 100644 --- a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/stub/RecommenderStubSettings.java +++ b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1/stub/RecommenderStubSettings.java @@ -348,6 +348,12 @@ public RecommenderStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "recommender"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/RecommenderClient.java b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/RecommenderClient.java index 8c3a441f08dd..a4a6588e1651 100644 --- a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/RecommenderClient.java +++ b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/RecommenderClient.java @@ -62,19 +62,278 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListInsights

Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.

+ *

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

+ *
    + *
  • listInsights(ListInsightsRequest request) + *
+ *

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

+ *
    + *
  • listInsights(InsightTypeName parent) + *
  • listInsights(String parent) + *
+ *

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

+ *
    + *
  • listInsightsPagedCallable() + *
  • listInsightsCallable() + *
+ *
GetInsight

Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.

+ *

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

+ *
    + *
  • getInsight(GetInsightRequest request) + *
+ *

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

+ *
    + *
  • getInsight(InsightName name) + *
  • getInsight(String name) + *
+ *

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

+ *
    + *
  • getInsightCallable() + *
+ *
MarkInsightAccepted

Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. + *

MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.

+ *

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

+ *
    + *
  • markInsightAccepted(MarkInsightAcceptedRequest request) + *
+ *

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

+ *
    + *
  • markInsightAccepted(InsightName name, Map stateMetadata, String etag) + *
  • markInsightAccepted(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markInsightAcceptedCallable() + *
+ *
ListRecommendations

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • listRecommendations(ListRecommendationsRequest request) + *
+ *

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

+ *
    + *
  • listRecommendations(RecommenderName parent, String filter) + *
  • listRecommendations(String parent, String filter) + *
+ *

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

+ *
    + *
  • listRecommendationsPagedCallable() + *
  • listRecommendationsCallable() + *
+ *
GetRecommendation

Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • getRecommendation(GetRecommendationRequest request) + *
+ *

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

+ *
    + *
  • getRecommendation(RecommendationName name) + *
  • getRecommendation(String name) + *
+ *

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

+ *
    + *
  • getRecommendationCallable() + *
+ *
MarkRecommendationClaimed

Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. + *

MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. + *

Requires the recommender.*.update IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • markRecommendationClaimed(MarkRecommendationClaimedRequest request) + *
+ *

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

+ *
    + *
  • markRecommendationClaimed(RecommendationName name, Map stateMetadata, String etag) + *
  • markRecommendationClaimed(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markRecommendationClaimedCallable() + *
+ *
MarkRecommendationSucceeded

Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. + *

MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. + *

Requires the recommender.*.update IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • markRecommendationSucceeded(MarkRecommendationSucceededRequest request) + *
+ *

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

+ *
    + *
  • markRecommendationSucceeded(RecommendationName name, Map stateMetadata, String etag) + *
  • markRecommendationSucceeded(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markRecommendationSucceededCallable() + *
+ *
MarkRecommendationFailed

Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. + *

MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. + *

Requires the recommender.*.update IAM permission for the specified recommender.

+ *

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

+ *
    + *
  • markRecommendationFailed(MarkRecommendationFailedRequest request) + *
+ *

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

+ *
    + *
  • markRecommendationFailed(RecommendationName name, Map stateMetadata, String etag) + *
  • markRecommendationFailed(String name, Map stateMetadata, String etag) + *
+ *

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

+ *
    + *
  • markRecommendationFailedCallable() + *
+ *
GetRecommenderConfig

Gets the requested Recommender Config. There is only one instance of the config for each Recommender.

+ *

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

+ *
    + *
  • getRecommenderConfig(GetRecommenderConfigRequest request) + *
+ *

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

+ *
    + *
  • getRecommenderConfig(RecommenderConfigName name) + *
  • getRecommenderConfig(String name) + *
+ *

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

+ *
    + *
  • getRecommenderConfigCallable() + *
+ *
UpdateRecommenderConfig

Updates a Recommender Config. This will create a new revision of the config.

+ *

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

+ *
    + *
  • updateRecommenderConfig(UpdateRecommenderConfigRequest request) + *
+ *

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

+ *
    + *
  • updateRecommenderConfig(RecommenderConfig recommenderConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateRecommenderConfigCallable() + *
+ *
GetInsightTypeConfig

Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.

+ *

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

+ *
    + *
  • getInsightTypeConfig(GetInsightTypeConfigRequest request) + *
+ *

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

+ *
    + *
  • getInsightTypeConfig(InsightTypeConfigName name) + *
  • getInsightTypeConfig(String name) + *
+ *

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

+ *
    + *
  • getInsightTypeConfigCallable() + *
+ *
UpdateInsightTypeConfig

Updates an InsightTypeConfig change. This will create a new revision of the config.

+ *

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

+ *
    + *
  • updateInsightTypeConfig(UpdateInsightTypeConfigRequest request) + *
+ *

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

+ *
    + *
  • updateInsightTypeConfig(InsightTypeConfig insightTypeConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateInsightTypeConfigCallable() + *
+ *
ListRecommenders

Lists all available Recommenders. No IAM permissions are required.

+ *

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

+ *
    + *
  • listRecommenders(ListRecommendersRequest request) + *
+ *

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

+ *
    + *
  • listRecommendersPagedCallable() + *
  • listRecommendersCallable() + *
+ *
ListInsightTypes

Lists available InsightTypes. No IAM permissions are required.

+ *

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

+ *
    + *
  • listInsightTypes(ListInsightTypesRequest request) + *
+ *

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

+ *
    + *
  • listInsightTypesPagedCallable() + *
  • listInsightTypesCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/stub/RecommenderStubSettings.java b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/stub/RecommenderStubSettings.java index 3aed951873e6..89552481dab2 100644 --- a/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/stub/RecommenderStubSettings.java +++ b/java-recommender/google-cloud-recommender/src/main/java/com/google/cloud/recommender/v1beta1/stub/RecommenderStubSettings.java @@ -486,6 +486,12 @@ public RecommenderStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "recommender"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-redis-cluster/README.md b/java-redis-cluster/README.md index 0fd1bc5fd4e1..35e3b503a5fb 100644 --- a/java-redis-cluster/README.md +++ b/java-redis-cluster/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-redis-cluster.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis-cluster/0.2.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis-cluster/0.4.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java index f0115cbf62cd..6b24e9f93888 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java @@ -95,19 +95,147 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListClusters

Lists all Redis clusters owned by a project in either the specified location (region) or all locations. + *

The location should have the following format: + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ *

If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.

+ *

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

+ *
    + *
  • listClusters(ListClustersRequest request) + *
+ *

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

+ *
    + *
  • listClusters(LocationName parent) + *
  • listClusters(String parent) + *
+ *

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

+ *
    + *
  • listClustersPagedCallable() + *
  • listClustersCallable() + *
+ *
GetCluster

Gets the details of a specific Redis cluster.

+ *

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

+ *
    + *
  • getCluster(GetClusterRequest request) + *
+ *

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

+ *
    + *
  • getCluster(ClusterName name) + *
  • getCluster(String name) + *
+ *

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

+ *
    + *
  • getClusterCallable() + *
+ *
UpdateCluster

Updates the metadata and configuration of a specific Redis cluster. + *

Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • updateClusterAsync(UpdateClusterRequest request) + *
+ *

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

+ *
    + *
  • updateClusterAsync(Cluster cluster, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateClusterOperationCallable() + *
  • updateClusterCallable() + *
+ *
DeleteCluster

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

+ *

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

+ *
    + *
  • deleteClusterAsync(DeleteClusterRequest request) + *
+ *

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

+ *
    + *
  • deleteClusterAsync(ClusterName name) + *
  • deleteClusterAsync(String name) + *
+ *

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

+ *
    + *
  • deleteClusterOperationCallable() + *
  • deleteClusterCallable() + *
+ *
CreateCluster

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • createClusterAsync(CreateClusterRequest request) + *
+ *

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

+ *
    + *
  • createClusterAsync(LocationName parent, Cluster cluster, String clusterId) + *
  • createClusterAsync(String parent, Cluster cluster, String clusterId) + *
+ *

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

+ *
    + *
  • createClusterOperationCallable() + *
  • createClusterCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java index 1ba7d6c98ef1..02508cb6a558 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java @@ -309,6 +309,12 @@ public CloudRedisClusterStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "redis"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java index d35582686025..2b1de0db7fca 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java @@ -95,19 +95,147 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListClusters

Lists all Redis clusters owned by a project in either the specified location (region) or all locations. + *

The location should have the following format: + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ *

If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.

+ *

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

+ *
    + *
  • listClusters(ListClustersRequest request) + *
+ *

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

+ *
    + *
  • listClusters(LocationName parent) + *
  • listClusters(String parent) + *
+ *

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

+ *
    + *
  • listClustersPagedCallable() + *
  • listClustersCallable() + *
+ *
GetCluster

Gets the details of a specific Redis cluster.

+ *

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

+ *
    + *
  • getCluster(GetClusterRequest request) + *
+ *

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

+ *
    + *
  • getCluster(ClusterName name) + *
  • getCluster(String name) + *
+ *

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

+ *
    + *
  • getClusterCallable() + *
+ *
UpdateCluster

Updates the metadata and configuration of a specific Redis cluster. + *

Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • updateClusterAsync(UpdateClusterRequest request) + *
+ *

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

+ *
    + *
  • updateClusterAsync(Cluster cluster, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateClusterOperationCallable() + *
  • updateClusterCallable() + *
+ *
DeleteCluster

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

+ *

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

+ *
    + *
  • deleteClusterAsync(DeleteClusterRequest request) + *
+ *

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

+ *
    + *
  • deleteClusterAsync(ClusterName name) + *
  • deleteClusterAsync(String name) + *
+ *

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

+ *
    + *
  • deleteClusterOperationCallable() + *
  • deleteClusterCallable() + *
+ *
CreateCluster

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • createClusterAsync(CreateClusterRequest request) + *
+ *

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

+ *
    + *
  • createClusterAsync(LocationName parent, Cluster cluster, String clusterId) + *
  • createClusterAsync(String parent, Cluster cluster, String clusterId) + *
+ *

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

+ *
    + *
  • createClusterOperationCallable() + *
  • createClusterCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java index 045bc3764483..e0a11ddac07f 100644 --- a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java @@ -310,6 +310,12 @@ public CloudRedisClusterStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "redis"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-redis/README.md b/java-redis/README.md index c476afa78098..09f0e51ea762 100644 --- a/java-redis/README.md +++ b/java-redis/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-redis.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis/2.33.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis/2.35.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java index b7f88626d02d..ff76cc260c50 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java @@ -85,19 +85,270 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListInstances

Lists all Redis instances owned by a project in either the specified location (region) or all locations. + *

The location should have the following format: + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ *

If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.

+ *

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

+ *
    + *
  • listInstances(ListInstancesRequest request) + *
+ *

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

+ *
    + *
  • listInstances(LocationName parent) + *
  • listInstances(String parent) + *
+ *

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

+ *
    + *
  • listInstancesPagedCallable() + *
  • listInstancesCallable() + *
+ *
GetInstance

Gets the details of a specific Redis instance.

+ *

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

+ *
    + *
  • getInstance(GetInstanceRequest request) + *
+ *

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

+ *
    + *
  • getInstance(InstanceName name) + *
  • getInstance(String name) + *
+ *

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

+ *
    + *
  • getInstanceCallable() + *
+ *
GetInstanceAuthString

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

+ *

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

+ *
    + *
  • getInstanceAuthString(GetInstanceAuthStringRequest request) + *
+ *

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

+ *
    + *
  • getInstanceAuthString(InstanceName name) + *
  • getInstanceAuthString(String name) + *
+ *

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

+ *
    + *
  • getInstanceAuthStringCallable() + *
+ *
CreateInstance

Creates a Redis instance based on the specified tier and memory size. + *

By default, the instance is accessible from the project's [default network](https://cloud.google.com/vpc/docs/vpc). + *

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • createInstanceAsync(CreateInstanceRequest request) + *
+ *

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

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

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

+ *
    + *
  • createInstanceOperationCallable() + *
  • createInstanceCallable() + *
+ *
UpdateInstance

Updates the metadata and configuration of a specific Redis instance. + *

Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • updateInstanceAsync(UpdateInstanceRequest request) + *
+ *

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

+ *
    + *
  • updateInstanceAsync(FieldMask updateMask, Instance instance) + *
+ *

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

+ *
    + *
  • updateInstanceOperationCallable() + *
  • updateInstanceCallable() + *
+ *
UpgradeInstance

Upgrades Redis instance to the newer Redis version specified in the request.

+ *

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

+ *
    + *
  • upgradeInstanceAsync(UpgradeInstanceRequest request) + *
+ *

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

+ *
    + *
  • upgradeInstanceAsync(InstanceName name, String redisVersion) + *
  • upgradeInstanceAsync(String name, String redisVersion) + *
+ *

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

+ *
    + *
  • upgradeInstanceOperationCallable() + *
  • upgradeInstanceCallable() + *
+ *
ImportInstance

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. + *

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • importInstanceAsync(ImportInstanceRequest request) + *
+ *

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

+ *
    + *
  • importInstanceAsync(String name, InputConfig inputConfig) + *
+ *

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

+ *
    + *
  • importInstanceOperationCallable() + *
  • importInstanceCallable() + *
+ *
ExportInstance

Export Redis instance data into a Redis RDB format file in Cloud Storage. + *

Redis will continue serving during this operation. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • exportInstanceAsync(ExportInstanceRequest request) + *
+ *

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

+ *
    + *
  • exportInstanceAsync(String name, OutputConfig outputConfig) + *
+ *

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

+ *
    + *
  • exportInstanceOperationCallable() + *
  • exportInstanceCallable() + *
+ *
FailoverInstance

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

+ *

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

+ *
    + *
  • failoverInstanceAsync(FailoverInstanceRequest request) + *
+ *

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

+ *
    + *
  • failoverInstanceAsync(InstanceName name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) + *
  • failoverInstanceAsync(String name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) + *
+ *

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

+ *
    + *
  • failoverInstanceOperationCallable() + *
  • failoverInstanceCallable() + *
+ *
DeleteInstance

Deletes a specific Redis instance. Instance stops serving and data is deleted.

+ *

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

+ *
    + *
  • deleteInstanceAsync(DeleteInstanceRequest request) + *
+ *

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

+ *
    + *
  • deleteInstanceAsync(InstanceName name) + *
  • deleteInstanceAsync(String name) + *
+ *

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

+ *
    + *
  • deleteInstanceOperationCallable() + *
  • deleteInstanceCallable() + *
+ *
RescheduleMaintenance

Reschedule maintenance for a given 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.

+ *
    + *
  • rescheduleMaintenanceAsync(RescheduleMaintenanceRequest request) + *
+ *

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

+ *
    + *
  • rescheduleMaintenanceAsync(InstanceName name, RescheduleMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime) + *
  • rescheduleMaintenanceAsync(String name, RescheduleMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime) + *
+ *

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

+ *
    + *
  • rescheduleMaintenanceOperationCallable() + *
  • rescheduleMaintenanceCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

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

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java index e97822c6233e..e0db7dcaf660 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java @@ -395,6 +395,12 @@ public CloudRedisStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "redis"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java index fb9a41852bf7..1edf9f312927 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/CloudRedisClient.java @@ -82,19 +82,241 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListInstances

Lists all Redis instances owned by a project in either the specified location (region) or all locations. + *

The location should have the following format: + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ *

If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.

+ *

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

+ *
    + *
  • listInstances(ListInstancesRequest request) + *
+ *

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

+ *
    + *
  • listInstances(LocationName parent) + *
  • listInstances(String parent) + *
+ *

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

+ *
    + *
  • listInstancesPagedCallable() + *
  • listInstancesCallable() + *
+ *
GetInstance

Gets the details of a specific Redis instance.

+ *

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

+ *
    + *
  • getInstance(GetInstanceRequest request) + *
+ *

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

+ *
    + *
  • getInstance(InstanceName name) + *
  • getInstance(String name) + *
+ *

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

+ *
    + *
  • getInstanceCallable() + *
+ *
GetInstanceAuthString

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

+ *

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

+ *
    + *
  • getInstanceAuthString(GetInstanceAuthStringRequest request) + *
+ *

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

+ *
    + *
  • getInstanceAuthString(InstanceName name) + *
  • getInstanceAuthString(String name) + *
+ *

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

+ *
    + *
  • getInstanceAuthStringCallable() + *
+ *
CreateInstance

Creates a Redis instance based on the specified tier and memory size. + *

By default, the instance is accessible from the project's [default network](https://cloud.google.com/vpc/docs/vpc). + *

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. The completed longrunning.Operation will contain the new instance object in the response field. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • createInstanceAsync(CreateInstanceRequest request) + *
+ *

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

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

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

+ *
    + *
  • createInstanceOperationCallable() + *
  • createInstanceCallable() + *
+ *
UpdateInstance

Updates the metadata and configuration of a specific Redis instance. + *

Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • updateInstanceAsync(UpdateInstanceRequest request) + *
+ *

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

+ *
    + *
  • updateInstanceAsync(FieldMask updateMask, Instance instance) + *
+ *

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

+ *
    + *
  • updateInstanceOperationCallable() + *
  • updateInstanceCallable() + *
+ *
UpgradeInstance

Upgrades Redis instance to the newer Redis version specified in the request.

+ *

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

+ *
    + *
  • upgradeInstanceAsync(UpgradeInstanceRequest request) + *
+ *

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

+ *
    + *
  • upgradeInstanceAsync(InstanceName name, String redisVersion) + *
  • upgradeInstanceAsync(String name, String redisVersion) + *
+ *

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

+ *
    + *
  • upgradeInstanceOperationCallable() + *
  • upgradeInstanceCallable() + *
+ *
ImportInstance

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. + *

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • importInstanceAsync(ImportInstanceRequest request) + *
+ *

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

+ *
    + *
  • importInstanceAsync(String name, InputConfig inputConfig) + *
+ *

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

+ *
    + *
  • importInstanceOperationCallable() + *
  • importInstanceCallable() + *
+ *
ExportInstance

Export Redis instance data into a Redis RDB format file in Cloud Storage. + *

Redis will continue serving during this operation. + *

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

+ *

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

+ *
    + *
  • exportInstanceAsync(ExportInstanceRequest request) + *
+ *

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

+ *
    + *
  • exportInstanceAsync(String name, OutputConfig outputConfig) + *
+ *

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

+ *
    + *
  • exportInstanceOperationCallable() + *
  • exportInstanceCallable() + *
+ *
FailoverInstance

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

+ *

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

+ *
    + *
  • failoverInstanceAsync(FailoverInstanceRequest request) + *
+ *

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

+ *
    + *
  • failoverInstanceAsync(InstanceName name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) + *
  • failoverInstanceAsync(String name, FailoverInstanceRequest.DataProtectionMode dataProtectionMode) + *
+ *

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

+ *
    + *
  • failoverInstanceOperationCallable() + *
  • failoverInstanceCallable() + *
+ *
DeleteInstance

Deletes a specific Redis instance. Instance stops serving and data is deleted.

+ *

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

+ *
    + *
  • deleteInstanceAsync(DeleteInstanceRequest request) + *
+ *

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

+ *
    + *
  • deleteInstanceAsync(InstanceName name) + *
  • deleteInstanceAsync(String name) + *
+ *

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

+ *
    + *
  • deleteInstanceOperationCallable() + *
  • deleteInstanceCallable() + *
+ *
RescheduleMaintenance

Reschedule maintenance for a given 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.

+ *
    + *
  • rescheduleMaintenanceAsync(RescheduleMaintenanceRequest request) + *
+ *

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

+ *
    + *
  • rescheduleMaintenanceAsync(InstanceName name, RescheduleMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime) + *
  • rescheduleMaintenanceAsync(String name, RescheduleMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime) + *
+ *

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

+ *
    + *
  • rescheduleMaintenanceOperationCallable() + *
  • rescheduleMaintenanceCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java index 339bf1845912..be52b543dd33 100644 --- a/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java +++ b/java-redis/google-cloud-redis/src/main/java/com/google/cloud/redis/v1beta1/stub/CloudRedisStubSettings.java @@ -323,6 +323,12 @@ public CloudRedisStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "redis"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resource-settings/README.md b/java-resource-settings/README.md index 3d49a9b9dfcf..e0615d82ea8d 100644 --- a/java-resource-settings/README.md +++ b/java-resource-settings/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-resource-settings.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resource-settings/1.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resource-settings/1.32.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/ResourceSettingsServiceClient.java b/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/ResourceSettingsServiceClient.java index 10c3810cd7a4..de623f15f976 100644 --- a/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/ResourceSettingsServiceClient.java +++ b/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/ResourceSettingsServiceClient.java @@ -68,19 +68,70 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListSettings

Lists all the settings that are available on the Cloud resource `parent`.

+ *

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

+ *
    + *
  • listSettings(ListSettingsRequest request) + *
+ *

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

+ *
    + *
  • listSettings(ResourceName parent) + *
  • listSettings(String parent) + *
+ *

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

+ *
    + *
  • listSettingsPagedCallable() + *
  • listSettingsCallable() + *
+ *
GetSetting

Gets a setting. + *

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.

+ *

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

+ *
    + *
  • getSetting(GetSettingRequest request) + *
+ *

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

+ *
    + *
  • getSetting(SettingName name) + *
  • getSetting(String name) + *
+ *

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

+ *
    + *
  • getSettingCallable() + *
+ *
UpdateSetting

Updates a setting. + *

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. + *

On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. + *

Note: the supplied setting will perform a full overwrite of the `local_value` field.

+ *

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

+ *
    + *
  • updateSetting(UpdateSettingRequest request) + *
+ *

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

+ *
    + *
  • updateSettingCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/stub/ResourceSettingsServiceStubSettings.java b/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/stub/ResourceSettingsServiceStubSettings.java index ca6d4d71f082..7dfe2b07677e 100644 --- a/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/stub/ResourceSettingsServiceStubSettings.java +++ b/java-resource-settings/google-cloud-resource-settings/src/main/java/com/google/cloud/resourcesettings/v1/stub/ResourceSettingsServiceStubSettings.java @@ -194,6 +194,12 @@ public ResourceSettingsServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "resourcesettings"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resourcemanager/README.md b/java-resourcemanager/README.md index d9a461cc3ec1..d86e87fb301f 100644 --- a/java-resourcemanager/README.md +++ b/java-resourcemanager/README.md @@ -336,7 +336,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-resourcemanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resourcemanager/1.33.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resourcemanager/1.34.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java index 69669994052f..a843107a7eee 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java @@ -67,19 +67,236 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetFolder

Retrieves a folder identified by the supplied resource name. Valid folder resource names have the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have `resourcemanager.folders.get` permission on the identified folder.

+ *

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

+ *
    + *
  • getFolder(GetFolderRequest request) + *
+ *

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

+ *
    + *
  • getFolder(FolderName name) + *
  • getFolder(String name) + *
+ *

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

+ *
    + *
  • getFolderCallable() + *
+ *
ListFolders

Lists the folders that are direct descendants of supplied parent resource. `list()` provides a strongly consistent view of the folders underneath the specified parent resource. `list()` returns folders sorted based upon the (ascending) lexical ordering of their display_name. The caller must have `resourcemanager.folders.list` permission on the identified parent.

+ *

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

+ *
    + *
  • listFolders(ListFoldersRequest request) + *
+ *

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

+ *
    + *
  • listFolders(ResourceName parent) + *
  • listFolders(String parent) + *
+ *

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

+ *
    + *
  • listFoldersPagedCallable() + *
  • listFoldersCallable() + *
+ *
SearchFolders

Search for folders that match specific filter criteria. `search()` provides an eventually consistent view of the folders a user has access to which meet the specified filter criteria. + *

This will only return folders on which the caller has the permission `resourcemanager.folders.get`.

+ *

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

+ *
    + *
  • searchFolders(SearchFoldersRequest request) + *
+ *

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

+ *
    + *
  • searchFolders(String query) + *
+ *

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

+ *
    + *
  • searchFoldersPagedCallable() + *
  • searchFoldersCallable() + *
+ *
CreateFolder

Creates a folder in the resource hierarchy. Returns an `Operation` which can be used to track the progress of the folder creation workflow. Upon success, the `Operation.response` field will be populated with the created Folder. + *

In order to succeed, the addition of this new folder must not violate the folder naming, height, or fanout constraints. + *

+ The folder's `display_name` must be distinct from all other folders that share its parent. + The addition of the folder must not cause the active folder hierarchy to exceed a height of 10. Note, the full active + deleted folder hierarchy is allowed to reach a height of 20; this provides additional headroom when moving folders that contain deleted folders. + The addition of the folder must not cause the total number of folders under its parent to exceed 300. + *

If the operation fails due to a folder constraint violation, some errors may be returned by the `CreateFolder` request, with status code `FAILED_PRECONDITION` and an error description. Other folder constraint violations will be communicated in the `Operation`, with the specific `PreconditionFailure` returned in the details list in the `Operation.error` field. + *

The caller must have `resourcemanager.folders.create` permission on the identified parent.

+ *

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

+ *
    + *
  • createFolderAsync(CreateFolderRequest request) + *
+ *

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

+ *
    + *
  • createFolderAsync(Folder folder) + *
+ *

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

+ *
    + *
  • createFolderOperationCallable() + *
  • createFolderCallable() + *
+ *
UpdateFolder

Updates a folder, changing its `display_name`. Changes to the folder `display_name` will be rejected if they violate either the `display_name` formatting rules or the naming constraints described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. + *

The folder's `display_name` must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is captured by the regular expression: `[\\\\p{L}\\\\p{N}][\\\\p{L}\\\\p{N}_- ]{1,28}[\\\\p{L}\\\\p{N}]`. The caller must have `resourcemanager.folders.update` permission on the identified folder. + *

If the update fails due to the unique name constraint then a `PreconditionFailure` explaining this violation will be returned in the Status.details field.

+ *

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

+ *
    + *
  • updateFolderAsync(UpdateFolderRequest request) + *
+ *

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

+ *
    + *
  • updateFolderAsync(Folder folder, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateFolderOperationCallable() + *
  • updateFolderCallable() + *
+ *
MoveFolder

Moves a folder under a new resource parent. Returns an `Operation` which can be used to track the progress of the folder move workflow. Upon success, the `Operation.response` field will be populated with the moved folder. Upon failure, a `FolderOperationError` categorizing the failure cause will be returned - if the failure occurs synchronously then the `FolderOperationError` will be returned in the `Status.details` field. If it occurs asynchronously, then the FolderOperation will be returned in the `Operation.error` field. In addition, the `Operation.metadata` field will be populated with a `FolderOperation` message as an aid to stateless clients. Folder moves will be rejected if they violate either the naming, height, or fanout constraints described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. The caller must have `resourcemanager.folders.move` permission on the folder's current and proposed new parent.

+ *

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

+ *
    + *
  • moveFolderAsync(MoveFolderRequest request) + *
+ *

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

+ *
    + *
  • moveFolderAsync(FolderName name, ResourceName destinationParent) + *
  • moveFolderAsync(FolderName name, String destinationParent) + *
  • moveFolderAsync(String name, ResourceName destinationParent) + *
  • moveFolderAsync(String name, String destinationParent) + *
+ *

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

+ *
    + *
  • moveFolderOperationCallable() + *
  • moveFolderCallable() + *
+ *
DeleteFolder

Requests deletion of a folder. The folder is moved into the [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state immediately, and is deleted approximately 30 days later. This method may only be called on an empty folder, where a folder is empty if it doesn't contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state the operation will result in a no-op success. The caller must have `resourcemanager.folders.delete` permission on the identified folder.

+ *

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

+ *
    + *
  • deleteFolderAsync(DeleteFolderRequest request) + *
+ *

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

+ *
    + *
  • deleteFolderAsync(FolderName name) + *
  • deleteFolderAsync(String name) + *
+ *

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

+ *
    + *
  • deleteFolderOperationCallable() + *
  • deleteFolderCallable() + *
+ *
UndeleteFolder

Cancels the deletion request for a folder. This method may be called on a folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the result will be a no-op success. In order to succeed, the folder's parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition, reintroducing the folder into the tree must not violate folder naming, height, and fanout constraints described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. The caller must have `resourcemanager.folders.undelete` permission on the identified folder.

+ *

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

+ *
    + *
  • undeleteFolderAsync(UndeleteFolderRequest request) + *
+ *

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

+ *
    + *
  • undeleteFolderAsync(FolderName name) + *
  • undeleteFolderAsync(String name) + *
+ *

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

+ *
    + *
  • undeleteFolderOperationCallable() + *
  • undeleteFolderCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a folder. The returned policy may be empty if no such policy or resource exists. The `resource` field should be the folder's resource name, for example: "folders/1234". The caller must have `resourcemanager.folders.getIamPolicy` permission on the identified folder.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the access control policy on a folder, replacing any existing policy. The `resource` field should be the folder's resource name, for example: "folders/1234". The caller must have `resourcemanager.folders.setIamPolicy` permission on the identified folder.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified folder. The `resource` field should be the folder's resource name, for example: "folders/1234". + *

There are no permissions required for making this API call.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java index fee4fc9b56e3..09a2f5752a1e 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationsClient.java @@ -60,19 +60,112 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetOrganization

Fetches an organization resource identified by the specified resource name.

+ *

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

+ *
    + *
  • getOrganization(GetOrganizationRequest request) + *
+ *

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

+ *
    + *
  • getOrganization(OrganizationName name) + *
  • getOrganization(String name) + *
+ *

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

+ *
    + *
  • getOrganizationCallable() + *
+ *
SearchOrganizations

Searches organization resources that are visible to the user and satisfy the specified filter. This method returns organizations in an unspecified order. New organizations do not necessarily appear at the end of the results, and may take a small amount of time to appear. + *

Search will only return organizations on which the user has the permission `resourcemanager.organizations.get`

+ *

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

+ *
    + *
  • searchOrganizations(SearchOrganizationsRequest request) + *
+ *

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

+ *
    + *
  • searchOrganizations(String query) + *
+ *

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

+ *
    + *
  • searchOrganizationsPagedCallable() + *
  • searchOrganizationsCallable() + *
+ *
GetIamPolicy

Gets the access control policy for an organization resource. The policy may be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, for example: "organizations/123". + *

Authorization requires the IAM permission `resourcemanager.organizations.getIamPolicy` on the specified organization.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the access control policy on an organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, for example: "organizations/123". + *

Authorization requires the IAM permission `resourcemanager.organizations.setIamPolicy` on the specified organization.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicy(ResourceName resource) + *
  • setIamPolicy(String resource) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns the permissions that a caller has on the specified organization. The `resource` field should be the organization's resource name, for example: "organizations/123". + *

There are no permissions required for making this API call.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java index 0df14aeff5b3..1fea16e05a3d 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java @@ -66,19 +66,251 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetProject

Retrieves the project identified by the specified `name` (for example, `projects/415104041262`). + *

The caller must have `resourcemanager.projects.get` permission for this project.

+ *

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

+ *
    + *
  • getProject(GetProjectRequest request) + *
+ *

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

+ *
    + *
  • getProject(ProjectName name) + *
  • getProject(String name) + *
+ *

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

+ *
    + *
  • getProjectCallable() + *
+ *
ListProjects

Lists projects that are direct children of the specified folder or organization resource. `list()` provides a strongly consistent view of the projects underneath the specified parent resource. `list()` returns projects sorted based upon the (ascending) lexical ordering of their `display_name`. The caller must have `resourcemanager.projects.list` permission on the identified parent.

+ *

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

+ *
    + *
  • listProjects(ListProjectsRequest request) + *
+ *

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

+ *
    + *
  • listProjects(ResourceName parent) + *
  • listProjects(String parent) + *
+ *

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

+ *
    + *
  • listProjectsPagedCallable() + *
  • listProjectsCallable() + *
+ *
SearchProjects

Search for projects that the caller has both `resourcemanager.projects.get` permission on, and also satisfy the specified query. + *

This method returns projects in an unspecified order. + *

This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.

+ *

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

+ *
    + *
  • searchProjects(SearchProjectsRequest request) + *
+ *

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

+ *
    + *
  • searchProjects(String query) + *
+ *

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

+ *
    + *
  • searchProjectsPagedCallable() + *
  • searchProjectsCallable() + *
+ *
CreateProject

Request that a new project be created. The result is an `Operation` which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking `Operation` is automatically deleted after a few hours, so there is no need to call `DeleteOperation`.

+ *

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

+ *
    + *
  • createProjectAsync(CreateProjectRequest request) + *
+ *

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

+ *
    + *
  • createProjectAsync(Project project) + *
+ *

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

+ *
    + *
  • createProjectOperationCallable() + *
  • createProjectCallable() + *
+ *
UpdateProject

Updates the `display_name` and labels of the project identified by the specified `name` (for example, `projects/415104041262`). Deleting all labels requires an update mask for labels field. + *

The caller must have `resourcemanager.projects.update` permission for this project.

+ *

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

+ *
    + *
  • updateProjectAsync(UpdateProjectRequest request) + *
+ *

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

+ *
    + *
  • updateProjectAsync(Project project, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateProjectOperationCallable() + *
  • updateProjectCallable() + *
+ *
MoveProject

Move a project to another place in your resource hierarchy, under a new resource parent. + *

Returns an operation which can be used to track the process of the project move workflow. Upon success, the `Operation.response` field will be populated with the moved project. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the project's current and proposed new parent. + *

If project has no current parent, or it currently does not have an associated organization resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the project.

+ *

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

+ *
    + *
  • moveProjectAsync(MoveProjectRequest request) + *
+ *

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

+ *
    + *
  • moveProjectAsync(ProjectName name, ResourceName destinationParent) + *
  • moveProjectAsync(ProjectName name, String destinationParent) + *
  • moveProjectAsync(String name, ResourceName destinationParent) + *
  • moveProjectAsync(String name, String destinationParent) + *
+ *

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

+ *
    + *
  • moveProjectOperationCallable() + *
  • moveProjectCallable() + *
+ *
DeleteProject

Marks the project identified by the specified `name` (for example, `projects/415104041262`) for deletion. + *

This method will only affect the project if it has a lifecycle state of [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]. + *

This method changes the Project's lifecycle state from [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. The deletion starts at an unspecified time, at which point the Project is no longer accessible. + *

Until the deletion completes, you can check the lifecycle state checked by retrieving the project with [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], and the project remains visible to [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects]. However, you cannot update the project. + *

After the deletion completes, the project is not retrievable by the [GetProject] [google.cloud.resourcemanager.v3.Projects.GetProject], [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects], and [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects] methods. + *

This method behaves idempotently, such that deleting a `DELETE_REQUESTED` project will not cause an error, but also won't do anything. + *

The caller must have `resourcemanager.projects.delete` permissions for this project.

+ *

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

+ *
    + *
  • deleteProjectAsync(DeleteProjectRequest request) + *
+ *

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

+ *
    + *
  • deleteProjectAsync(ProjectName name) + *
  • deleteProjectAsync(String name) + *
+ *

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

+ *
    + *
  • deleteProjectOperationCallable() + *
  • deleteProjectCallable() + *
+ *
UndeleteProject

Restores the project identified by the specified `name` (for example, `projects/415104041262`). You can only use this method for a project that has a lifecycle state of [DELETE_REQUESTED] [Projects.State.DELETE_REQUESTED]. After deletion starts, the project cannot be restored. + *

The caller must have `resourcemanager.projects.undelete` permission for this project.

+ *

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

+ *
    + *
  • undeleteProjectAsync(UndeleteProjectRequest request) + *
+ *

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

+ *
    + *
  • undeleteProjectAsync(ProjectName name) + *
  • undeleteProjectAsync(String name) + *
+ *

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

+ *
    + *
  • undeleteProjectOperationCallable() + *
  • undeleteProjectCallable() + *
+ *
GetIamPolicy

Returns the IAM access control policy for the specified project, in the format `projects/{ProjectIdOrNumber}` e.g. projects/123. Permission is denied if the policy or the resource do not exist.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the IAM access control policy for the specified project, in the format `projects/{ProjectIdOrNumber}` e.g. projects/123. + *

CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings. + *

Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. + *

The following constraints apply when using `setIamPolicy()`: + *

+ Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + *

+ The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group{@literal @}myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + *

+ Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited using the Cloud Platform console and must accept the invitation. + *

+ A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + *

+ Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + *

+ If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an organization, you can remove all owners, potentially making the organization inaccessible.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified project, in the format `projects/{ProjectIdOrNumber}` e.g. projects/123..

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java index df73497212f9..7c97327ee418 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java @@ -64,19 +64,92 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListTagBindings

Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. + *

NOTE: The `parent` field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name

+ *

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

+ *
    + *
  • listTagBindings(ListTagBindingsRequest request) + *
+ *

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

+ *
    + *
  • listTagBindings(ResourceName parent) + *
  • listTagBindings(String parent) + *
+ *

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

+ *
    + *
  • listTagBindingsPagedCallable() + *
  • listTagBindingsCallable() + *
+ *
CreateTagBinding

Creates a TagBinding between a TagValue and a Google Cloud resource.

+ *

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

+ *
    + *
  • createTagBindingAsync(CreateTagBindingRequest request) + *
+ *

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

+ *
    + *
  • createTagBindingAsync(TagBinding tagBinding) + *
+ *

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

+ *
    + *
  • createTagBindingOperationCallable() + *
  • createTagBindingCallable() + *
+ *
DeleteTagBinding

Deletes a TagBinding.

+ *

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

+ *
    + *
  • deleteTagBindingAsync(DeleteTagBindingRequest request) + *
+ *

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

+ *
    + *
  • deleteTagBindingAsync(TagBindingName name) + *
  • deleteTagBindingAsync(String name) + *
+ *

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

+ *
    + *
  • deleteTagBindingOperationCallable() + *
  • deleteTagBindingCallable() + *
+ *
ListEffectiveTags

Return a list of effective tags for the given Google Cloud resource, as specified in `parent`.

+ *

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

+ *
    + *
  • listEffectiveTags(ListEffectiveTagsRequest request) + *
+ *

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

+ *
    + *
  • listEffectiveTags(String parent) + *
+ *

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

+ *
    + *
  • listEffectiveTagsPagedCallable() + *
  • listEffectiveTagsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java index 213cded0346c..fd7dc167fb3c 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java @@ -64,19 +64,73 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateTagHold

Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same resource and origin exists under the same TagValue.

+ *

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

+ *
    + *
  • createTagHoldAsync(CreateTagHoldRequest request) + *
+ *

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

+ *
    + *
  • createTagHoldAsync(TagValueName parent, TagHold tagHold) + *
  • createTagHoldAsync(String parent, TagHold tagHold) + *
+ *

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

+ *
    + *
  • createTagHoldOperationCallable() + *
  • createTagHoldCallable() + *
+ *
DeleteTagHold

Deletes a TagHold.

+ *

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

+ *
    + *
  • deleteTagHoldAsync(DeleteTagHoldRequest request) + *
+ *

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

+ *
    + *
  • deleteTagHoldAsync(TagHoldName name) + *
  • deleteTagHoldAsync(String name) + *
+ *

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

+ *
    + *
  • deleteTagHoldOperationCallable() + *
  • deleteTagHoldCallable() + *
+ *
ListTagHolds

Lists TagHolds under a TagValue.

+ *

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

+ *
    + *
  • listTagHolds(ListTagHoldsRequest request) + *
+ *

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

+ *
    + *
  • listTagHolds(TagValueName parent) + *
  • listTagHolds(String parent) + *
+ *

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

+ *
    + *
  • listTagHoldsPagedCallable() + *
  • listTagHoldsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java index 6a39acbf1fbb..c2656fa7fffb 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java @@ -66,19 +66,187 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListTagKeys

Lists all TagKeys for a parent resource.

+ *

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

+ *
    + *
  • listTagKeys(ListTagKeysRequest request) + *
+ *

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

+ *
    + *
  • listTagKeys(ResourceName parent) + *
  • listTagKeys(String parent) + *
+ *

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

+ *
    + *
  • listTagKeysPagedCallable() + *
  • listTagKeysCallable() + *
+ *
GetTagKey

Retrieves a TagKey. This method will return `PERMISSION_DENIED` if the key does not exist or the user does not have permission to view it.

+ *

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

+ *
    + *
  • getTagKey(GetTagKeyRequest request) + *
+ *

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

+ *
    + *
  • getTagKey(TagKeyName name) + *
  • getTagKey(String name) + *
+ *

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

+ *
    + *
  • getTagKeyCallable() + *
+ *
GetNamespacedTagKey

Retrieves a TagKey by its namespaced name. This method will return `PERMISSION_DENIED` if the key does not exist or the user does not have permission to view it.

+ *

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

+ *
    + *
  • getNamespacedTagKey(GetNamespacedTagKeyRequest request) + *
+ *

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

+ *
    + *
  • getNamespacedTagKey(TagKeyName name) + *
  • getNamespacedTagKey(String name) + *
+ *

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

+ *
    + *
  • getNamespacedTagKeyCallable() + *
+ *
CreateTagKey

Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.

+ *

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

+ *
    + *
  • createTagKeyAsync(CreateTagKeyRequest request) + *
+ *

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

+ *
    + *
  • createTagKeyAsync(TagKey tagKey) + *
+ *

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

+ *
    + *
  • createTagKeyOperationCallable() + *
  • createTagKeyCallable() + *
+ *
UpdateTagKey

Updates the attributes of the TagKey resource.

+ *

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

+ *
    + *
  • updateTagKeyAsync(UpdateTagKeyRequest request) + *
+ *

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

+ *
    + *
  • updateTagKeyAsync(TagKey tagKey, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateTagKeyOperationCallable() + *
  • updateTagKeyCallable() + *
+ *
DeleteTagKey

Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.

+ *

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

+ *
    + *
  • deleteTagKeyAsync(DeleteTagKeyRequest request) + *
+ *

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

+ *
    + *
  • deleteTagKeyAsync(TagKeyName name) + *
  • deleteTagKeyAsync(String name) + *
+ *

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

+ *
    + *
  • deleteTagKeyOperationCallable() + *
  • deleteTagKeyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a TagKey. The returned policy may be empty if no such policy or resource exists. The `resource` field should be the TagKey's resource name. For example, "tagKeys/1234". The caller must have `cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy` permission on the specified TagKey.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the access control policy on a TagKey, replacing any existing policy. The `resource` field should be the TagKey's resource name. For example, "tagKeys/1234". The caller must have `resourcemanager.tagKeys.setIamPolicy` permission on the identified tagValue.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified TagKey. The `resource` field should be the TagKey's resource name. For example, "tagKeys/1234". + *

There are no permissions required for making this API call.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java index 8932d628a1c6..6ac8bdaca3e0 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java @@ -66,19 +66,187 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListTagValues

Lists all TagValues for a specific TagKey.

+ *

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

+ *
    + *
  • listTagValues(ListTagValuesRequest request) + *
+ *

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

+ *
    + *
  • listTagValues(ResourceName parent) + *
  • listTagValues(String parent) + *
+ *

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

+ *
    + *
  • listTagValuesPagedCallable() + *
  • listTagValuesCallable() + *
+ *
GetTagValue

Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the value does not exist or the user does not have permission to view it.

+ *

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

+ *
    + *
  • getTagValue(GetTagValueRequest request) + *
+ *

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

+ *
    + *
  • getTagValue(TagValueName name) + *
  • getTagValue(String name) + *
+ *

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

+ *
    + *
  • getTagValueCallable() + *
+ *
GetNamespacedTagValue

Retrieves a TagValue by its namespaced name. This method will return `PERMISSION_DENIED` if the value does not exist or the user does not have permission to view it.

+ *

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

+ *
    + *
  • getNamespacedTagValue(GetNamespacedTagValueRequest request) + *
+ *

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

+ *
    + *
  • getNamespacedTagValue(TagValueName name) + *
  • getNamespacedTagValue(String name) + *
+ *

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

+ *
    + *
  • getNamespacedTagValueCallable() + *
+ *
CreateTagValue

Creates a TagValue as a child of the specified TagKey. If a another request with the same parameters is sent while the original request is in process the second request will receive an error. A maximum of 1000 TagValues can exist under a TagKey at any given time.

+ *

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

+ *
    + *
  • createTagValueAsync(CreateTagValueRequest request) + *
+ *

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

+ *
    + *
  • createTagValueAsync(TagValue tagValue) + *
+ *

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

+ *
    + *
  • createTagValueOperationCallable() + *
  • createTagValueCallable() + *
+ *
UpdateTagValue

Updates the attributes of the TagValue resource.

+ *

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

+ *
    + *
  • updateTagValueAsync(UpdateTagValueRequest request) + *
+ *

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

+ *
    + *
  • updateTagValueAsync(TagValue tagValue, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateTagValueOperationCallable() + *
  • updateTagValueCallable() + *
+ *
DeleteTagValue

Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.

+ *

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

+ *
    + *
  • deleteTagValueAsync(DeleteTagValueRequest request) + *
+ *

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

+ *
    + *
  • deleteTagValueAsync(TagValueName name) + *
  • deleteTagValueAsync(String name) + *
+ *

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

+ *
    + *
  • deleteTagValueOperationCallable() + *
  • deleteTagValueCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a TagValue. The returned policy may be empty if no such policy or resource exists. The `resource` field should be the TagValue's resource name. For example: `tagValues/1234`. The caller must have the `cloudresourcemanager.googleapis.com/tagValues.getIamPolicy` permission on the identified TagValue to get the access control policy.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

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

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the access control policy on a TagValue, replacing any existing policy. The `resource` field should be the TagValue's resource name. For example: `tagValues/1234`. The caller must have `resourcemanager.tagValues.setIamPolicy` permission on the identified tagValue.

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

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

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

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

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified TagValue. The `resource` field should be the TagValue's resource name. For example: `tagValues/1234`. + *

There are no permissions required for making this API call.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

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

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java index 39378e0604c7..48cd82a68720 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/FoldersStubSettings.java @@ -361,6 +361,12 @@ public FoldersStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudresourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java index d5a2fdf00082..7d3a974f3e44 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/OrganizationsStubSettings.java @@ -222,6 +222,12 @@ public OrganizationsStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudresourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java index 523411b20e85..4d566761e0a7 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/ProjectsStubSettings.java @@ -364,6 +364,12 @@ public ProjectsStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudresourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java index 07d340156cb4..ca5ebbb7f0f0 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java @@ -298,6 +298,12 @@ public TagBindingsStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudresourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java index 2b8dab04d890..6e56151f347d 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java @@ -218,6 +218,12 @@ public TagHoldsStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudresourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java index ee0acd2c1076..37b9feead882 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java @@ -271,6 +271,12 @@ public TagKeysStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudresourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java index d5f6b2ecdc93..b9aaed673894 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java @@ -273,6 +273,12 @@ public TagValuesStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudresourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/README.md b/java-retail/README.md index 8f51074cab77..41b640f278c6 100644 --- a/java-retail/README.md +++ b/java-retail/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-retail.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.26.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.34.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java index 9c3ab88a2a5e..cf0a7707fe8f 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java @@ -57,19 +57,218 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListCatalogs

Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.

+ *

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

+ *
    + *
  • listCatalogs(ListCatalogsRequest request) + *
+ *

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

+ *
    + *
  • listCatalogs(LocationName parent) + *
  • listCatalogs(String parent) + *
+ *

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

+ *
    + *
  • listCatalogsPagedCallable() + *
  • listCatalogsCallable() + *
+ *
UpdateCatalog

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

+ *

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

+ *
    + *
  • updateCatalog(UpdateCatalogRequest request) + *
+ *

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

+ *
    + *
  • updateCatalog(Catalog catalog, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCatalogCallable() + *
+ *
SetDefaultBranch

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts] will treat requests using "default_branch" to the actual branch id set as default. + *

For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to `projects/*/locations/*/catalogs/*/branches/1`. + *

Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to route the traffic to this staging branch. + *

CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. + *

More specifically: + *

    + *
  • PredictionService will only return product IDs from branch {newBranch}. + *
  • SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). + *
  • UserEventService will only join events with products from branch {newBranch}. + *
+ *

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

+ *
    + *
  • setDefaultBranch(SetDefaultBranchRequest request) + *
+ *

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

+ *
    + *
  • setDefaultBranch(CatalogName catalog) + *
  • setDefaultBranch(String catalog) + *
+ *

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

+ *
    + *
  • setDefaultBranchCallable() + *
+ *
GetDefaultBranch

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

+ *

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

+ *
    + *
  • getDefaultBranch(GetDefaultBranchRequest request) + *
+ *

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

+ *
    + *
  • getDefaultBranch(CatalogName catalog) + *
  • getDefaultBranch(String catalog) + *
+ *

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

+ *
    + *
  • getDefaultBranchCallable() + *
+ *
GetCompletionConfig

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

+ *

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

+ *
    + *
  • getCompletionConfig(GetCompletionConfigRequest request) + *
+ *

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

+ *
    + *
  • getCompletionConfig(CompletionConfigName name) + *
  • getCompletionConfig(String name) + *
+ *

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

+ *
    + *
  • getCompletionConfigCallable() + *
+ *
UpdateCompletionConfig

Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.

+ *

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

+ *
    + *
  • updateCompletionConfig(UpdateCompletionConfigRequest request) + *
+ *

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

+ *
    + *
  • updateCompletionConfig(CompletionConfig completionConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCompletionConfigCallable() + *
+ *
GetAttributesConfig

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

+ *

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

+ *
    + *
  • getAttributesConfig(GetAttributesConfigRequest request) + *
+ *

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

+ *
    + *
  • getAttributesConfig(AttributesConfigName name) + *
  • getAttributesConfig(String name) + *
+ *

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

+ *
    + *
  • getAttributesConfigCallable() + *
+ *
UpdateAttributesConfig

Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + *

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

+ *

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

+ *
    + *
  • updateAttributesConfig(UpdateAttributesConfigRequest request) + *
+ *

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

+ *
    + *
  • updateAttributesConfig(AttributesConfig attributesConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateAttributesConfigCallable() + *
+ *
AddCatalogAttribute

Adds the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + *

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.

+ *

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

+ *
    + *
  • addCatalogAttribute(AddCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • addCatalogAttributeCallable() + *
+ *
RemoveCatalogAttribute

Removes the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + *

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • removeCatalogAttribute(RemoveCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • removeCatalogAttributeCallable() + *
+ *
ReplaceCatalogAttribute

Replaces the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key]. + *

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • replaceCatalogAttribute(ReplaceCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • replaceCatalogAttributeCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java index 5c3a3a17dc90..b8099ab16ae7 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java @@ -65,19 +65,46 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CompleteQuery

Completes the specified prefix with keyword suggestions. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • completeQuery(CompleteQueryRequest request) + *
+ *

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

+ *
    + *
  • completeQueryCallable() + *
+ *
ImportCompletionData

Bulk import of processed completion dataset. + *

Request processing is asynchronous. Partial updating is not supported. + *

The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • importCompletionDataAsync(ImportCompletionDataRequest request) + *
+ *

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

+ *
    + *
  • importCompletionDataOperationCallable() + *
  • importCompletionDataCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java index d55f24ff66c7..2be7a05a26f8 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java @@ -58,19 +58,111 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateControl

Creates a Control. + *

If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS error is returned.

+ *

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

+ *
    + *
  • createControl(CreateControlRequest request) + *
+ *

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

+ *
    + *
  • createControl(CatalogName parent, Control control, String controlId) + *
  • createControl(String parent, Control control, String controlId) + *
+ *

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

+ *
    + *
  • createControlCallable() + *
+ *
DeleteControl

Deletes a Control. + *

If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • deleteControl(DeleteControlRequest request) + *
+ *

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

+ *
    + *
  • deleteControl(ControlName name) + *
  • deleteControl(String name) + *
+ *

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

+ *
    + *
  • deleteControlCallable() + *
+ *
UpdateControl

Updates a Control. + *

[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • updateControl(UpdateControlRequest request) + *
+ *

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

+ *
    + *
  • updateControl(Control control, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateControlCallable() + *
+ *
GetControl

Gets a Control.

+ *

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

+ *
    + *
  • getControl(GetControlRequest request) + *
+ *

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

+ *
    + *
  • getControl(ControlName name) + *
  • getControl(String name) + *
+ *

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

+ *
    + *
  • getControlCallable() + *
+ *
ListControls

Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].

+ *

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

+ *
    + *
  • listControls(ListControlsRequest request) + *
+ *

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

+ *
    + *
  • listControls(CatalogName parent) + *
  • listControls(String parent) + *
+ *

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

+ *
    + *
  • listControlsPagedCallable() + *
  • listControlsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ModelServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ModelServiceClient.java index 4ca5a7addf9d..9491ecd97708 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ModelServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ModelServiceClient.java @@ -73,19 +73,166 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateModel

Creates a new model.

+ *

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

+ *
    + *
  • createModelAsync(CreateModelRequest request) + *
+ *

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

+ *
    + *
  • createModelAsync(CatalogName parent, Model model) + *
  • createModelAsync(String parent, Model model) + *
+ *

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

+ *
    + *
  • createModelOperationCallable() + *
  • createModelCallable() + *
+ *
GetModel

Gets a model.

+ *

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

+ *
    + *
  • getModel(GetModelRequest request) + *
+ *

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

+ *
    + *
  • getModel(ModelName name) + *
  • getModel(String name) + *
+ *

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

+ *
    + *
  • getModelCallable() + *
+ *
PauseModel

Pauses the training of an existing model.

+ *

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

+ *
    + *
  • pauseModel(PauseModelRequest request) + *
+ *

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

+ *
    + *
  • pauseModel(ModelName name) + *
  • pauseModel(String name) + *
+ *

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

+ *
    + *
  • pauseModelCallable() + *
+ *
ResumeModel

Resumes the training of an existing model.

+ *

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

+ *
    + *
  • resumeModel(ResumeModelRequest request) + *
+ *

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

+ *
    + *
  • resumeModel(String name) + *
+ *

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

+ *
    + *
  • resumeModelCallable() + *
+ *
DeleteModel

Deletes an existing model.

+ *

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

+ *
    + *
  • deleteModel(DeleteModelRequest request) + *
+ *

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

+ *
    + *
  • deleteModel(ModelName name) + *
  • deleteModel(String name) + *
+ *

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

+ *
    + *
  • deleteModelCallable() + *
+ *
ListModels

Lists all the models linked to this event store.

+ *

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

+ *
    + *
  • listModels(ListModelsRequest request) + *
+ *

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

+ *
    + *
  • listModels(CatalogName parent) + *
  • listModels(String parent) + *
+ *

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

+ *
    + *
  • listModelsPagedCallable() + *
  • listModelsCallable() + *
+ *
UpdateModel

Update of model metadata. Only fields that currently can be updated are: `filtering_option` and `periodic_tuning_state`. If other values are provided, this API method ignores them.

+ *

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

+ *
    + *
  • updateModel(UpdateModelRequest request) + *
+ *

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

+ *
    + *
  • updateModel(Model model, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateModelCallable() + *
+ *
TuneModel

Tunes an existing model.

+ *

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

+ *
    + *
  • tuneModelAsync(TuneModelRequest request) + *
+ *

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

+ *
    + *
  • tuneModelAsync(ModelName name) + *
  • tuneModelAsync(String name) + *
+ *

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

+ *
    + *
  • tuneModelOperationCallable() + *
  • tuneModelCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java index 8aeaf6ab7238..e0b87732140b 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java @@ -57,19 +57,27 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Predict

Makes a recommendation prediction.

+ *

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

+ *
    + *
  • predict(PredictRequest request) + *
+ *

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

+ *
    + *
  • predictCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java index 4042bf4f289a..c323635ae7d6 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java @@ -64,19 +64,247 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateProduct

Creates a [Product][google.cloud.retail.v2.Product].

+ *

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

+ *
    + *
  • createProduct(CreateProductRequest request) + *
+ *

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

+ *
    + *
  • createProduct(BranchName parent, Product product, String productId) + *
  • createProduct(String parent, Product product, String productId) + *
+ *

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

+ *
    + *
  • createProductCallable() + *
+ *
GetProduct

Gets a [Product][google.cloud.retail.v2.Product].

+ *

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

+ *
    + *
  • getProduct(GetProductRequest request) + *
+ *

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

+ *
    + *
  • getProduct(ProductName name) + *
  • getProduct(String name) + *
+ *

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

+ *
    + *
  • getProductCallable() + *
+ *
ListProducts

Gets a list of [Product][google.cloud.retail.v2.Product]s.

+ *

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

+ *
    + *
  • listProducts(ListProductsRequest request) + *
+ *

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

+ *
    + *
  • listProducts(BranchName parent) + *
  • listProducts(String parent) + *
+ *

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

+ *
    + *
  • listProductsPagedCallable() + *
  • listProductsCallable() + *
+ *
UpdateProduct

Updates a [Product][google.cloud.retail.v2.Product].

+ *

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

+ *
    + *
  • updateProduct(UpdateProductRequest request) + *
+ *

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

+ *
    + *
  • updateProduct(Product product, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateProductCallable() + *
+ *
DeleteProduct

Deletes a [Product][google.cloud.retail.v2.Product].

+ *

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

+ *
    + *
  • deleteProduct(DeleteProductRequest request) + *
+ *

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

+ *
    + *
  • deleteProduct(ProductName name) + *
  • deleteProduct(String name) + *
+ *

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

+ *
    + *
  • deleteProductCallable() + *
+ *
ImportProducts

Bulk import of multiple [Product][google.cloud.retail.v2.Product]s. + *

Request processing may be synchronous. Non-existing items are created. + *

Note that it is possible for a subset of the [Product][google.cloud.retail.v2.Product]s to be successfully updated.

+ *

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

+ *
    + *
  • importProductsAsync(ImportProductsRequest request) + *
+ *

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

+ *
    + *
  • importProductsOperationCallable() + *
  • importProductsCallable() + *
+ *
SetInventory

Updates inventory information for a [Product][google.cloud.retail.v2.Product] while respecting the last update timestamps of each inventory field. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.Product] to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + *

When inventory is updated with [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. + *

If no inventory fields are set in [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any pre-existing inventory information for this product is used. + *

If no inventory fields are set in [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], then any existing inventory information is preserved. + *

Pre-existing inventory information can only be updated with [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], and [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. + *

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates are not marked as [done][google.longrunning.Operation.done] until they are obsolete.

+ *

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

+ *
    + *
  • setInventoryAsync(SetInventoryRequest request) + *
+ *

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

+ *
    + *
  • setInventoryAsync(Product inventory, FieldMask setMask) + *
+ *

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

+ *
    + *
  • setInventoryOperationCallable() + *
  • setInventoryCallable() + *
+ *
AddFulfillmentPlaces

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • addFulfillmentPlacesAsync(AddFulfillmentPlacesRequest request) + *
+ *

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

+ *
    + *
  • addFulfillmentPlacesAsync(ProductName product) + *
  • addFulfillmentPlacesAsync(String product) + *
+ *

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

+ *
    + *
  • addFulfillmentPlacesOperationCallable() + *
  • addFulfillmentPlacesCallable() + *
+ *
RemoveFulfillmentPlaces

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • removeFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest request) + *
+ *

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

+ *
    + *
  • removeFulfillmentPlacesAsync(ProductName product) + *
  • removeFulfillmentPlacesAsync(String product) + *
+ *

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

+ *
    + *
  • removeFulfillmentPlacesOperationCallable() + *
  • removeFulfillmentPlacesCallable() + *
+ *
AddLocalInventories

Updates local inventory information for a [Product][google.cloud.retail.v2.Product] at a list of places, while respecting the last update timestamps of each inventory field. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.Product] to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + *

Local inventory information can only be modified using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • addLocalInventoriesAsync(AddLocalInventoriesRequest request) + *
+ *

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

+ *
    + *
  • addLocalInventoriesAsync(ProductName product) + *
  • addLocalInventoriesAsync(String product) + *
+ *

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

+ *
    + *
  • addLocalInventoriesOperationCallable() + *
  • addLocalInventoriesCallable() + *
+ *
RemoveLocalInventories

Remove local inventory information for a [Product][google.cloud.retail.v2.Product] at a list of places at a removal timestamp. + *

This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. + *

Local inventory information can only be removed using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • removeLocalInventoriesAsync(RemoveLocalInventoriesRequest request) + *
+ *

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

+ *
    + *
  • removeLocalInventoriesAsync(ProductName product) + *
  • removeLocalInventoriesAsync(String product) + *
+ *

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

+ *
    + *
  • removeLocalInventoriesOperationCallable() + *
  • removeLocalInventoriesCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java index 82c2cf618611..282dc2154d54 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java @@ -83,19 +83,29 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Search

Performs a search. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • search(SearchRequest request) + *
+ *

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

+ *
    + *
  • searchPagedCallable() + *
  • searchCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java index cfb53b7fca8e..9e8cb5277e5d 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java @@ -61,19 +61,149 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateServingConfig

Creates a ServingConfig. + *

A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.

+ *

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

+ *
    + *
  • createServingConfig(CreateServingConfigRequest request) + *
+ *

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

+ *
    + *
  • createServingConfig(CatalogName parent, ServingConfig servingConfig, String servingConfigId) + *
  • createServingConfig(String parent, ServingConfig servingConfig, String servingConfigId) + *
+ *

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

+ *
    + *
  • createServingConfigCallable() + *
+ *
DeleteServingConfig

Deletes a ServingConfig. + *

Returns a NotFound error if the ServingConfig does not exist.

+ *

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

+ *
    + *
  • deleteServingConfig(DeleteServingConfigRequest request) + *
+ *

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

+ *
    + *
  • deleteServingConfig(ServingConfigName name) + *
  • deleteServingConfig(String name) + *
+ *

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

+ *
    + *
  • deleteServingConfigCallable() + *
+ *
UpdateServingConfig

Updates a ServingConfig.

+ *

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

+ *
    + *
  • updateServingConfig(UpdateServingConfigRequest request) + *
+ *

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

+ *
    + *
  • updateServingConfig(ServingConfig servingConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateServingConfigCallable() + *
+ *
GetServingConfig

Gets a ServingConfig. + *

Returns a NotFound error if the ServingConfig does not exist.

+ *

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

+ *
    + *
  • getServingConfig(GetServingConfigRequest request) + *
+ *

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

+ *
    + *
  • getServingConfig(ServingConfigName name) + *
  • getServingConfig(String name) + *
+ *

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

+ *
    + *
  • getServingConfigCallable() + *
+ *
ListServingConfigs

Lists all ServingConfigs linked to this catalog.

+ *

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

+ *
    + *
  • listServingConfigs(ListServingConfigsRequest request) + *
+ *

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

+ *
    + *
  • listServingConfigs(CatalogName parent) + *
  • listServingConfigs(String parent) + *
+ *

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

+ *
    + *
  • listServingConfigsPagedCallable() + *
  • listServingConfigsCallable() + *
+ *
AddControl

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

+ *

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

+ *
    + *
  • addControl(AddControlRequest request) + *
+ *

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

+ *
    + *
  • addControl(ServingConfigName servingConfig) + *
  • addControl(String servingConfig) + *
+ *

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

+ *
    + *
  • addControlCallable() + *
+ *
RemoveControl

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

+ *

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

+ *
    + *
  • removeControl(RemoveControlRequest request) + *
+ *

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

+ *
    + *
  • removeControl(ServingConfigName servingConfig) + *
  • removeControl(String servingConfig) + *
+ *

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

+ *
    + *
  • removeControlCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java index 9ab4b4bfaec9..9e096de19025 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java @@ -58,19 +58,88 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
WriteUserEvent

Writes a single user event.

+ *

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

+ *
    + *
  • writeUserEvent(WriteUserEventRequest request) + *
+ *

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

+ *
    + *
  • writeUserEventCallable() + *
+ *
CollectUserEvent

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. + *

This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

+ *

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

+ *
    + *
  • collectUserEvent(CollectUserEventRequest request) + *
+ *

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

+ *
    + *
  • collectUserEventCallable() + *
+ *
PurgeUserEvents

Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

+ *

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

+ *
    + *
  • purgeUserEventsAsync(PurgeUserEventsRequest request) + *
+ *

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

+ *
    + *
  • purgeUserEventsOperationCallable() + *
  • purgeUserEventsCallable() + *
+ *
ImportUserEvents

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. + *

`Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.

+ *

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

+ *
    + *
  • importUserEventsAsync(ImportUserEventsRequest request) + *
+ *

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

+ *
    + *
  • importUserEventsOperationCallable() + *
  • importUserEventsCallable() + *
+ *
RejoinUserEvents

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

+ *

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

+ *
    + *
  • rejoinUserEventsAsync(RejoinUserEventsRequest request) + *
+ *

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

+ *
    + *
  • rejoinUserEventsOperationCallable() + *
  • rejoinUserEventsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java index e1db6a7e02d3..e895878b22b4 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java @@ -267,6 +267,12 @@ public CatalogServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java index 1e5400477afb..4e7aad45bd83 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java @@ -138,6 +138,12 @@ public CompletionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java index ccd9da7f55c8..e4c0a8f2bad1 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java @@ -205,6 +205,12 @@ public ControlServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java index 5281ecb690dd..1b2fdb4c1fd5 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ModelServiceStubSettings.java @@ -250,6 +250,12 @@ public ModelServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java index f6c29a9b8946..72cfe6542cd4 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java @@ -112,6 +112,12 @@ public PredictionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java index 36808dcebdd6..e4760c664a70 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java @@ -336,6 +336,12 @@ public ProductServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java index d6313b31182c..825ac3fc206f 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java @@ -173,6 +173,12 @@ public SearchServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java index 28d188df8593..6ef5575e090a 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java @@ -234,6 +234,12 @@ public ServingConfigServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java index 8c6bc1a20d8e..d75ced950d37 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java @@ -179,6 +179,12 @@ public UserEventServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java index 61b73659bcb3..d4a195d88d9f 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java @@ -58,19 +58,232 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListCatalogs

Lists all the [Catalog][google.cloud.retail.v2alpha.Catalog]s associated with the project.

+ *

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

+ *
    + *
  • listCatalogs(ListCatalogsRequest request) + *
+ *

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

+ *
    + *
  • listCatalogs(LocationName parent) + *
  • listCatalogs(String parent) + *
+ *

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

+ *
    + *
  • listCatalogsPagedCallable() + *
  • listCatalogsCallable() + *
+ *
UpdateCatalog

Updates the [Catalog][google.cloud.retail.v2alpha.Catalog]s.

+ *

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

+ *
    + *
  • updateCatalog(UpdateCatalogRequest request) + *
+ *

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

+ *
    + *
  • updateCatalog(Catalog catalog, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCatalogCallable() + *
+ *
SetDefaultBranch

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts] will treat requests using "default_branch" to the actual branch id set as default. + *

For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting [SearchRequest.branch][google.cloud.retail.v2alpha.SearchRequest.branch] to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2alpha.SearchRequest.branch] to `projects/*/locations/*/catalogs/*/branches/1`. + *

Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as [SearchRequest.branch][google.cloud.retail.v2alpha.SearchRequest.branch] to route the traffic to this staging branch. + *

CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. + *

More specifically: + *

    + *
  • PredictionService will only return product IDs from branch {newBranch}. + *
  • SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). + *
  • UserEventService will only join events with products from branch {newBranch}. + *
+ *

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

+ *
    + *
  • setDefaultBranch(SetDefaultBranchRequest request) + *
+ *

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

+ *
    + *
  • setDefaultBranch(CatalogName catalog) + *
  • setDefaultBranch(String catalog) + *
+ *

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

+ *
    + *
  • setDefaultBranchCallable() + *
+ *
GetDefaultBranch

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.SetDefaultBranch] method under a specified parent catalog.

+ *

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

+ *
    + *
  • getDefaultBranch(GetDefaultBranchRequest request) + *
+ *

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

+ *
    + *
  • getDefaultBranch(CatalogName catalog) + *
  • getDefaultBranch(String catalog) + *
+ *

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

+ *
    + *
  • getDefaultBranchCallable() + *
+ *
GetCompletionConfig

Gets a [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig].

+ *

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

+ *
    + *
  • getCompletionConfig(GetCompletionConfigRequest request) + *
+ *

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

+ *
    + *
  • getCompletionConfig(CompletionConfigName name) + *
  • getCompletionConfig(String name) + *
+ *

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

+ *
    + *
  • getCompletionConfigCallable() + *
+ *
UpdateCompletionConfig

Updates the [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig]s.

+ *

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

+ *
    + *
  • updateCompletionConfig(UpdateCompletionConfigRequest request) + *
+ *

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

+ *
    + *
  • updateCompletionConfig(CompletionConfig completionConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCompletionConfigCallable() + *
+ *
GetAttributesConfig

Gets an [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig].

+ *

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

+ *
    + *
  • getAttributesConfig(GetAttributesConfigRequest request) + *
+ *

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

+ *
    + *
  • getAttributesConfig(AttributesConfigName name) + *
  • getAttributesConfig(String name) + *
+ *

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

+ *
    + *
  • getAttributesConfigCallable() + *
+ *
UpdateAttributesConfig

Updates the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig]. + *

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

+ *

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

+ *
    + *
  • updateAttributesConfig(UpdateAttributesConfigRequest request) + *
+ *

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

+ *
    + *
  • updateAttributesConfig(AttributesConfig attributesConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateAttributesConfigCallable() + *
+ *
AddCatalogAttribute

Adds the specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig]. + *

If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.

+ *

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

+ *
    + *
  • addCatalogAttribute(AddCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • addCatalogAttributeCallable() + *
+ *
RemoveCatalogAttribute

Removes the specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig]. + *

If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • removeCatalogAttribute(RemoveCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • removeCatalogAttributeCallable() + *
+ *
BatchRemoveCatalogAttributes

Removes all specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s from the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig].

+ *

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

+ *
    + *
  • batchRemoveCatalogAttributes(BatchRemoveCatalogAttributesRequest request) + *
+ *

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

+ *
    + *
  • batchRemoveCatalogAttributesCallable() + *
+ *
ReplaceCatalogAttribute

Replaces the specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2alpha.CatalogAttribute.key]. + *

If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • replaceCatalogAttribute(ReplaceCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • replaceCatalogAttributeCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java index 2031dc271e7e..7e80f190d03f 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java @@ -66,19 +66,46 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CompleteQuery

Completes the specified prefix with keyword suggestions. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • completeQuery(CompleteQueryRequest request) + *
+ *

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

+ *
    + *
  • completeQueryCallable() + *
+ *
ImportCompletionData

Bulk import of processed completion dataset. + *

Request processing is asynchronous. Partial updating is not supported. + *

The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • importCompletionDataAsync(ImportCompletionDataRequest request) + *
+ *

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

+ *
    + *
  • importCompletionDataOperationCallable() + *
  • importCompletionDataCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java index 48239147e79c..060ed6295dc1 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java @@ -59,19 +59,111 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateControl

Creates a Control. + *

If the [Control][google.cloud.retail.v2alpha.Control] to create already exists, an ALREADY_EXISTS error is returned.

+ *

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

+ *
    + *
  • createControl(CreateControlRequest request) + *
+ *

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

+ *
    + *
  • createControl(CatalogName parent, Control control, String controlId) + *
  • createControl(String parent, Control control, String controlId) + *
+ *

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

+ *
    + *
  • createControlCallable() + *
+ *
DeleteControl

Deletes a Control. + *

If the [Control][google.cloud.retail.v2alpha.Control] to delete does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • deleteControl(DeleteControlRequest request) + *
+ *

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

+ *
    + *
  • deleteControl(ControlName name) + *
  • deleteControl(String name) + *
+ *

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

+ *
    + *
  • deleteControlCallable() + *
+ *
UpdateControl

Updates a Control. + *

[Control][google.cloud.retail.v2alpha.Control] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2alpha.Control] to update does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • updateControl(UpdateControlRequest request) + *
+ *

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

+ *
    + *
  • updateControl(Control control, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateControlCallable() + *
+ *
GetControl

Gets a Control.

+ *

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

+ *
    + *
  • getControl(GetControlRequest request) + *
+ *

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

+ *
    + *
  • getControl(ControlName name) + *
  • getControl(String name) + *
+ *

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

+ *
    + *
  • getControlCallable() + *
+ *
ListControls

Lists all Controls by their parent [Catalog][google.cloud.retail.v2alpha.Catalog].

+ *

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

+ *
    + *
  • listControls(ListControlsRequest request) + *
+ *

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

+ *
    + *
  • listControls(CatalogName parent) + *
  • listControls(String parent) + *
+ *

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

+ *
    + *
  • listControlsPagedCallable() + *
  • listControlsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java index 3e90218a6ebe..010bb21bb3f4 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterAccountLinkServiceClient.java @@ -55,19 +55,71 @@ * up resources such as threads. In the example above, try-with-resources is used, which * automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListMerchantCenterAccountLinks

Lists all [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink]s under the specified parent [Catalog][google.cloud.retail.v2alpha.Catalog].

+ *

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

+ *
    + *
  • listMerchantCenterAccountLinks(ListMerchantCenterAccountLinksRequest request) + *
+ *

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

+ *
    + *
  • listMerchantCenterAccountLinks(CatalogName parent) + *
  • listMerchantCenterAccountLinks(String parent) + *
+ *

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

+ *
    + *
  • listMerchantCenterAccountLinksCallable() + *
+ *
CreateMerchantCenterAccountLink

Creates a [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink].

+ *

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

+ *
    + *
  • createMerchantCenterAccountLinkAsync(CreateMerchantCenterAccountLinkRequest request) + *
+ *

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

+ *
    + *
  • createMerchantCenterAccountLinkAsync(CatalogName parent, MerchantCenterAccountLink merchantCenterAccountLink) + *
  • createMerchantCenterAccountLinkAsync(String parent, MerchantCenterAccountLink merchantCenterAccountLink) + *
+ *

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

+ *
    + *
  • createMerchantCenterAccountLinkOperationCallable() + *
  • createMerchantCenterAccountLinkCallable() + *
+ *
DeleteMerchantCenterAccountLink

Deletes a [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink]. If the [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] to delete does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • deleteMerchantCenterAccountLink(DeleteMerchantCenterAccountLinkRequest request) + *
+ *

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

+ *
    + *
  • deleteMerchantCenterAccountLink(MerchantCenterAccountLinkName name) + *
  • deleteMerchantCenterAccountLink(String name) + *
+ *

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

+ *
    + *
  • deleteMerchantCenterAccountLinkCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java index f253d5b4a453..da3111b78270 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java @@ -73,19 +73,166 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateModel

Creates a new model.

+ *

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

+ *
    + *
  • createModelAsync(CreateModelRequest request) + *
+ *

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

+ *
    + *
  • createModelAsync(CatalogName parent, Model model) + *
  • createModelAsync(String parent, Model model) + *
+ *

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

+ *
    + *
  • createModelOperationCallable() + *
  • createModelCallable() + *
+ *
GetModel

Gets a model.

+ *

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

+ *
    + *
  • getModel(GetModelRequest request) + *
+ *

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

+ *
    + *
  • getModel(ModelName name) + *
  • getModel(String name) + *
+ *

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

+ *
    + *
  • getModelCallable() + *
+ *
PauseModel

Pauses the training of an existing model.

+ *

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

+ *
    + *
  • pauseModel(PauseModelRequest request) + *
+ *

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

+ *
    + *
  • pauseModel(ModelName name) + *
  • pauseModel(String name) + *
+ *

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

+ *
    + *
  • pauseModelCallable() + *
+ *
ResumeModel

Resumes the training of an existing model.

+ *

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

+ *
    + *
  • resumeModel(ResumeModelRequest request) + *
+ *

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

+ *
    + *
  • resumeModel(String name) + *
+ *

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

+ *
    + *
  • resumeModelCallable() + *
+ *
DeleteModel

Deletes an existing model.

+ *

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

+ *
    + *
  • deleteModel(DeleteModelRequest request) + *
+ *

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

+ *
    + *
  • deleteModel(ModelName name) + *
  • deleteModel(String name) + *
+ *

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

+ *
    + *
  • deleteModelCallable() + *
+ *
ListModels

Lists all the models linked to this event store.

+ *

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

+ *
    + *
  • listModels(ListModelsRequest request) + *
+ *

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

+ *
    + *
  • listModels(CatalogName parent) + *
  • listModels(String parent) + *
+ *

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

+ *
    + *
  • listModelsPagedCallable() + *
  • listModelsCallable() + *
+ *
UpdateModel

Update of model metadata. Only fields that currently can be updated are: `filtering_option` and `periodic_tuning_state`. If other values are provided, this API method ignores them.

+ *

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

+ *
    + *
  • updateModel(UpdateModelRequest request) + *
+ *

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

+ *
    + *
  • updateModel(Model model, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateModelCallable() + *
+ *
TuneModel

Tunes an existing model.

+ *

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

+ *
    + *
  • tuneModelAsync(TuneModelRequest request) + *
+ *

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

+ *
    + *
  • tuneModelAsync(ModelName name) + *
  • tuneModelAsync(String name) + *
+ *

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

+ *
    + *
  • tuneModelOperationCallable() + *
  • tuneModelCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java index de626936406d..74b1fe2c5047 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java @@ -58,19 +58,27 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Predict

Makes a recommendation prediction.

+ *

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

+ *
    + *
  • predict(PredictRequest request) + *
+ *

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

+ *
    + *
  • predictCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java index ea7779472a05..3422108d4075 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java @@ -64,19 +64,264 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateProduct

Creates a [Product][google.cloud.retail.v2alpha.Product].

+ *

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

+ *
    + *
  • createProduct(CreateProductRequest request) + *
+ *

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

+ *
    + *
  • createProduct(BranchName parent, Product product, String productId) + *
  • createProduct(String parent, Product product, String productId) + *
+ *

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

+ *
    + *
  • createProductCallable() + *
+ *
GetProduct

Gets a [Product][google.cloud.retail.v2alpha.Product].

+ *

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

+ *
    + *
  • getProduct(GetProductRequest request) + *
+ *

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

+ *
    + *
  • getProduct(ProductName name) + *
  • getProduct(String name) + *
+ *

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

+ *
    + *
  • getProductCallable() + *
+ *
ListProducts

Gets a list of [Product][google.cloud.retail.v2alpha.Product]s.

+ *

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

+ *
    + *
  • listProducts(ListProductsRequest request) + *
+ *

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

+ *
    + *
  • listProducts(BranchName parent) + *
  • listProducts(String parent) + *
+ *

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

+ *
    + *
  • listProductsPagedCallable() + *
  • listProductsCallable() + *
+ *
UpdateProduct

Updates a [Product][google.cloud.retail.v2alpha.Product].

+ *

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

+ *
    + *
  • updateProduct(UpdateProductRequest request) + *
+ *

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

+ *
    + *
  • updateProduct(Product product, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateProductCallable() + *
+ *
DeleteProduct

Deletes a [Product][google.cloud.retail.v2alpha.Product].

+ *

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

+ *
    + *
  • deleteProduct(DeleteProductRequest request) + *
+ *

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

+ *
    + *
  • deleteProduct(ProductName name) + *
  • deleteProduct(String name) + *
+ *

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

+ *
    + *
  • deleteProductCallable() + *
+ *
PurgeProducts

Permanently deletes all selected [Product][google.cloud.retail.v2alpha.Product]s under a branch. + *

This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, this operation could take hours to complete. Before the operation completes, some [Product][google.cloud.retail.v2alpha.Product]s may still be returned by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + *

Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, this operation could take hours to complete. To get a sample of [Product][google.cloud.retail.v2alpha.Product]s that would be deleted, set [PurgeProductsRequest.force][google.cloud.retail.v2alpha.PurgeProductsRequest.force] to false.

+ *

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

+ *
    + *
  • purgeProductsAsync(PurgeProductsRequest request) + *
+ *

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

+ *
    + *
  • purgeProductsOperationCallable() + *
  • purgeProductsCallable() + *
+ *
ImportProducts

Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s. + *

Request processing may be synchronous. Non-existing items are created. + *

Note that it is possible for a subset of the [Product][google.cloud.retail.v2alpha.Product]s to be successfully updated.

+ *

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

+ *
    + *
  • importProductsAsync(ImportProductsRequest request) + *
+ *

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

+ *
    + *
  • importProductsOperationCallable() + *
  • importProductsCallable() + *
+ *
SetInventory

Updates inventory information for a [Product][google.cloud.retail.v2alpha.Product] while respecting the last update timestamps of each inventory field. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.Product] to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + *

When inventory is updated with [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] request. + *

If no inventory fields are set in [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product], then any pre-existing inventory information for this product is used. + *

If no inventory fields are set in [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask], then any existing inventory information is preserved. + *

Pre-existing inventory information can only be updated with [ProductService.SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], and [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. + *

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates are not marked as [done][google.longrunning.Operation.done] until they are obsolete.

+ *

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

+ *
    + *
  • setInventoryAsync(SetInventoryRequest request) + *
+ *

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

+ *
    + *
  • setInventoryAsync(Product inventory, FieldMask setMask) + *
+ *

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

+ *
    + *
  • setInventoryOperationCallable() + *
  • setInventoryCallable() + *
+ *
AddFulfillmentPlaces

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2alpha.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • addFulfillmentPlacesAsync(AddFulfillmentPlacesRequest request) + *
+ *

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

+ *
    + *
  • addFulfillmentPlacesAsync(ProductName product) + *
  • addFulfillmentPlacesAsync(String product) + *
+ *

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

+ *
    + *
  • addFulfillmentPlacesOperationCallable() + *
  • addFulfillmentPlacesCallable() + *
+ *
RemoveFulfillmentPlaces

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • removeFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest request) + *
+ *

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

+ *
    + *
  • removeFulfillmentPlacesAsync(ProductName product) + *
  • removeFulfillmentPlacesAsync(String product) + *
+ *

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

+ *
    + *
  • removeFulfillmentPlacesOperationCallable() + *
  • removeFulfillmentPlacesCallable() + *
+ *
AddLocalInventories

Updates local inventory information for a [Product][google.cloud.retail.v2alpha.Product] at a list of places, while respecting the last update timestamps of each inventory field. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.Product] to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + *

Local inventory information can only be modified using this method. [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on local inventories. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • addLocalInventoriesAsync(AddLocalInventoriesRequest request) + *
+ *

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

+ *
    + *
  • addLocalInventoriesAsync(ProductName product) + *
  • addLocalInventoriesAsync(String product) + *
+ *

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

+ *
    + *
  • addLocalInventoriesOperationCallable() + *
  • addLocalInventoriesCallable() + *
+ *
RemoveLocalInventories

Remove local inventory information for a [Product][google.cloud.retail.v2alpha.Product] at a list of places at a removal timestamp. + *

This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + *

Local inventory information can only be removed using this method. [ProductService.CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on local inventories. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

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

+ *
    + *
  • removeLocalInventoriesAsync(RemoveLocalInventoriesRequest request) + *
+ *

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

+ *
    + *
  • removeLocalInventoriesAsync(ProductName product) + *
  • removeLocalInventoriesAsync(String product) + *
+ *

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

+ *
    + *
  • removeLocalInventoriesOperationCallable() + *
  • removeLocalInventoriesCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java index dbde4a9bdcf9..331c3a7c5fe9 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java @@ -84,19 +84,29 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Search

Performs a search. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • search(SearchRequest request) + *
+ *

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

+ *
    + *
  • searchPagedCallable() + *
  • searchCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java index 68524df9ac34..0b93b3f0dfbd 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java @@ -62,19 +62,149 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateServingConfig

Creates a ServingConfig. + *

A maximum of 100 [ServingConfig][google.cloud.retail.v2alpha.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2alpha.Catalog], otherwise a FAILED_PRECONDITION error is returned.

+ *

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

+ *
    + *
  • createServingConfig(CreateServingConfigRequest request) + *
+ *

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

+ *
    + *
  • createServingConfig(CatalogName parent, ServingConfig servingConfig, String servingConfigId) + *
  • createServingConfig(String parent, ServingConfig servingConfig, String servingConfigId) + *
+ *

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

+ *
    + *
  • createServingConfigCallable() + *
+ *
DeleteServingConfig

Deletes a ServingConfig. + *

Returns a NotFound error if the ServingConfig does not exist.

+ *

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

+ *
    + *
  • deleteServingConfig(DeleteServingConfigRequest request) + *
+ *

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

+ *
    + *
  • deleteServingConfig(ServingConfigName name) + *
  • deleteServingConfig(String name) + *
+ *

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

+ *
    + *
  • deleteServingConfigCallable() + *
+ *
UpdateServingConfig

Updates a ServingConfig.

+ *

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

+ *
    + *
  • updateServingConfig(UpdateServingConfigRequest request) + *
+ *

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

+ *
    + *
  • updateServingConfig(ServingConfig servingConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateServingConfigCallable() + *
+ *
GetServingConfig

Gets a ServingConfig. + *

Returns a NotFound error if the ServingConfig does not exist.

+ *

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

+ *
    + *
  • getServingConfig(GetServingConfigRequest request) + *
+ *

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

+ *
    + *
  • getServingConfig(ServingConfigName name) + *
  • getServingConfig(String name) + *
+ *

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

+ *
    + *
  • getServingConfigCallable() + *
+ *
ListServingConfigs

Lists all ServingConfigs linked to this catalog.

+ *

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

+ *
    + *
  • listServingConfigs(ListServingConfigsRequest request) + *
+ *

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

+ *
    + *
  • listServingConfigs(CatalogName parent) + *
  • listServingConfigs(String parent) + *
+ *

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

+ *
    + *
  • listServingConfigsPagedCallable() + *
  • listServingConfigsCallable() + *
+ *
AddControl

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

+ *

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

+ *
    + *
  • addControl(AddControlRequest request) + *
+ *

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

+ *
    + *
  • addControl(ServingConfigName servingConfig) + *
  • addControl(String servingConfig) + *
+ *

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

+ *
    + *
  • addControlCallable() + *
+ *
RemoveControl

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

+ *

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

+ *
    + *
  • removeControl(RemoveControlRequest request) + *
+ *

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

+ *
    + *
  • removeControl(ServingConfigName servingConfig) + *
  • removeControl(String servingConfig) + *
+ *

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

+ *
    + *
  • removeControlCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java index 50b0fbdb3f84..546b5056d59d 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java @@ -58,19 +58,88 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
WriteUserEvent

Writes a single user event.

+ *

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

+ *
    + *
  • writeUserEvent(WriteUserEventRequest request) + *
+ *

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

+ *
    + *
  • writeUserEventCallable() + *
+ *
CollectUserEvent

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. + *

This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

+ *

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

+ *
    + *
  • collectUserEvent(CollectUserEventRequest request) + *
+ *

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

+ *
    + *
  • collectUserEventCallable() + *
+ *
PurgeUserEvents

Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

+ *

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

+ *
    + *
  • purgeUserEventsAsync(PurgeUserEventsRequest request) + *
+ *

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

+ *
    + *
  • purgeUserEventsOperationCallable() + *
  • purgeUserEventsCallable() + *
+ *
ImportUserEvents

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. + *

`Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.

+ *

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

+ *
    + *
  • importUserEventsAsync(ImportUserEventsRequest request) + *
+ *

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

+ *
    + *
  • importUserEventsOperationCallable() + *
  • importUserEventsCallable() + *
+ *
RejoinUserEvents

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

+ *

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

+ *
    + *
  • rejoinUserEventsAsync(RejoinUserEventsRequest request) + *
+ *

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

+ *
    + *
  • rejoinUserEventsOperationCallable() + *
  • rejoinUserEventsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java index c2f18e040ddc..e0dcb22486dd 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java @@ -280,6 +280,12 @@ public CatalogServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java index 1f231ce7f553..4f96a5a87371 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java @@ -139,6 +139,12 @@ public CompletionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java index 26ea6bb8f926..8f57dcdaec39 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java @@ -206,6 +206,12 @@ public ControlServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/MerchantCenterAccountLinkServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/MerchantCenterAccountLinkServiceStubSettings.java index 7a94a6eeff78..fae62cfac8d7 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/MerchantCenterAccountLinkServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/MerchantCenterAccountLinkServiceStubSettings.java @@ -159,6 +159,12 @@ public MerchantCenterAccountLinkServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java index 348b6c9265d6..47ca7b40fbd1 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java @@ -251,6 +251,12 @@ public ModelServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java index 62f2c461bfeb..f9daac72fe7a 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java @@ -113,6 +113,12 @@ public PredictionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java index 95ae75de00d4..990a0579c9fd 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java @@ -355,6 +355,12 @@ public ProductServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java index f0021d9eb0a0..27cc3f716eb9 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java @@ -174,6 +174,12 @@ public SearchServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java index 134249e9ec72..154ca3c54534 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java @@ -235,6 +235,12 @@ public ServingConfigServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java index 85669b781f08..1fcccdc9d988 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java @@ -180,6 +180,12 @@ public UserEventServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java index 54c972b6bec3..44dd89925320 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java @@ -58,19 +58,232 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListCatalogs

Lists all the [Catalog][google.cloud.retail.v2beta.Catalog]s associated with the project.

+ *

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

+ *
    + *
  • listCatalogs(ListCatalogsRequest request) + *
+ *

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

+ *
    + *
  • listCatalogs(LocationName parent) + *
  • listCatalogs(String parent) + *
+ *

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

+ *
    + *
  • listCatalogsPagedCallable() + *
  • listCatalogsCallable() + *
+ *
UpdateCatalog

Updates the [Catalog][google.cloud.retail.v2beta.Catalog]s.

+ *

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

+ *
    + *
  • updateCatalog(UpdateCatalogRequest request) + *
+ *

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

+ *
    + *
  • updateCatalog(Catalog catalog, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCatalogCallable() + *
+ *
SetDefaultBranch

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts] will treat requests using "default_branch" to the actual branch id set as default. + *

For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting [SearchRequest.branch][google.cloud.retail.v2beta.SearchRequest.branch] to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2beta.SearchRequest.branch] to `projects/*/locations/*/catalogs/*/branches/1`. + *

Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as [SearchRequest.branch][google.cloud.retail.v2beta.SearchRequest.branch] to route the traffic to this staging branch. + *

CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. + *

More specifically: + *

    + *
  • PredictionService will only return product IDs from branch {newBranch}. + *
  • SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). + *
  • UserEventService will only join events with products from branch {newBranch}. + *
+ *

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

+ *
    + *
  • setDefaultBranch(SetDefaultBranchRequest request) + *
+ *

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

+ *
    + *
  • setDefaultBranch(CatalogName catalog) + *
  • setDefaultBranch(String catalog) + *
+ *

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

+ *
    + *
  • setDefaultBranchCallable() + *
+ *
GetDefaultBranch

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2beta.CatalogService.SetDefaultBranch] method under a specified parent catalog.

+ *

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

+ *
    + *
  • getDefaultBranch(GetDefaultBranchRequest request) + *
+ *

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

+ *
    + *
  • getDefaultBranch(CatalogName catalog) + *
  • getDefaultBranch(String catalog) + *
+ *

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

+ *
    + *
  • getDefaultBranchCallable() + *
+ *
GetCompletionConfig

Gets a [CompletionConfig][google.cloud.retail.v2beta.CompletionConfig].

+ *

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

+ *
    + *
  • getCompletionConfig(GetCompletionConfigRequest request) + *
+ *

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

+ *
    + *
  • getCompletionConfig(CompletionConfigName name) + *
  • getCompletionConfig(String name) + *
+ *

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

+ *
    + *
  • getCompletionConfigCallable() + *
+ *
UpdateCompletionConfig

Updates the [CompletionConfig][google.cloud.retail.v2beta.CompletionConfig]s.

+ *

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

+ *
    + *
  • updateCompletionConfig(UpdateCompletionConfigRequest request) + *
+ *

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

+ *
    + *
  • updateCompletionConfig(CompletionConfig completionConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateCompletionConfigCallable() + *
+ *
GetAttributesConfig

Gets an [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].

+ *

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

+ *
    + *
  • getAttributesConfig(GetAttributesConfigRequest request) + *
+ *

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

+ *
    + *
  • getAttributesConfig(AttributesConfigName name) + *
  • getAttributesConfig(String name) + *
+ *

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

+ *
    + *
  • getAttributesConfigCallable() + *
+ *
UpdateAttributesConfig

Updates the [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig]. + *

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

+ *

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

+ *
    + *
  • updateAttributesConfig(UpdateAttributesConfigRequest request) + *
+ *

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

+ *
    + *
  • updateAttributesConfig(AttributesConfig attributesConfig, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateAttributesConfigCallable() + *
+ *
AddCatalogAttribute

Adds the specified [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig]. + *

If the [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.

+ *

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

+ *
    + *
  • addCatalogAttribute(AddCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • addCatalogAttributeCallable() + *
+ *
RemoveCatalogAttribute

Removes the specified [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig]. + *

If the [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • removeCatalogAttribute(RemoveCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • removeCatalogAttributeCallable() + *
+ *
BatchRemoveCatalogAttributes

Removes all specified [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].

+ *

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

+ *
    + *
  • batchRemoveCatalogAttributes(BatchRemoveCatalogAttributesRequest request) + *
+ *

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

+ *
    + *
  • batchRemoveCatalogAttributesCallable() + *
+ *
ReplaceCatalogAttribute

Replaces the specified [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2beta.CatalogAttribute.key]. + *

If the [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • replaceCatalogAttribute(ReplaceCatalogAttributeRequest request) + *
+ *

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

+ *
    + *
  • replaceCatalogAttributeCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java index 0ffafa828e23..b77920ee026d 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java @@ -65,19 +65,46 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CompleteQuery

Completes the specified prefix with keyword suggestions. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • completeQuery(CompleteQueryRequest request) + *
+ *

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

+ *
    + *
  • completeQueryCallable() + *
+ *
ImportCompletionData

Bulk import of processed completion dataset. + *

Request processing is asynchronous. Partial updating is not supported. + *

The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

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

+ *
    + *
  • importCompletionDataAsync(ImportCompletionDataRequest request) + *
+ *

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

+ *
    + *
  • importCompletionDataOperationCallable() + *
  • importCompletionDataCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java index c3279f854f0b..fd3efcd53780 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java @@ -59,19 +59,111 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateControl

Creates a Control. + *

If the [Control][google.cloud.retail.v2beta.Control] to create already exists, an ALREADY_EXISTS error is returned.

+ *

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

+ *
    + *
  • createControl(CreateControlRequest request) + *
+ *

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

+ *
    + *
  • createControl(CatalogName parent, Control control, String controlId) + *
  • createControl(String parent, Control control, String controlId) + *
+ *

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

+ *
    + *
  • createControlCallable() + *
+ *
DeleteControl

Deletes a Control. + *

If the [Control][google.cloud.retail.v2beta.Control] to delete does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • deleteControl(DeleteControlRequest request) + *
+ *

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

+ *
    + *
  • deleteControl(ControlName name) + *
  • deleteControl(String name) + *
+ *

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

+ *
    + *
  • deleteControlCallable() + *
+ *
UpdateControl

Updates a Control. + *

[Control][google.cloud.retail.v2beta.Control] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2beta.Control] to update does not exist, a NOT_FOUND error is returned.

+ *

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

+ *
    + *
  • updateControl(UpdateControlRequest request) + *
+ *

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

+ *
    + *
  • updateControl(Control control, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateControlCallable() + *
+ *
GetControl

Gets a Control.

+ *

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

+ *
    + *
  • getControl(GetControlRequest request) + *
+ *

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

+ *
    + *
  • getControl(ControlName name) + *
  • getControl(String name) + *
+ *

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

+ *
    + *
  • getControlCallable() + *
+ *
ListControls

Lists all Controls by their parent [Catalog][google.cloud.retail.v2beta.Catalog].

+ *

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

+ *
    + *
  • listControls(ListControlsRequest request) + *
+ *

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

+ *
    + *
  • listControls(CatalogName parent) + *
  • listControls(String parent) + *
+ *

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

+ *
    + *
  • listControlsPagedCallable() + *
  • listControlsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceClient.java index 3fdf5d03466c..dee52f518821 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceClient.java @@ -73,19 +73,166 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateModel

Creates a new model.

+ *

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

+ *
    + *
  • createModelAsync(CreateModelRequest request) + *
+ *

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

+ *
    + *
  • createModelAsync(CatalogName parent, Model model) + *
  • createModelAsync(String parent, Model model) + *
+ *

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

+ *
    + *
  • createModelOperationCallable() + *
  • createModelCallable() + *
+ *
GetModel

Gets a model.

+ *

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

+ *
    + *
  • getModel(GetModelRequest request) + *
+ *

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

+ *
    + *
  • getModel(ModelName name) + *
  • getModel(String name) + *
+ *

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

+ *
    + *
  • getModelCallable() + *
+ *
PauseModel

Pauses the training of an existing model.

+ *

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

+ *
    + *
  • pauseModel(PauseModelRequest request) + *
+ *

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

+ *
    + *
  • pauseModel(ModelName name) + *
  • pauseModel(String name) + *
+ *

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

+ *
    + *
  • pauseModelCallable() + *
+ *
ResumeModel

Resumes the training of an existing model.

+ *

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

+ *
    + *
  • resumeModel(ResumeModelRequest request) + *
+ *

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

+ *
    + *
  • resumeModel(String name) + *
+ *

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

+ *
    + *
  • resumeModelCallable() + *
+ *
DeleteModel

Deletes an existing model.

+ *

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

+ *
    + *
  • deleteModel(DeleteModelRequest request) + *
+ *

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

+ *
    + *
  • deleteModel(ModelName name) + *
  • deleteModel(String name) + *
+ *

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

+ *
    + *
  • deleteModelCallable() + *
+ *
ListModels

Lists all the models linked to this event store.

+ *

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

+ *
    + *
  • listModels(ListModelsRequest request) + *
+ *

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

+ *
    + *
  • listModels(CatalogName parent) + *
  • listModels(String parent) + *
+ *

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

+ *
    + *
  • listModelsPagedCallable() + *
  • listModelsCallable() + *
+ *
UpdateModel

Update of model metadata. Only fields that currently can be updated are: `filtering_option` and `periodic_tuning_state`. If other values are provided, this API method ignores them.

+ *

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

+ *
    + *
  • updateModel(UpdateModelRequest request) + *
+ *

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

+ *
    + *
  • updateModel(Model model, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateModelCallable() + *
+ *
TuneModel

Tunes an existing model.

+ *

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

+ *
    + *
  • tuneModelAsync(TuneModelRequest request) + *
+ *

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

+ *
    + *
  • tuneModelAsync(ModelName name) + *
  • tuneModelAsync(String name) + *
+ *

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

+ *
    + *
  • tuneModelOperationCallable() + *
  • tuneModelCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java index 7296b3cf88c6..ec4df7c0f849 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java @@ -58,19 +58,27 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Predict

Makes a recommendation prediction.

+ *

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

+ *
    + *
  • predict(PredictRequest request) + *
+ *

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

+ *
    + *
  • predictCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java index 39a459ebbbd3..af23a470f57b 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java @@ -64,19 +64,247 @@ *

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

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateProduct

Creates a [Product][google.cloud.retail.v2beta.Product].

+ *

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

+ *
    + *
  • createProduct(CreateProductRequest request) + *
+ *

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

+ *
    + *
  • createProduct(BranchName parent, Product product, String productId) + *
  • createProduct(String parent, Product product, String productId) + *
+ *

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

+ *
    + *
  • createProductCallable() + *
+ *
GetProduct

Gets a [Product][google.cloud.retail.v2beta.Product].

+ *

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

+ *
    + *
  • getProduct(GetProductRequest request) + *
+ *

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

+ *
    + *
  • getProduct(ProductName name) + *
  • getProduct(String name) + *
+ *

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

+ *
    + *
  • getProductCallable() + *
+ *
ListProducts

Gets a list of [Product][google.cloud.retail.v2beta.Product]s.

+ *

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

+ *
    + *
  • listProducts(ListProductsRequest request) + *
+ *

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

+ *
    + *
  • listProducts(BranchName parent) + *
  • listProducts(String parent) + *
+ *

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

+ *
    + *
  • listProductsPagedCallable() + *
  • listProductsCallable() + *
+ *
UpdateProduct

Updates a [Product][google.cloud.retail.v2beta.Product].

+ *

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

+ *
    + *
  • updateProduct(UpdateProductRequest request) + *
+ *

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

+ *
    + *
  • updateProduct(Product product, FieldMask updateMask) + *
+ *

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

+ *
    + *
  • updateProductCallable() + *
+ *
DeleteProduct

Deletes a [Product][google.cloud.retail.v2beta.Product].

+ *

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

+ *
    + *
  • deleteProduct(DeleteProductRequest request) + *
+ *

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

+ *
    + *
  • deleteProduct(ProductName name) + *
  • deleteProduct(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteProductCallable() + *
+ *
ImportProducts

Bulk import of multiple [Product][google.cloud.retail.v2beta.Product]s. + *

Request processing may be synchronous. Non-existing items are created. + *

Note that it is possible for a subset of the [Product][google.cloud.retail.v2beta.Product]s to be successfully updated.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importProductsAsync(ImportProductsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importProductsOperationCallable() + *
  • importProductsCallable() + *
+ *
SetInventory

Updates inventory information for a [Product][google.cloud.retail.v2beta.Product] while respecting the last update timestamps of each inventory field. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + *

When inventory is updated with [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] request. + *

If no inventory fields are set in [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then any pre-existing inventory information for this product is used. + *

If no inventory fields are set in [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], then any existing inventory information is preserved. + *

Pre-existing inventory information can only be updated with [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], and [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + *

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates are not marked as [done][google.longrunning.Operation.done] until they are obsolete.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setInventoryAsync(SetInventoryRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • setInventoryAsync(Product inventory, FieldMask setMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setInventoryOperationCallable() + *
  • setInventoryCallable() + *
+ *
AddFulfillmentPlaces

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • addFulfillmentPlacesAsync(AddFulfillmentPlacesRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • addFulfillmentPlacesAsync(ProductName product) + *
  • addFulfillmentPlacesAsync(String product) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • addFulfillmentPlacesOperationCallable() + *
  • addFulfillmentPlacesCallable() + *
+ *
RemoveFulfillmentPlaces

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data. + *

Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removeFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • removeFulfillmentPlacesAsync(ProductName product) + *
  • removeFulfillmentPlacesAsync(String product) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removeFulfillmentPlacesOperationCallable() + *
  • removeFulfillmentPlacesCallable() + *
+ *
AddLocalInventories

Updates local inventory information for a [Product][google.cloud.retail.v2beta.Product] at a list of places, while respecting the last update timestamps of each inventory field. + *

This process is asynchronous and does not require the [Product][google.cloud.retail.v2beta.Product] to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + *

Local inventory information can only be modified using this method. [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local inventories. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • addLocalInventoriesAsync(AddLocalInventoriesRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • addLocalInventoriesAsync(ProductName product) + *
  • addLocalInventoriesAsync(String product) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • addLocalInventoriesOperationCallable() + *
  • addLocalInventoriesCallable() + *
+ *
RemoveLocalInventories

Remove local inventory information for a [Product][google.cloud.retail.v2beta.Product] at a list of places at a removal timestamp. + *

This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the [Product][google.cloud.retail.v2beta.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + *

Local inventory information can only be removed using this method. [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no effect on local inventories. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removeLocalInventoriesAsync(RemoveLocalInventoriesRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • removeLocalInventoriesAsync(ProductName product) + *
  • removeLocalInventoriesAsync(String product) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removeLocalInventoriesOperationCallable() + *
  • removeLocalInventoriesCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java index 00fbf833b87d..116a0df1a7e6 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java @@ -84,19 +84,29 @@ *

Note: close() needs to be called on the SearchServiceClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Search

Performs a search. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • search(SearchRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchPagedCallable() + *
  • searchCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java index 98c38f071e13..9b787ed9009b 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java @@ -62,19 +62,149 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateServingConfig

Creates a ServingConfig. + *

A maximum of 100 [ServingConfig][google.cloud.retail.v2beta.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2beta.Catalog], otherwise a FAILED_PRECONDITION error is returned.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createServingConfig(CreateServingConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createServingConfig(CatalogName parent, ServingConfig servingConfig, String servingConfigId) + *
  • createServingConfig(String parent, ServingConfig servingConfig, String servingConfigId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServingConfigCallable() + *
+ *
DeleteServingConfig

Deletes a ServingConfig. + *

Returns a NotFound error if the ServingConfig does not exist.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteServingConfig(DeleteServingConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteServingConfig(ServingConfigName name) + *
  • deleteServingConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteServingConfigCallable() + *
+ *
UpdateServingConfig

Updates a ServingConfig.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateServingConfig(UpdateServingConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateServingConfig(ServingConfig servingConfig, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateServingConfigCallable() + *
+ *
GetServingConfig

Gets a ServingConfig. + *

Returns a NotFound error if the ServingConfig does not exist.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getServingConfig(GetServingConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getServingConfig(ServingConfigName name) + *
  • getServingConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServingConfigCallable() + *
+ *
ListServingConfigs

Lists all ServingConfigs linked to this catalog.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServingConfigs(ListServingConfigsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServingConfigs(CatalogName parent) + *
  • listServingConfigs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServingConfigsPagedCallable() + *
  • listServingConfigsCallable() + *
+ *
AddControl

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • addControl(AddControlRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • addControl(ServingConfigName servingConfig) + *
  • addControl(String servingConfig) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • addControlCallable() + *
+ *
RemoveControl

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removeControl(RemoveControlRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • removeControl(ServingConfigName servingConfig) + *
  • removeControl(String servingConfig) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removeControlCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java index 78939873c175..b0a53d6d5e43 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java @@ -58,19 +58,88 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
WriteUserEvent

Writes a single user event.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • writeUserEvent(WriteUserEventRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • writeUserEventCallable() + *
+ *
CollectUserEvent

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. + *

This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • collectUserEvent(CollectUserEventRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • collectUserEventCallable() + *
+ *
PurgeUserEvents

Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • purgeUserEventsAsync(PurgeUserEventsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • purgeUserEventsOperationCallable() + *
  • purgeUserEventsCallable() + *
+ *
ImportUserEvents

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. + *

`Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importUserEventsAsync(ImportUserEventsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importUserEventsOperationCallable() + *
  • importUserEventsCallable() + *
+ *
RejoinUserEvents

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • rejoinUserEventsAsync(RejoinUserEventsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • rejoinUserEventsOperationCallable() + *
  • rejoinUserEventsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java index 95209aeaa02c..8f6facef4a8e 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java @@ -280,6 +280,12 @@ public CatalogServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java index 5ea01f50aa7d..74a9220d8018 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java @@ -139,6 +139,12 @@ public CompletionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java index 7c3fe37a14ed..6b938d3ff583 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java @@ -206,6 +206,12 @@ public ControlServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java index f5bf29a78f1c..00ea2853731c 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java @@ -251,6 +251,12 @@ public ModelServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java index a4389e6b3dc7..dfc6fd977001 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java @@ -113,6 +113,12 @@ public PredictionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java index 50679710bec8..a8ab4747de7f 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java @@ -337,6 +337,12 @@ public ProductServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java index fda22a1ecb7e..4bd4aaef90c0 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java @@ -174,6 +174,12 @@ public SearchServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java index 3a149c64ab37..fcec62184ad0 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java @@ -235,6 +235,12 @@ public ServingConfigServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java index ca0dcb44d4d4..004e517c7ff5 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java @@ -180,6 +180,12 @@ public UserEventServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "retail"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-run/README.md b/java-run/README.md index b48148de37fb..48ea9de9a9fe 100644 --- a/java-run/README.md +++ b/java-run/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-run.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.32.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java index 4733551fbc32..5750c98c55ac 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ExecutionsClient.java @@ -59,19 +59,92 @@ *

Note: close() needs to be called on the ExecutionsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetExecution

Gets information about an Execution.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getExecution(GetExecutionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getExecution(ExecutionName name) + *
  • getExecution(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getExecutionCallable() + *
+ *
ListExecutions

Lists Executions from a Job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listExecutions(ListExecutionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listExecutions(JobName parent) + *
  • listExecutions(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listExecutionsPagedCallable() + *
  • listExecutionsCallable() + *
+ *
DeleteExecution

Deletes an Execution.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteExecutionAsync(DeleteExecutionRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteExecutionAsync(ExecutionName name) + *
  • deleteExecutionAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteExecutionOperationCallable() + *
  • deleteExecutionCallable() + *
+ *
CancelExecution

Cancels an Execution.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • cancelExecutionAsync(CancelExecutionRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • cancelExecutionAsync(ExecutionName name) + *
  • cancelExecutionAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • cancelExecutionOperationCallable() + *
  • cancelExecutionCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/JobsClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/JobsClient.java index 3a895080b27b..e3276753f5b4 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/JobsClient.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/JobsClient.java @@ -64,19 +64,174 @@ *

Note: close() needs to be called on the JobsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateJob

Creates a Job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createJobAsync(CreateJobRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createJobAsync(LocationName parent, Job job, String jobId) + *
  • createJobAsync(String parent, Job job, String jobId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createJobOperationCallable() + *
  • createJobCallable() + *
+ *
GetJob

Gets information about a Job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getJob(GetJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getJob(JobName name) + *
  • getJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getJobCallable() + *
+ *
ListJobs

Lists Jobs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listJobs(ListJobsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listJobs(LocationName parent) + *
  • listJobs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listJobsPagedCallable() + *
  • listJobsCallable() + *
+ *
UpdateJob

Updates a Job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateJobAsync(UpdateJobRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateJobAsync(Job job) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateJobOperationCallable() + *
  • updateJobCallable() + *
+ *
DeleteJob

Deletes a Job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteJobAsync(DeleteJobRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteJobAsync(JobName name) + *
  • deleteJobAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteJobOperationCallable() + *
  • deleteJobCallable() + *
+ *
RunJob

Triggers creation of a new Execution of this Job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • runJobAsync(RunJobRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • runJobAsync(JobName name) + *
  • runJobAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • runJobOperationCallable() + *
  • runJobCallable() + *
+ *
GetIamPolicy

Gets the IAM Access Control policy currently in effect for the given Job. This result does not include any inherited policies.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the IAM Access control policy for the specified Job. Overwrites any existing policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified Project. + *

There are no permissions required for making this API call.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java index b7708b291bec..66a51fd65a1f 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/RevisionsClient.java @@ -59,19 +59,72 @@ *

Note: close() needs to be called on the RevisionsClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetRevision

Gets information about a Revision.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getRevision(GetRevisionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getRevision(RevisionName name) + *
  • getRevision(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getRevisionCallable() + *
+ *
ListRevisions

Lists Revisions from a given Service, or from a given location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRevisions(ListRevisionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRevisions(ServiceName parent) + *
  • listRevisions(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRevisionsPagedCallable() + *
  • listRevisionsCallable() + *
+ *
DeleteRevision

Deletes a Revision.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteRevisionAsync(DeleteRevisionRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteRevisionAsync(RevisionName name) + *
  • deleteRevisionAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteRevisionOperationCallable() + *
  • deleteRevisionCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java index 9dc88f6b6b50..b7dbf3ea53c0 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/ServicesClient.java @@ -64,19 +64,154 @@ *

Note: close() needs to be called on the ServicesClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateService

Creates a new Service in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createServiceAsync(CreateServiceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createServiceAsync(LocationName parent, Service service, String serviceId) + *
  • createServiceAsync(String parent, Service service, String serviceId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServiceOperationCallable() + *
  • createServiceCallable() + *
+ *
GetService

Gets information about a Service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getService(GetServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getService(ServiceName name) + *
  • getService(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceCallable() + *
+ *
ListServices

Lists Services.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServices(ListServicesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServices(LocationName parent) + *
  • listServices(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServicesPagedCallable() + *
  • listServicesCallable() + *
+ *
UpdateService

Updates a Service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateServiceAsync(UpdateServiceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateServiceAsync(Service service) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateServiceOperationCallable() + *
  • updateServiceCallable() + *
+ *
DeleteService

Deletes a Service. This will cause the Service to stop serving traffic and will delete all revisions.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteServiceAsync(DeleteServiceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteServiceAsync(ServiceName name) + *
  • deleteServiceAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteServiceOperationCallable() + *
  • deleteServiceCallable() + *
+ *
GetIamPolicy

Gets the IAM Access Control policy currently in effect for the given Cloud Run Service. This result does not include any inherited policies.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the IAM Access control policy for the specified Service. Overwrites any existing policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified Project. + *

There are no permissions required for making this API call.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java index 440a8b0143f6..5b709f9602d9 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/TasksClient.java @@ -54,19 +54,52 @@ *

Note: close() needs to be called on the TasksClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetTask

Gets information about a Task.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTask(GetTaskRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTask(TaskName name) + *
  • getTask(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getTaskCallable() + *
+ *
ListTasks

Lists Tasks from an Execution of a Job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTasks(ListTasksRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTasks(ExecutionName parent) + *
  • listTasks(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTasksPagedCallable() + *
  • listTasksCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStubSettings.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStubSettings.java index 07f203463fb5..732c6bd8f919 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStubSettings.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ExecutionsStubSettings.java @@ -220,6 +220,12 @@ public ExecutionsStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "run"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/JobsStubSettings.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/JobsStubSettings.java index 264c3dbae505..4c2ec642f213 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/JobsStubSettings.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/JobsStubSettings.java @@ -264,6 +264,12 @@ public JobsStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "run"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/RevisionsStubSettings.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/RevisionsStubSettings.java index 42947dd7877e..09fd32abdb3c 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/RevisionsStubSettings.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/RevisionsStubSettings.java @@ -203,6 +203,12 @@ public RevisionsStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "run"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ServicesStubSettings.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ServicesStubSettings.java index 05749ef347b4..5af6b0022a04 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ServicesStubSettings.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/ServicesStubSettings.java @@ -258,6 +258,12 @@ public ServicesStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "run"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/TasksStubSettings.java b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/TasksStubSettings.java index 0fd5a8677afa..faa53e06dcc3 100644 --- a/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/TasksStubSettings.java +++ b/java-run/google-cloud-run/src/main/java/com/google/cloud/run/v2/stub/TasksStubSettings.java @@ -181,6 +181,12 @@ public TasksStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "run"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-scheduler/README.md b/java-scheduler/README.md index c17a8f1ceb86..8fc96200b144 100644 --- a/java-scheduler/README.md +++ b/java-scheduler/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-scheduler.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-scheduler/2.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-scheduler/2.32.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/CloudSchedulerClient.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/CloudSchedulerClient.java index 86a969ac32db..46fc9e51e77f 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/CloudSchedulerClient.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/CloudSchedulerClient.java @@ -61,19 +61,199 @@ *

Note: close() needs to be called on the CloudSchedulerClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListJobs

Lists jobs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listJobs(ListJobsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listJobs(LocationName parent) + *
  • listJobs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listJobsPagedCallable() + *
  • listJobsCallable() + *
+ *
GetJob

Gets a job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getJob(GetJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getJob(JobName name) + *
  • getJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getJobCallable() + *
+ *
CreateJob

Creates a job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createJob(CreateJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createJob(LocationName parent, Job job) + *
  • createJob(String parent, Job job) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createJobCallable() + *
+ *
UpdateJob

Updates a job. + *

If successful, the updated [Job][google.cloud.scheduler.v1.Job] is returned. If the job does not exist, `NOT_FOUND` is returned. + *

If UpdateJob does not successfully return, it is possible for the job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1.Job.State.UPDATE_FAILED] state. A job in this state may not be executed. If this happens, retry the UpdateJob request until a successful response is received.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateJob(UpdateJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateJob(Job job, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateJobCallable() + *
+ *
DeleteJob

Deletes a job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteJob(DeleteJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteJob(JobName name) + *
  • deleteJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteJobCallable() + *
+ *
PauseJob

Pauses a job. + *

If a job is paused then the system will stop executing the job until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob]. The state of the job is stored in [state][google.cloud.scheduler.v1.Job.state]; if paused it will be set to [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED] to be paused.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • pauseJob(PauseJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • pauseJob(JobName name) + *
  • pauseJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • pauseJobCallable() + *
+ *
ResumeJob

Resume a job. + *

This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED]. The state of a job is stored in [Job.state][google.cloud.scheduler.v1.Job.state]; after calling this method it will be set to [Job.State.ENABLED][google.cloud.scheduler.v1.Job.State.ENABLED]. A job must be in [Job.State.PAUSED][google.cloud.scheduler.v1.Job.State.PAUSED] to be resumed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • resumeJob(ResumeJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • resumeJob(JobName name) + *
  • resumeJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • resumeJobCallable() + *
+ *
RunJob

Forces a job to run now. + *

When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • runJob(RunJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • runJob(JobName name) + *
  • runJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • runJobCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/CloudSchedulerStubSettings.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/CloudSchedulerStubSettings.java index 62fcaf1cf070..984d3174280b 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/CloudSchedulerStubSettings.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/CloudSchedulerStubSettings.java @@ -299,6 +299,12 @@ public CloudSchedulerStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudscheduler"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java index d447ff8b5138..1ebff4cf3f56 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/CloudSchedulerClient.java @@ -62,19 +62,199 @@ *

Note: close() needs to be called on the CloudSchedulerClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListJobs

Lists jobs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listJobs(ListJobsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listJobs(LocationName parent) + *
  • listJobs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listJobsPagedCallable() + *
  • listJobsCallable() + *
+ *
GetJob

Gets a job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getJob(GetJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getJob(JobName name) + *
  • getJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getJobCallable() + *
+ *
CreateJob

Creates a job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createJob(CreateJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createJob(LocationName parent, Job job) + *
  • createJob(String parent, Job job) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createJobCallable() + *
+ *
UpdateJob

Updates a job. + *

If successful, the updated [Job][google.cloud.scheduler.v1beta1.Job] is returned. If the job does not exist, `NOT_FOUND` is returned. + *

If UpdateJob does not successfully return, it is possible for the job to be in an [Job.State.UPDATE_FAILED][google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED] state. A job in this state may not be executed. If this happens, retry the UpdateJob request until a successful response is received.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateJob(UpdateJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateJob(Job job, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateJobCallable() + *
+ *
DeleteJob

Deletes a job.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteJob(DeleteJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteJob(JobName name) + *
  • deleteJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteJobCallable() + *
+ *
PauseJob

Pauses a job. + *

If a job is paused then the system will stop executing the job until it is re-enabled via [ResumeJob][google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob]. The state of the job is stored in [state][google.cloud.scheduler.v1beta1.Job.state]; if paused it will be set to [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. A job must be in [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED] to be paused.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • pauseJob(PauseJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • pauseJob(JobName name) + *
  • pauseJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • pauseJobCallable() + *
+ *
ResumeJob

Resume a job. + *

This method reenables a job after it has been [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED]. The state of a job is stored in [Job.state][google.cloud.scheduler.v1beta1.Job.state]; after calling this method it will be set to [Job.State.ENABLED][google.cloud.scheduler.v1beta1.Job.State.ENABLED]. A job must be in [Job.State.PAUSED][google.cloud.scheduler.v1beta1.Job.State.PAUSED] to be resumed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • resumeJob(ResumeJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • resumeJob(JobName name) + *
  • resumeJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • resumeJobCallable() + *
+ *
RunJob

Forces a job to run now. + *

When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • runJob(RunJobRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • runJob(JobName name) + *
  • runJob(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • runJobCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java index e3ffc7951452..a07f6a233053 100644 --- a/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java +++ b/java-scheduler/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/CloudSchedulerStubSettings.java @@ -300,6 +300,12 @@ public CloudSchedulerStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudscheduler"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-secretmanager/README.md b/java-secretmanager/README.md index d704e971e4db..67904e53da34 100644 --- a/java-secretmanager/README.md +++ b/java-secretmanager/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-secretmanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-secretmanager/2.24.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-secretmanager/2.32.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java b/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java index 7851ef584c1a..e5e6f2eb4156 100644 --- a/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java +++ b/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/SecretManagerServiceClient.java @@ -73,19 +73,291 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListSecrets

Lists [Secrets][google.cloud.secretmanager.v1.Secret].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSecrets(ListSecretsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSecrets(ProjectName parent) + *
  • listSecrets(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSecretsPagedCallable() + *
  • listSecretsCallable() + *
+ *
CreateSecret

Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSecret(CreateSecretRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSecret(ProjectName parent, String secretId, Secret secret) + *
  • createSecret(String parent, String secretId, Secret secret) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSecretCallable() + *
+ *
AddSecretVersion

Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches it to an existing [Secret][google.cloud.secretmanager.v1.Secret].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • addSecretVersion(AddSecretVersionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • addSecretVersion(SecretName parent, SecretPayload payload) + *
  • addSecretVersion(String parent, SecretPayload payload) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • addSecretVersionCallable() + *
+ *
GetSecret

Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSecret(GetSecretRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSecret(SecretName name) + *
  • getSecret(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSecretCallable() + *
+ *
UpdateSecret

Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSecret(UpdateSecretRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSecret(Secret secret, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSecretCallable() + *
+ *
DeleteSecret

Deletes a [Secret][google.cloud.secretmanager.v1.Secret].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSecret(DeleteSecretRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSecret(SecretName name) + *
  • deleteSecret(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSecretCallable() + *
+ *
ListSecretVersions

Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret data.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSecretVersions(ListSecretVersionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSecretVersions(SecretName parent) + *
  • listSecretVersions(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSecretVersionsPagedCallable() + *
  • listSecretVersionsCallable() + *
+ *
GetSecretVersion

Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSecretVersion(GetSecretVersionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSecretVersion(SecretVersionName name) + *
  • getSecretVersion(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSecretVersionCallable() + *
+ *
AccessSecretVersion

Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data. + *

`projects/*/secrets/*/versions/latest` is an alias to the most recently created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • accessSecretVersion(AccessSecretVersionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • accessSecretVersion(SecretVersionName name) + *
  • accessSecretVersion(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • accessSecretVersionCallable() + *
+ *
DisableSecretVersion

Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + *

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • disableSecretVersion(DisableSecretVersionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • disableSecretVersion(SecretVersionName name) + *
  • disableSecretVersion(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • disableSecretVersionCallable() + *
+ *
EnableSecretVersion

Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + *

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • enableSecretVersion(EnableSecretVersionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • enableSecretVersion(SecretVersionName name) + *
  • enableSecretVersion(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • enableSecretVersionCallable() + *
+ *
DestroySecretVersion

Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + *

Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the secret data.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • destroySecretVersion(DestroySecretVersionRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • destroySecretVersion(SecretVersionName name) + *
  • destroySecretVersion(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • destroySecretVersionCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified secret. Replaces any existing policy. + *

Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. + *

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/stub/SecretManagerServiceStubSettings.java b/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/stub/SecretManagerServiceStubSettings.java index ff632b33798a..7158c557a735 100644 --- a/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/stub/SecretManagerServiceStubSettings.java +++ b/java-secretmanager/google-cloud-secretmanager/src/main/java/com/google/cloud/secretmanager/v1/stub/SecretManagerServiceStubSettings.java @@ -358,6 +358,12 @@ public SecretManagerServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "secretmanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-securesourcemanager/README.md b/java-securesourcemanager/README.md index ad6df055b3c3..572b358be1b9 100644 --- a/java-securesourcemanager/README.md +++ b/java-securesourcemanager/README.md @@ -202,7 +202,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securesourcemanager/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securesourcemanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securesourcemanager/0.0.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securesourcemanager/0.2.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/SecureSourceManagerClient.java b/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/SecureSourceManagerClient.java index 75850ffd1b2e..ce4e1bc76f1b 100644 --- a/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/SecureSourceManagerClient.java +++ b/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/SecureSourceManagerClient.java @@ -90,19 +90,305 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListInstances

Lists Instances in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listInstances(ListInstancesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listInstances(LocationName parent) + *
  • listInstances(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listInstancesPagedCallable() + *
  • listInstancesCallable() + *
+ *
GetInstance

Gets details of a single instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getInstance(GetInstanceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getInstance(InstanceName name) + *
  • getInstance(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getInstanceCallable() + *
+ *
CreateInstance

Creates a new instance in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createInstanceAsync(CreateInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createInstanceAsync(LocationName parent, Instance instance, String instanceId) + *
  • createInstanceAsync(String parent, Instance instance, String instanceId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createInstanceOperationCallable() + *
  • createInstanceCallable() + *
+ *
DeleteInstance

Deletes a single instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteInstanceAsync(DeleteInstanceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteInstanceAsync(InstanceName name) + *
  • deleteInstanceAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteInstanceOperationCallable() + *
  • deleteInstanceCallable() + *
+ *
ListRepositories

Lists Repositories in a given project and location. + *

**Host: Data Plane**

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRepositories(ListRepositoriesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRepositories(LocationName parent) + *
  • listRepositories(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRepositoriesPagedCallable() + *
  • listRepositoriesCallable() + *
+ *
GetRepository

Gets metadata of a repository. + *

**Host: Data Plane**

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getRepository(GetRepositoryRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getRepository(RepositoryName name) + *
  • getRepository(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getRepositoryCallable() + *
+ *
CreateRepository

Creates a new repository in a given project and location. + *

**Host: Data Plane**

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createRepositoryAsync(CreateRepositoryRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createRepositoryAsync(LocationName parent, Repository repository, String repositoryId) + *
  • createRepositoryAsync(String parent, Repository repository, String repositoryId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createRepositoryOperationCallable() + *
  • createRepositoryCallable() + *
+ *
DeleteRepository

Deletes a Repository. + *

**Host: Data Plane**

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteRepositoryAsync(DeleteRepositoryRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteRepositoryAsync(RepositoryName name) + *
  • deleteRepositoryAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteRepositoryOperationCallable() + *
  • deleteRepositoryCallable() + *
+ *
GetIamPolicyRepo

Get IAM policy for a repository.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicyRepo(GetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicyRepo(ResourceName resource) + *
  • getIamPolicyRepo(String resource) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyRepoCallable() + *
+ *
SetIamPolicyRepo

Set IAM policy on a repository.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicyRepo(SetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicyRepo(ResourceName resource) + *
  • setIamPolicyRepo(String resource) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyRepoCallable() + *
+ *
TestIamPermissionsRepo

Test IAM permissions on a repository. IAM permission checks are not required on this method.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissionsRepo(TestIamPermissionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • testIamPermissionsRepo(ResourceName resource) + *
  • testIamPermissionsRepo(String resource) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsRepoCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/stub/SecureSourceManagerStubSettings.java b/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/stub/SecureSourceManagerStubSettings.java index b0e8d800fdf3..63e7184ad13f 100644 --- a/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/stub/SecureSourceManagerStubSettings.java +++ b/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/stub/SecureSourceManagerStubSettings.java @@ -450,6 +450,12 @@ public SecureSourceManagerStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "securesourcemanager"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-security-private-ca/README.md b/java-security-private-ca/README.md index 1f8ba1d116d6..49d7b307b515 100644 --- a/java-security-private-ca/README.md +++ b/java-security-private-ca/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-security-private-ca.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-security-private-ca/2.32.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-security-private-ca/2.34.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java index e8396c056eb3..ee3be35c1470 100644 --- a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java +++ b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/CertificateAuthorityServiceClient.java @@ -77,19 +77,651 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateCertificate

Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCertificate(CreateCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createCertificate(CaPoolName parent, Certificate certificate, String certificateId) + *
  • createCertificate(String parent, Certificate certificate, String certificateId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCertificateCallable() + *
+ *
GetCertificate

Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCertificate(GetCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCertificate(CertificateName name) + *
  • getCertificate(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCertificateCallable() + *
+ *
ListCertificates

Lists [Certificates][google.cloud.security.privateca.v1.Certificate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCertificates(ListCertificatesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCertificates(CaPoolName parent) + *
  • listCertificates(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCertificatesPagedCallable() + *
  • listCertificatesCallable() + *
+ *
RevokeCertificate

Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • revokeCertificate(RevokeCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • revokeCertificate(CertificateName name) + *
  • revokeCertificate(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • revokeCertificateCallable() + *
+ *
UpdateCertificate

Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCertificate(UpdateCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateCertificate(Certificate certificate, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCertificateCallable() + *
+ *
ActivateCertificateAuthority

Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • activateCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • activateCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • activateCertificateAuthorityOperationCallable() + *
  • activateCertificateAuthorityCallable() + *
+ *
CreateCertificateAuthority

Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createCertificateAuthorityAsync(CaPoolName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId) + *
  • createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCertificateAuthorityOperationCallable() + *
  • createCertificateAuthorityCallable() + *
+ *
DisableCertificateAuthority

Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • disableCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • disableCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • disableCertificateAuthorityOperationCallable() + *
  • disableCertificateAuthorityCallable() + *
+ *
EnableCertificateAuthority

Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • enableCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • enableCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • enableCertificateAuthorityOperationCallable() + *
  • enableCertificateAuthorityCallable() + *
+ *
FetchCertificateAuthorityCsr

Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • fetchCertificateAuthorityCsr(CertificateAuthorityName name) + *
  • fetchCertificateAuthorityCsr(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • fetchCertificateAuthorityCsrCallable() + *
+ *
GetCertificateAuthority

Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCertificateAuthority(GetCertificateAuthorityRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCertificateAuthority(CertificateAuthorityName name) + *
  • getCertificateAuthority(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCertificateAuthorityCallable() + *
+ *
ListCertificateAuthorities

Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCertificateAuthorities(ListCertificateAuthoritiesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCertificateAuthorities(CaPoolName parent) + *
  • listCertificateAuthorities(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCertificateAuthoritiesPagedCallable() + *
  • listCertificateAuthoritiesCallable() + *
+ *
UndeleteCertificateAuthority

Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • undeleteCertificateAuthorityAsync(UndeleteCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • undeleteCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • undeleteCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • undeleteCertificateAuthorityOperationCallable() + *
  • undeleteCertificateAuthorityCallable() + *
+ *
DeleteCertificateAuthority

Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCertificateAuthorityAsync(DeleteCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • deleteCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteCertificateAuthorityOperationCallable() + *
  • deleteCertificateAuthorityCallable() + *
+ *
UpdateCertificateAuthority

Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCertificateAuthorityOperationCallable() + *
  • updateCertificateAuthorityCallable() + *
+ *
CreateCaPool

Create a [CaPool][google.cloud.security.privateca.v1.CaPool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCaPoolAsync(CreateCaPoolRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createCaPoolAsync(LocationName parent, CaPool caPool, String caPoolId) + *
  • createCaPoolAsync(String parent, CaPool caPool, String caPoolId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCaPoolOperationCallable() + *
  • createCaPoolCallable() + *
+ *
UpdateCaPool

Update a [CaPool][google.cloud.security.privateca.v1.CaPool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCaPoolAsync(UpdateCaPoolRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCaPoolAsync(CaPool caPool, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCaPoolOperationCallable() + *
  • updateCaPoolCallable() + *
+ *
GetCaPool

Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCaPool(GetCaPoolRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCaPool(CaPoolName name) + *
  • getCaPool(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCaPoolCallable() + *
+ *
ListCaPools

Lists [CaPools][google.cloud.security.privateca.v1.CaPool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCaPools(ListCaPoolsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCaPools(LocationName parent) + *
  • listCaPools(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCaPoolsPagedCallable() + *
  • listCaPoolsCallable() + *
+ *
DeleteCaPool

Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCaPoolAsync(DeleteCaPoolRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteCaPoolAsync(CaPoolName name) + *
  • deleteCaPoolAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteCaPoolOperationCallable() + *
  • deleteCaPoolCallable() + *
+ *
FetchCaCerts

FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all ACTIVE [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources in the [CaPool][google.cloud.security.privateca.v1.CaPool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchCaCerts(FetchCaCertsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • fetchCaCerts(CaPoolName caPool) + *
  • fetchCaCerts(String caPool) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • fetchCaCertsCallable() + *
+ *
GetCertificateRevocationList

Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCertificateRevocationList(GetCertificateRevocationListRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCertificateRevocationList(CertificateRevocationListName name) + *
  • getCertificateRevocationList(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCertificateRevocationListCallable() + *
+ *
ListCertificateRevocationLists

Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCertificateRevocationLists(ListCertificateRevocationListsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCertificateRevocationLists(CertificateAuthorityName parent) + *
  • listCertificateRevocationLists(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCertificateRevocationListsPagedCallable() + *
  • listCertificateRevocationListsCallable() + *
+ *
UpdateCertificateRevocationList

Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCertificateRevocationListOperationCallable() + *
  • updateCertificateRevocationListCallable() + *
+ *
CreateCertificateTemplate

Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCertificateTemplateAsync(CreateCertificateTemplateRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createCertificateTemplateAsync(LocationName parent, CertificateTemplate certificateTemplate, String certificateTemplateId) + *
  • createCertificateTemplateAsync(String parent, CertificateTemplate certificateTemplate, String certificateTemplateId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCertificateTemplateOperationCallable() + *
  • createCertificateTemplateCallable() + *
+ *
DeleteCertificateTemplate

DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCertificateTemplateAsync(DeleteCertificateTemplateRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteCertificateTemplateAsync(CertificateTemplateName name) + *
  • deleteCertificateTemplateAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteCertificateTemplateOperationCallable() + *
  • deleteCertificateTemplateCallable() + *
+ *
GetCertificateTemplate

Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCertificateTemplate(GetCertificateTemplateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCertificateTemplate(CertificateTemplateName name) + *
  • getCertificateTemplate(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCertificateTemplateCallable() + *
+ *
ListCertificateTemplates

Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCertificateTemplates(ListCertificateTemplatesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCertificateTemplates(LocationName parent) + *
  • listCertificateTemplates(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCertificateTemplatesPagedCallable() + *
  • listCertificateTemplatesCallable() + *
+ *
UpdateCertificateTemplate

Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCertificateTemplateAsync(UpdateCertificateTemplateRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCertificateTemplateAsync(CertificateTemplate certificateTemplate, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCertificateTemplateOperationCallable() + *
  • updateCertificateTemplateCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/stub/CertificateAuthorityServiceStubSettings.java b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/stub/CertificateAuthorityServiceStubSettings.java index 5252f0cd5bf6..ba79672e5a0a 100644 --- a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/stub/CertificateAuthorityServiceStubSettings.java +++ b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1/stub/CertificateAuthorityServiceStubSettings.java @@ -977,6 +977,12 @@ public CertificateAuthorityServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "privateca"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClient.java b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClient.java index 9daa862a673d..ab59d5dea8de 100644 --- a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClient.java +++ b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/CertificateAuthorityServiceClient.java @@ -68,19 +68,402 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateCertificate

Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCertificate(CreateCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createCertificate(CertificateAuthorityName parent, Certificate certificate, String certificateId) + *
  • createCertificate(String parent, Certificate certificate, String certificateId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCertificateCallable() + *
+ *
GetCertificate

Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCertificate(GetCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCertificate(CertificateName name) + *
  • getCertificate(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCertificateCallable() + *
+ *
ListCertificates

Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCertificates(ListCertificatesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCertificates(CertificateAuthorityName parent) + *
  • listCertificates(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCertificatesPagedCallable() + *
  • listCertificatesCallable() + *
+ *
RevokeCertificate

Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • revokeCertificate(RevokeCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • revokeCertificate(CertificateName name) + *
  • revokeCertificate(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • revokeCertificateCallable() + *
+ *
UpdateCertificate

Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCertificate(UpdateCertificateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateCertificate(Certificate certificate, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCertificateCallable() + *
+ *
ActivateCertificateAuthority

Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • activateCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • activateCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • activateCertificateAuthorityOperationCallable() + *
  • activateCertificateAuthorityCallable() + *
+ *
CreateCertificateAuthority

Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createCertificateAuthorityAsync(LocationName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId) + *
  • createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCertificateAuthorityOperationCallable() + *
  • createCertificateAuthorityCallable() + *
+ *
DisableCertificateAuthority

Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • disableCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • disableCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • disableCertificateAuthorityOperationCallable() + *
  • disableCertificateAuthorityCallable() + *
+ *
EnableCertificateAuthority

Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • enableCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • enableCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • enableCertificateAuthorityOperationCallable() + *
  • enableCertificateAuthorityCallable() + *
+ *
FetchCertificateAuthorityCsr

Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • fetchCertificateAuthorityCsr(CertificateAuthorityName name) + *
  • fetchCertificateAuthorityCsr(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • fetchCertificateAuthorityCsrCallable() + *
+ *
GetCertificateAuthority

Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCertificateAuthority(GetCertificateAuthorityRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCertificateAuthority(CertificateAuthorityName name) + *
  • getCertificateAuthority(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCertificateAuthorityCallable() + *
+ *
ListCertificateAuthorities

Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCertificateAuthorities(ListCertificateAuthoritiesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCertificateAuthorities(LocationName parent) + *
  • listCertificateAuthorities(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCertificateAuthoritiesPagedCallable() + *
  • listCertificateAuthoritiesCallable() + *
+ *
RestoreCertificateAuthority

Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • restoreCertificateAuthorityAsync(RestoreCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • restoreCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • restoreCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • restoreCertificateAuthorityOperationCallable() + *
  • restoreCertificateAuthorityCallable() + *
+ *
ScheduleDeleteCertificateAuthority

Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • scheduleDeleteCertificateAuthorityAsync(ScheduleDeleteCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • scheduleDeleteCertificateAuthorityAsync(CertificateAuthorityName name) + *
  • scheduleDeleteCertificateAuthorityAsync(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • scheduleDeleteCertificateAuthorityOperationCallable() + *
  • scheduleDeleteCertificateAuthorityCallable() + *
+ *
UpdateCertificateAuthority

Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCertificateAuthorityOperationCallable() + *
  • updateCertificateAuthorityCallable() + *
+ *
GetCertificateRevocationList

Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCertificateRevocationList(GetCertificateRevocationListRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCertificateRevocationList(CertificateRevocationListName name) + *
  • getCertificateRevocationList(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCertificateRevocationListCallable() + *
+ *
ListCertificateRevocationLists

Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCertificateRevocationLists(ListCertificateRevocationListsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCertificateRevocationLists(CertificateAuthorityName parent) + *
  • listCertificateRevocationLists(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCertificateRevocationListsPagedCallable() + *
  • listCertificateRevocationListsCallable() + *
+ *
UpdateCertificateRevocationList

Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCertificateRevocationListOperationCallable() + *
  • updateCertificateRevocationListCallable() + *
+ *
GetReusableConfig

Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getReusableConfig(GetReusableConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getReusableConfig(ReusableConfigName name) + *
  • getReusableConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getReusableConfigCallable() + *
+ *
ListReusableConfigs

Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listReusableConfigs(ListReusableConfigsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listReusableConfigs(LocationName parent) + *
  • listReusableConfigs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listReusableConfigsPagedCallable() + *
  • listReusableConfigsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStubSettings.java b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStubSettings.java index 65fcb6073890..125313ba3219 100644 --- a/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStubSettings.java +++ b/java-security-private-ca/google-cloud-security-private-ca/src/main/java/com/google/cloud/security/privateca/v1beta1/stub/CertificateAuthorityServiceStubSettings.java @@ -681,6 +681,12 @@ public CertificateAuthorityServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "privateca"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-securitycenter-settings/README.md b/java-securitycenter-settings/README.md index 04bc6c4ba775..ea22a387eb07 100644 --- a/java-securitycenter-settings/README.md +++ b/java-securitycenter-settings/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securitycenter-settings.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter-settings/0.33.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter-settings/0.35.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/SecurityCenterSettingsServiceClient.java b/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/SecurityCenterSettingsServiceClient.java index d0b0dfcc493a..5ba9ae6995f0 100644 --- a/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/SecurityCenterSettingsServiceClient.java +++ b/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/SecurityCenterSettingsServiceClient.java @@ -63,19 +63,242 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetServiceAccount

Retrieves the organizations service account, if it exists, otherwise it creates the organization service account. This API is idempotent and will only create a service account once. On subsequent calls it will return the previously created service account. SHA, SCC and CTD Infra Automation will use this SA. This SA will not have any permissions when created. The UI will provision this via IAM or the user will using their own internal process. This API only creates SAs on the organization. Folders are not supported and projects will use per-project SAs associated with APIs enabled on a project. This API will be called by the UX onboarding workflow.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getServiceAccount(GetServiceAccountRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getServiceAccount(ServiceAccountName name) + *
  • getServiceAccount(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceAccountCallable() + *
+ *
GetSettings

Gets the Settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSettings(GetSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSettings(SettingsName name) + *
  • getSettings(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSettingsCallable() + *
+ *
UpdateSettings

Updates the Settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSettings(UpdateSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSettings(Settings settings, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSettingsCallable() + *
+ *
ResetSettings

Reset the organization, folder or project's settings and return the settings of just that resource to the default. + *

Settings are present at the organization, folder, project, and cluster levels. Using Reset on a sub-organization level will remove that resource's override and result in the parent's settings being used (eg: if Reset on a cluster, project settings will be used). + *

Using Reset on organization will remove the override that was set and result in default settings being used.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • resetSettings(ResetSettingsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • resetSettingsCallable() + *
+ *
BatchGetSettings

Gets a list of settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchGetSettings(BatchGetSettingsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchGetSettingsCallable() + *
+ *
CalculateEffectiveSettings

CalculateEffectiveSettings looks up all of the Security Center Settings resources in the GCP resource hierarchy, and calculates the effective settings on that resource by applying the following rules: * Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). * Product defaults can be overridden at org, folder, project, and cluster levels. * Detectors will be filtered out if they belong to a billing tier the customer has not configured.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • calculateEffectiveSettings(CalculateEffectiveSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • calculateEffectiveSettings(SettingsName name) + *
  • calculateEffectiveSettings(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • calculateEffectiveSettingsCallable() + *
+ *
BatchCalculateEffectiveSettings

Gets a list of effective settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchCalculateEffectiveSettings(BatchCalculateEffectiveSettingsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchCalculateEffectiveSettingsCallable() + *
+ *
GetComponentSettings

Gets the Component Settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getComponentSettings(GetComponentSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getComponentSettings(ComponentSettingsName name) + *
  • getComponentSettings(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getComponentSettingsCallable() + *
+ *
UpdateComponentSettings

Updates the Component Settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateComponentSettings(UpdateComponentSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateComponentSettings(ComponentSettings componentSettings, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateComponentSettingsCallable() + *
+ *
ResetComponentSettings

Reset the organization, folder or project's component settings and return the settings to the default. Settings are present at the organization, folder and project levels. Using Reset for a folder or project will remove the override that was set and result in the organization-level settings being used.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • resetComponentSettings(ResetComponentSettingsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • resetComponentSettingsCallable() + *
+ *
CalculateEffectiveComponentSettings

Gets the Effective Component Settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • calculateEffectiveComponentSettings(CalculateEffectiveComponentSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • calculateEffectiveComponentSettings(ComponentSettingsName name) + *
  • calculateEffectiveComponentSettings(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • calculateEffectiveComponentSettingsCallable() + *
+ *
ListDetectors

Retrieves an unordered list of available detectors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDetectors(ListDetectorsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDetectors(OrganizationName parent) + *
  • listDetectors(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDetectorsPagedCallable() + *
  • listDetectorsCallable() + *
+ *
ListComponents

Retrieves an unordered list of available SCC components.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listComponents(ListComponentsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listComponents(OrganizationName parent) + *
  • listComponents(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listComponentsPagedCallable() + *
  • listComponentsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/stub/SecurityCenterSettingsServiceStubSettings.java b/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/stub/SecurityCenterSettingsServiceStubSettings.java index b50479015416..f6f634076ba3 100644 --- a/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/stub/SecurityCenterSettingsServiceStubSettings.java +++ b/java-securitycenter-settings/google-cloud-securitycenter-settings/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/stub/SecurityCenterSettingsServiceStubSettings.java @@ -339,6 +339,12 @@ public SecurityCenterSettingsServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "securitycenter"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-securitycenter/README.md b/java-securitycenter/README.md index e09e689d5d83..d633e7e96280 100644 --- a/java-securitycenter/README.md +++ b/java-securitycenter/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securitycenter.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter/2.38.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter/2.40.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java index 30cd5128a1ec..564fef6ed2c7 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java @@ -73,19 +73,882 @@ *

Note: close() needs to be called on the SecurityCenterClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
BulkMuteFindings

Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • bulkMuteFindingsAsync(BulkMuteFindingsRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • bulkMuteFindingsAsync(ResourceName parent) + *
  • bulkMuteFindingsAsync(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • bulkMuteFindingsOperationCallable() + *
  • bulkMuteFindingsCallable() + *
+ *
CreateSecurityHealthAnalyticsCustomModule

Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsSettingsName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule) + *
  • createSecurityHealthAnalyticsCustomModule(String parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSecurityHealthAnalyticsCustomModuleCallable() + *
+ *
CreateSource

Creates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSource(CreateSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSource(OrganizationName parent, Source source) + *
  • createSource(String parent, Source source) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSourceCallable() + *
+ *
CreateFinding

Creates a finding. The corresponding source must exist for finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createFinding(CreateFindingRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createFinding(SourceName parent, String findingId, Finding finding) + *
  • createFinding(String parent, String findingId, Finding finding) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createFindingCallable() + *
+ *
CreateMuteConfig

Creates a mute config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createMuteConfig(CreateMuteConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createMuteConfig(FolderName parent, MuteConfig muteConfig) + *
  • createMuteConfig(OrganizationName parent, MuteConfig muteConfig) + *
  • createMuteConfig(ProjectName parent, MuteConfig muteConfig) + *
  • createMuteConfig(String parent, MuteConfig muteConfig) + *
  • createMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId) + *
  • createMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId) + *
  • createMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId) + *
  • createMuteConfig(String parent, MuteConfig muteConfig, String muteConfigId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createMuteConfigCallable() + *
+ *
CreateNotificationConfig

Creates a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createNotificationConfig(CreateNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createNotificationConfig(FolderName parent, NotificationConfig notificationConfig) + *
  • createNotificationConfig(OrganizationName parent, NotificationConfig notificationConfig) + *
  • createNotificationConfig(ProjectName parent, NotificationConfig notificationConfig) + *
  • createNotificationConfig(String parent, NotificationConfig notificationConfig) + *
  • createNotificationConfig(FolderName parent, String configId, NotificationConfig notificationConfig) + *
  • createNotificationConfig(OrganizationName parent, String configId, NotificationConfig notificationConfig) + *
  • createNotificationConfig(ProjectName parent, String configId, NotificationConfig notificationConfig) + *
  • createNotificationConfig(String parent, String configId, NotificationConfig notificationConfig) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createNotificationConfigCallable() + *
+ *
DeleteMuteConfig

Deletes an existing mute config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteMuteConfig(DeleteMuteConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteMuteConfig(MuteConfigName name) + *
  • deleteMuteConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteMuteConfigCallable() + *
+ *
DeleteNotificationConfig

Deletes a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNotificationConfig(DeleteNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteNotificationConfig(NotificationConfigName name) + *
  • deleteNotificationConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNotificationConfigCallable() + *
+ *
DeleteSecurityHealthAnalyticsCustomModule

Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name) + *
  • deleteSecurityHealthAnalyticsCustomModule(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSecurityHealthAnalyticsCustomModuleCallable() + *
+ *
GetBigQueryExport

Gets a BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBigQueryExport(GetBigQueryExportRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBigQueryExport(BigQueryExportName name) + *
  • getBigQueryExport(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBigQueryExportCallable() + *
+ *
GetIamPolicy

Gets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
GetMuteConfig

Gets a mute config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getMuteConfig(GetMuteConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getMuteConfig(MuteConfigName name) + *
  • getMuteConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getMuteConfigCallable() + *
+ *
GetNotificationConfig

Gets a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNotificationConfig(GetNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNotificationConfig(NotificationConfigName name) + *
  • getNotificationConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNotificationConfigCallable() + *
+ *
GetOrganizationSettings

Gets the settings for an organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getOrganizationSettings(GetOrganizationSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getOrganizationSettings(OrganizationSettingsName name) + *
  • getOrganizationSettings(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getOrganizationSettingsCallable() + *
+ *
GetEffectiveSecurityHealthAnalyticsCustomModule

Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getEffectiveSecurityHealthAnalyticsCustomModule(EffectiveSecurityHealthAnalyticsCustomModuleName name) + *
  • getEffectiveSecurityHealthAnalyticsCustomModule(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getEffectiveSecurityHealthAnalyticsCustomModuleCallable() + *
+ *
GetSecurityHealthAnalyticsCustomModule

Retrieves a SecurityHealthAnalyticsCustomModule.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name) + *
  • getSecurityHealthAnalyticsCustomModule(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSecurityHealthAnalyticsCustomModuleCallable() + *
+ *
GetSource

Gets a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSource(GetSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSource(SourceName name) + *
  • getSource(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSourceCallable() + *
+ *
GroupAssets

Filters an organization's assets and groups them by their specified properties.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • groupAssets(GroupAssetsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • groupAssetsPagedCallable() + *
  • groupAssetsCallable() + *
+ *
GroupFindings

Filters an organization or source's findings and groups them by their specified properties. + *

To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • groupFindings(GroupFindingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • groupFindings(SourceName parent, String groupBy) + *
  • groupFindings(String parent, String groupBy) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • groupFindingsPagedCallable() + *
  • groupFindingsCallable() + *
+ *
ListAssets

Lists an organization's assets.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAssets(ListAssetsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAssetsPagedCallable() + *
  • listAssetsCallable() + *
+ *
ListDescendantSecurityHealthAnalyticsCustomModules

Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDescendantSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent) + *
  • listDescendantSecurityHealthAnalyticsCustomModules(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable() + *
  • listDescendantSecurityHealthAnalyticsCustomModulesCallable() + *
+ *
ListFindings

Lists an organization or source's findings. + *

To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listFindings(ListFindingsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listFindingsPagedCallable() + *
  • listFindingsCallable() + *
+ *
ListMuteConfigs

Lists mute configs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listMuteConfigs(ListMuteConfigsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listMuteConfigs(FolderName parent) + *
  • listMuteConfigs(OrganizationName parent) + *
  • listMuteConfigs(ProjectName parent) + *
  • listMuteConfigs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listMuteConfigsPagedCallable() + *
  • listMuteConfigsCallable() + *
+ *
ListNotificationConfigs

Lists notification configs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNotificationConfigs(ListNotificationConfigsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNotificationConfigs(FolderName parent) + *
  • listNotificationConfigs(OrganizationName parent) + *
  • listNotificationConfigs(ProjectName parent) + *
  • listNotificationConfigs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNotificationConfigsPagedCallable() + *
  • listNotificationConfigsCallable() + *
+ *
ListEffectiveSecurityHealthAnalyticsCustomModules

Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listEffectiveSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent) + *
  • listEffectiveSecurityHealthAnalyticsCustomModules(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable() + *
  • listEffectiveSecurityHealthAnalyticsCustomModulesCallable() + *
+ *
ListSecurityHealthAnalyticsCustomModules

Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSecurityHealthAnalyticsCustomModules(ListSecurityHealthAnalyticsCustomModulesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent) + *
  • listSecurityHealthAnalyticsCustomModules(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSecurityHealthAnalyticsCustomModulesPagedCallable() + *
  • listSecurityHealthAnalyticsCustomModulesCallable() + *
+ *
ListSources

Lists all sources belonging to an organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSources(ListSourcesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSources(FolderName parent) + *
  • listSources(OrganizationName parent) + *
  • listSources(ProjectName parent) + *
  • listSources(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSourcesPagedCallable() + *
  • listSourcesCallable() + *
+ *
RunAssetDiscovery

Runs asset discovery. The discovery is tracked with a long-running operation. + *

This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • runAssetDiscoveryAsync(RunAssetDiscoveryRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • runAssetDiscoveryAsync(OrganizationName parent) + *
  • runAssetDiscoveryAsync(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • runAssetDiscoveryOperationCallable() + *
  • runAssetDiscoveryCallable() + *
+ *
SetFindingState

Updates the state of a finding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setFindingState(SetFindingStateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setFindingState(FindingName name, Finding.State state, Timestamp startTime) + *
  • setFindingState(String name, Finding.State state, Timestamp startTime) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setFindingStateCallable() + *
+ *
SetMute

Updates the mute state of a finding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setMute(SetMuteRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setMute(FindingName name, Finding.Mute mute) + *
  • setMute(String name, Finding.Mute mute) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setMuteCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns the permissions that a caller has on the specified source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
SimulateSecurityHealthAnalyticsCustomModule

Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • simulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • simulateSecurityHealthAnalyticsCustomModule(String parent, CustomConfig customConfig, SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • simulateSecurityHealthAnalyticsCustomModuleCallable() + *
+ *
UpdateExternalSystem

Updates external system. This is for a given finding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateExternalSystem(UpdateExternalSystemRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateExternalSystem(ExternalSystem externalSystem, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateExternalSystemCallable() + *
+ *
UpdateFinding

Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateFinding(UpdateFindingRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateFinding(Finding finding) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateFindingCallable() + *
+ *
UpdateMuteConfig

Updates a mute config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateMuteConfig(UpdateMuteConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateMuteConfig(MuteConfig muteConfig, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateMuteConfigCallable() + *
+ *
UpdateNotificationConfig

Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateNotificationConfig(UpdateNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateNotificationConfig(NotificationConfig notificationConfig) + *
  • updateNotificationConfig(NotificationConfig notificationConfig, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateNotificationConfigCallable() + *
+ *
UpdateOrganizationSettings

Updates an organization's settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateOrganizationSettings(UpdateOrganizationSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateOrganizationSettings(OrganizationSettings organizationSettings) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateOrganizationSettingsCallable() + *
+ *
UpdateSecurityHealthAnalyticsCustomModule

Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSecurityHealthAnalyticsCustomModuleCallable() + *
+ *
UpdateSource

Updates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSource(UpdateSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSource(Source source) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSourceCallable() + *
+ *
UpdateSecurityMarks

Updates security marks.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSecurityMarks(UpdateSecurityMarksRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSecurityMarks(SecurityMarks securityMarks) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSecurityMarksCallable() + *
+ *
CreateBigQueryExport

Creates a BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createBigQueryExport(CreateBigQueryExportRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createBigQueryExport(FolderName parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *
  • createBigQueryExport(OrganizationName parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *
  • createBigQueryExport(ProjectName parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *
  • createBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createBigQueryExportCallable() + *
+ *
DeleteBigQueryExport

Deletes an existing BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBigQueryExport(DeleteBigQueryExportRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteBigQueryExport(BigQueryExportName name) + *
  • deleteBigQueryExport(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteBigQueryExportCallable() + *
+ *
UpdateBigQueryExport

Updates a BigQuery export.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBigQueryExport(UpdateBigQueryExportRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateBigQueryExportCallable() + *
+ *
ListBigQueryExports

Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBigQueryExports(ListBigQueryExportsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBigQueryExports(FolderName parent) + *
  • listBigQueryExports(OrganizationName parent) + *
  • listBigQueryExports(ProjectName parent) + *
  • listBigQueryExports(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBigQueryExportsPagedCallable() + *
  • listBigQueryExportsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java index acde88a8ae94..3a432ab06389 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java @@ -1355,6 +1355,12 @@ public SecurityCenterStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "securitycenter"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java index 7184d15dafd4..a1bb2e3bbfbe 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterClient.java @@ -68,19 +68,345 @@ *

Note: close() needs to be called on the SecurityCenterClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateSource

Creates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSource(CreateSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSource(OrganizationName parent, Source source) + *
  • createSource(String parent, Source source) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSourceCallable() + *
+ *
CreateFinding

Creates a finding. The corresponding source must exist for finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createFinding(CreateFindingRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createFinding(SourceName parent, String findingId, Finding finding) + *
  • createFinding(String parent, String findingId, Finding finding) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createFindingCallable() + *
+ *
GetIamPolicy

Gets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
GetOrganizationSettings

Gets the settings for an organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getOrganizationSettings(GetOrganizationSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getOrganizationSettings(OrganizationSettingsName name) + *
  • getOrganizationSettings(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getOrganizationSettingsCallable() + *
+ *
GetSource

Gets a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSource(GetSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSource(SourceName name) + *
  • getSource(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSourceCallable() + *
+ *
GroupAssets

Filters an organization's assets and groups them by their specified properties.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • groupAssets(GroupAssetsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • groupAssetsPagedCallable() + *
  • groupAssetsCallable() + *
+ *
GroupFindings

Filters an organization or source's findings and groups them by their specified properties. + *

To group across all sources provide a `-` as the source id. Example: /v1beta1/organizations/{organization_id}/sources/-/findings

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • groupFindings(GroupFindingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • groupFindings(SourceName parent, String groupBy) + *
  • groupFindings(String parent, String groupBy) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • groupFindingsPagedCallable() + *
  • groupFindingsCallable() + *
+ *
ListAssets

Lists an organization's assets.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAssets(ListAssetsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAssetsPagedCallable() + *
  • listAssetsCallable() + *
+ *
ListFindings

Lists an organization or source's findings. + *

To list across all sources provide a `-` as the source id. Example: /v1beta1/organizations/{organization_id}/sources/-/findings

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listFindings(ListFindingsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listFindingsPagedCallable() + *
  • listFindingsCallable() + *
+ *
ListSources

Lists all sources belonging to an organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSources(ListSourcesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSources(OrganizationName parent) + *
  • listSources(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSourcesPagedCallable() + *
  • listSourcesCallable() + *
+ *
RunAssetDiscovery

Runs asset discovery. The discovery is tracked with a long-running operation. + *

This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • runAssetDiscoveryAsync(RunAssetDiscoveryRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • runAssetDiscoveryAsync(OrganizationName parent) + *
  • runAssetDiscoveryAsync(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • runAssetDiscoveryOperationCallable() + *
  • runAssetDiscoveryCallable() + *
+ *
SetFindingState

Updates the state of a finding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setFindingState(SetFindingStateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setFindingState(FindingName name, Finding.State state, Timestamp startTime) + *
  • setFindingState(String name, Finding.State state, Timestamp startTime) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setFindingStateCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns the permissions that a caller has on the specified source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
UpdateFinding

Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateFinding(UpdateFindingRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateFinding(Finding finding) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateFindingCallable() + *
+ *
UpdateOrganizationSettings

Updates an organization's settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateOrganizationSettings(UpdateOrganizationSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateOrganizationSettings(OrganizationSettings organizationSettings) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateOrganizationSettingsCallable() + *
+ *
UpdateSource

Updates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSource(UpdateSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSource(Source source) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSourceCallable() + *
+ *
UpdateSecurityMarks

Updates security marks.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSecurityMarks(UpdateSecurityMarksRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSecurityMarks(SecurityMarks securityMarks) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSecurityMarksCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java index f4047c3a2dc5..c2d5bd3b5f26 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/SecurityCenterStubSettings.java @@ -560,6 +560,12 @@ public SecurityCenterStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "securitycenter"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java index a3dc25523f20..0f53707053ac 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/SecurityCenterClient.java @@ -69,19 +69,462 @@ *

Note: close() needs to be called on the SecurityCenterClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateSource

Creates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSource(CreateSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSource(OrganizationName parent, Source source) + *
  • createSource(String parent, Source source) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSourceCallable() + *
+ *
CreateFinding

Creates a finding. The corresponding source must exist for finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createFinding(CreateFindingRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createFinding(SourceName parent, Finding finding, String findingId) + *
  • createFinding(SourceName parent, String findingId, Finding finding) + *
  • createFinding(String parent, Finding finding, String findingId) + *
  • createFinding(String parent, String findingId, Finding finding) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createFindingCallable() + *
+ *
CreateNotificationConfig

Creates a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createNotificationConfig(CreateNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createNotificationConfig(OrganizationName parent, NotificationConfig notificationConfig) + *
  • createNotificationConfig(String parent, NotificationConfig notificationConfig) + *
  • createNotificationConfig(OrganizationName parent, String configId, NotificationConfig notificationConfig) + *
  • createNotificationConfig(String parent, String configId, NotificationConfig notificationConfig) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createNotificationConfigCallable() + *
+ *
DeleteNotificationConfig

Deletes a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNotificationConfig(DeleteNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteNotificationConfig(NotificationConfigName name) + *
  • deleteNotificationConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNotificationConfigCallable() + *
+ *
GetIamPolicy

Gets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicy(ResourceName resource) + *
  • getIamPolicy(String resource) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
GetNotificationConfig

Gets a notification config.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNotificationConfig(GetNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNotificationConfig(NotificationConfigName name) + *
  • getNotificationConfig(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNotificationConfigCallable() + *
+ *
GetOrganizationSettings

Gets the settings for an organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getOrganizationSettings(GetOrganizationSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getOrganizationSettings(OrganizationSettingsName name) + *
  • getOrganizationSettings(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getOrganizationSettingsCallable() + *
+ *
GetSource

Gets a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSource(GetSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSource(SourceName name) + *
  • getSource(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSourceCallable() + *
+ *
GroupAssets

Filters an organization's assets and groups them by their specified properties.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • groupAssets(GroupAssetsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • groupAssetsPagedCallable() + *
  • groupAssetsCallable() + *
+ *
GroupFindings

Filters an organization or source's findings and groups them by their specified properties. + *

To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • groupFindings(GroupFindingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • groupFindings(SourceName parent, String groupBy) + *
  • groupFindings(String parent, String groupBy) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • groupFindingsPagedCallable() + *
  • groupFindingsCallable() + *
+ *
ListAssets

Lists an organization's assets.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAssets(ListAssetsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAssets(FolderName parent) + *
  • listAssets(OrganizationName parent) + *
  • listAssets(ProjectName parent) + *
  • listAssets(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAssetsPagedCallable() + *
  • listAssetsCallable() + *
+ *
ListFindings

Lists an organization or source's findings. + *

To list across all sources provide a `-` as the source id. Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listFindings(ListFindingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listFindings(SourceName parent) + *
  • listFindings(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listFindingsPagedCallable() + *
  • listFindingsCallable() + *
+ *
ListNotificationConfigs

Lists notification configs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNotificationConfigs(ListNotificationConfigsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNotificationConfigs(OrganizationName parent) + *
  • listNotificationConfigs(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNotificationConfigsPagedCallable() + *
  • listNotificationConfigsCallable() + *
+ *
ListSources

Lists all sources belonging to an organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSources(ListSourcesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSources(FolderName parent) + *
  • listSources(OrganizationName parent) + *
  • listSources(ProjectName parent) + *
  • listSources(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSourcesPagedCallable() + *
  • listSourcesCallable() + *
+ *
RunAssetDiscovery

Runs asset discovery. The discovery is tracked with a long-running operation. + *

This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • runAssetDiscoveryAsync(RunAssetDiscoveryRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • runAssetDiscoveryAsync(OrganizationName parent) + *
  • runAssetDiscoveryAsync(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • runAssetDiscoveryOperationCallable() + *
  • runAssetDiscoveryCallable() + *
+ *
SetFindingState

Updates the state of a finding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setFindingState(SetFindingStateRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setFindingState(FindingName name, Finding.State state, Timestamp startTime) + *
  • setFindingState(String name, Finding.State state, Timestamp startTime) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setFindingStateCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified Source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *
  • setIamPolicy(String resource, Policy policy) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Returns the permissions that a caller has on the specified source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • testIamPermissions(ResourceName resource, List permissions) + *
  • testIamPermissions(String resource, List permissions) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
UpdateFinding

Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateFinding(UpdateFindingRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateFinding(Finding finding) + *
  • updateFinding(Finding finding, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateFindingCallable() + *
+ *
UpdateNotificationConfig

Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateNotificationConfig(UpdateNotificationConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateNotificationConfig(NotificationConfig notificationConfig) + *
  • updateNotificationConfig(NotificationConfig notificationConfig, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateNotificationConfigCallable() + *
+ *
UpdateOrganizationSettings

Updates an organization's settings.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateOrganizationSettings(UpdateOrganizationSettingsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateOrganizationSettings(OrganizationSettings organizationSettings) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateOrganizationSettingsCallable() + *
+ *
UpdateSource

Updates a source.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSource(UpdateSourceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSource(Source source) + *
  • updateSource(Source source, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSourceCallable() + *
+ *
UpdateSecurityMarks

Updates security marks.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSecurityMarks(UpdateSecurityMarksRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSecurityMarks(SecurityMarks securityMarks) + *
  • updateSecurityMarks(SecurityMarks securityMarks, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSecurityMarksCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java index 86515c8bacb6..ae082464bc24 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1p1beta1/stub/SecurityCenterStubSettings.java @@ -696,6 +696,12 @@ public SecurityCenterStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "securitycenter"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-service-control/README.md b/java-service-control/README.md index 4c5861aeb9f9..01874cdb79ac 100644 --- a/java-service-control/README.md +++ b/java-service-control/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-service-control.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-control/1.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-control/1.32.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/QuotaControllerClient.java b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/QuotaControllerClient.java index b605f4dab00e..714bd8b1a492 100644 --- a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/QuotaControllerClient.java +++ b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/QuotaControllerClient.java @@ -55,19 +55,29 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
AllocateQuota

Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. + *

This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). + *

**NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • allocateQuota(AllocateQuotaRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • allocateQuotaCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/ServiceControllerClient.java b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/ServiceControllerClient.java index cf50906e0cd1..a24842268da1 100644 --- a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/ServiceControllerClient.java +++ b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/ServiceControllerClient.java @@ -55,19 +55,47 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Check

Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. + *

If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. + *

NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the size limit (wire-format byte size) of 1MB. + *

This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • check(CheckRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • checkCallable() + *
+ *
Report

Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. + *

If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. + *

NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has the size limit (wire-format byte size) of 1MB. + *

This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • report(ReportRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • reportCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/QuotaControllerStubSettings.java b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/QuotaControllerStubSettings.java index 350f98347761..de777693121e 100644 --- a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/QuotaControllerStubSettings.java +++ b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/QuotaControllerStubSettings.java @@ -115,6 +115,12 @@ public QuotaControllerStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicecontrol"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/ServiceControllerStubSettings.java b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/ServiceControllerStubSettings.java index 6dd13780a035..13b2ba02c0e4 100644 --- a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/ServiceControllerStubSettings.java +++ b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v1/stub/ServiceControllerStubSettings.java @@ -124,6 +124,12 @@ public ServiceControllerStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicecontrol"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/ServiceControllerClient.java b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/ServiceControllerClient.java index a0ccc99bed01..f442841a6b74 100644 --- a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/ServiceControllerClient.java +++ b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/ServiceControllerClient.java @@ -60,19 +60,48 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
Check

Private Preview. This feature is only available for approved services. + *

This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). + *

NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. + *

NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. + *

This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • check(CheckRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • checkCallable() + *
+ *
Report

Private Preview. This feature is only available for approved services. + *

This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). + *

NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. + *

This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • report(ReportRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • reportCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/stub/ServiceControllerStubSettings.java b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/stub/ServiceControllerStubSettings.java index 48dabac25723..01454776ee53 100644 --- a/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/stub/ServiceControllerStubSettings.java +++ b/java-service-control/google-cloud-service-control/src/main/java/com/google/api/servicecontrol/v2/stub/ServiceControllerStubSettings.java @@ -124,6 +124,12 @@ public ServiceControllerStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicecontrol"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-service-management/README.md b/java-service-management/README.md index 56b7a2ba0cc6..3265c0b817b7 100644 --- a/java-service-management/README.md +++ b/java-service-management/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-service-management.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-management/3.28.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-management/3.30.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java b/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java index b719389a4f74..5c2ba6aa5596 100644 --- a/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java +++ b/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java @@ -91,19 +91,312 @@ *

Note: close() needs to be called on the ServiceManagerClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListServices

Lists managed services. + *

Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServices(ListServicesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServices(String producerProjectId, String consumerId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServicesPagedCallable() + *
  • listServicesCallable() + *
+ *
GetService

Gets a managed service. Authentication is required unless the service is public.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getService(GetServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getService(String serviceName) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceCallable() + *
+ *
CreateService

Creates a new managed service. + *

A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion. + *

One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project. + *

Operation<response: ManagedService>

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createServiceAsync(CreateServiceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createServiceAsync(ManagedService service) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServiceOperationCallable() + *
  • createServiceCallable() + *
+ *
DeleteService

Deletes a managed service. This method will change the service to the `Soft-Delete` state for 30 days. Within this period, service producers may call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. After 30 days, the service will be permanently deleted. + *

Operation<response: google.protobuf.Empty>

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteServiceAsync(DeleteServiceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteServiceAsync(String serviceName) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteServiceOperationCallable() + *
  • deleteServiceCallable() + *
+ *
UndeleteService

Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days. + *

Operation<response: UndeleteServiceResponse>

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • undeleteServiceAsync(UndeleteServiceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • undeleteServiceAsync(String serviceName) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • undeleteServiceOperationCallable() + *
  • undeleteServiceCallable() + *
+ *
ListServiceConfigs

Lists the history of the service configuration for a managed service, from the newest to the oldest.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServiceConfigs(ListServiceConfigsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServiceConfigs(String serviceName) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServiceConfigsPagedCallable() + *
  • listServiceConfigsCallable() + *
+ *
GetServiceConfig

Gets a service configuration (version) for a managed service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getServiceConfig(GetServiceConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getServiceConfig(String serviceName, String configId, GetServiceConfigRequest.ConfigView view) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceConfigCallable() + *
+ *
CreateServiceConfig

Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + *

Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createServiceConfig(CreateServiceConfigRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createServiceConfig(String serviceName, Service serviceConfig) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServiceConfigCallable() + *
+ *
SubmitConfigSource

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + *

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually. + *

Operation<response: SubmitConfigSourceResponse>

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • submitConfigSourceAsync(SubmitConfigSourceRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • submitConfigSourceAsync(String serviceName, ConfigSource configSource, boolean validateOnly) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • submitConfigSourceOperationCallable() + *
  • submitConfigSourceCallable() + *
+ *
ListServiceRollouts

Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServiceRollouts(ListServiceRolloutsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServiceRollouts(String serviceName, String filter) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServiceRolloutsPagedCallable() + *
  • listServiceRolloutsCallable() + *
+ *
GetServiceRollout

Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getServiceRollout(GetServiceRolloutRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getServiceRollout(String serviceName, String rolloutId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceRolloutCallable() + *
+ *
CreateServiceRollout

Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging. + *

Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. + *

Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually. + *

Operation<response: Rollout>

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createServiceRolloutAsync(CreateServiceRolloutRequest request) + *
+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createServiceRolloutAsync(String serviceName, Rollout rollout) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServiceRolloutOperationCallable() + *
  • createServiceRolloutCallable() + *
+ *
GenerateConfigReport

Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value + *

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • generateConfigReport(GenerateConfigReportRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • generateConfigReport(Any newConfig, Any oldConfig) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • generateConfigReportCallable() + *
+ *
SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStubSettings.java b/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStubSettings.java index fdd2b4785460..01118a0cb709 100644 --- a/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStubSettings.java +++ b/java-service-management/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStubSettings.java @@ -485,6 +485,12 @@ public ServiceManagerStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicemanagement"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-service-usage/README.md b/java-service-usage/README.md index 87ba29e68b2f..c1942c0c184e 100644 --- a/java-service-usage/README.md +++ b/java-service-usage/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-service-usage.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-usage/2.30.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-usage/2.32.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/ServiceUsageClient.java b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/ServiceUsageClient.java index 65fc367e5476..070b3f2a7408 100644 --- a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/ServiceUsageClient.java +++ b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/ServiceUsageClient.java @@ -63,19 +63,103 @@ *

Note: close() needs to be called on the ServiceUsageClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
EnableService

Enable a service so that it can be used with a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • enableServiceAsync(EnableServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • enableServiceOperationCallable() + *
  • enableServiceCallable() + *
+ *
DisableService

Disable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks. + *

It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION` status if the target service is not currently enabled.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • disableServiceAsync(DisableServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • disableServiceOperationCallable() + *
  • disableServiceCallable() + *
+ *
GetService

Returns the service configuration and enabled state for a given service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getService(GetServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceCallable() + *
+ *
ListServices

List all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the `servicemanagement.services.bind` permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project. + *

WARNING: If you need to query enabled services frequently or across an organization, you should use [Cloud Asset Inventory API](https://cloud.google.com/asset-inventory/docs/apis), which provides higher throughput and richer filtering capability.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServices(ListServicesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServicesPagedCallable() + *
  • listServicesCallable() + *
+ *
BatchEnableServices

Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the `EnableService` method instead.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchEnableServicesAsync(BatchEnableServicesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchEnableServicesOperationCallable() + *
  • batchEnableServicesCallable() + *
+ *
BatchGetServices

Returns the service configurations and enabled states for a given list of services.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchGetServices(BatchGetServicesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchGetServicesCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/stub/ServiceUsageStubSettings.java b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/stub/ServiceUsageStubSettings.java index b868c3697046..9165aa7860ea 100644 --- a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/stub/ServiceUsageStubSettings.java +++ b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1/stub/ServiceUsageStubSettings.java @@ -257,6 +257,12 @@ public ServiceUsageStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "serviceusage"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/ServiceUsageClient.java b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/ServiceUsageClient.java index 6d0c56bf0354..2a5841d1ec4b 100644 --- a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/ServiceUsageClient.java +++ b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/ServiceUsageClient.java @@ -60,19 +60,299 @@ *

Note: close() needs to be called on the ServiceUsageClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
EnableService

Enables a service so that it can be used with a project. + *

Operation response type: `google.protobuf.Empty`

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • enableServiceAsync(EnableServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • enableServiceOperationCallable() + *
  • enableServiceCallable() + *
+ *
DisableService

Disables a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks. + *

It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION` status if the target service is not currently enabled. + *

Operation response type: `google.protobuf.Empty`

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • disableServiceAsync(DisableServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • disableServiceOperationCallable() + *
  • disableServiceCallable() + *
+ *
GetService

Returns the service configuration and enabled state for a given service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getService(GetServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceCallable() + *
+ *
ListServices

Lists all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the `servicemanagement.services.bind` permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServices(ListServicesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServicesPagedCallable() + *
  • listServicesCallable() + *
+ *
BatchEnableServices

Enables multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. + *

Operation response type: `google.protobuf.Empty`

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchEnableServicesAsync(BatchEnableServicesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchEnableServicesOperationCallable() + *
  • batchEnableServicesCallable() + *
+ *
ListConsumerQuotaMetrics

Retrieves a summary of all quota information visible to the service consumer, organized by service metric. Each metric includes information about all of its defined limits. Each limit includes the limit configuration (quota unit, preciseness, default value), the current effective limit value, and all of the overrides applied to the limit.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listConsumerQuotaMetrics(ListConsumerQuotaMetricsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listConsumerQuotaMetricsPagedCallable() + *
  • listConsumerQuotaMetricsCallable() + *
+ *
GetConsumerQuotaMetric

Retrieves a summary of quota information for a specific quota metric

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getConsumerQuotaMetric(GetConsumerQuotaMetricRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getConsumerQuotaMetricCallable() + *
+ *
GetConsumerQuotaLimit

Retrieves a summary of quota information for a specific quota limit.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getConsumerQuotaLimit(GetConsumerQuotaLimitRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getConsumerQuotaLimitCallable() + *
+ *
CreateAdminOverride

Creates an admin override. An admin override is applied by an administrator of a parent folder or parent organization of the consumer receiving the override. An admin override is intended to limit the amount of quota the consumer can use out of the total quota pool allocated to all children of the folder or organization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAdminOverrideAsync(CreateAdminOverrideRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAdminOverrideOperationCallable() + *
  • createAdminOverrideCallable() + *
+ *
UpdateAdminOverride

Updates an admin override.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAdminOverrideAsync(UpdateAdminOverrideRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAdminOverrideOperationCallable() + *
  • updateAdminOverrideCallable() + *
+ *
DeleteAdminOverride

Deletes an admin override.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAdminOverrideAsync(DeleteAdminOverrideRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAdminOverrideOperationCallable() + *
  • deleteAdminOverrideCallable() + *
+ *
ListAdminOverrides

Lists all admin overrides on this limit.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAdminOverrides(ListAdminOverridesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAdminOverridesPagedCallable() + *
  • listAdminOverridesCallable() + *
+ *
ImportAdminOverrides

Creates or updates multiple admin overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importAdminOverridesAsync(ImportAdminOverridesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importAdminOverridesOperationCallable() + *
  • importAdminOverridesCallable() + *
+ *
CreateConsumerOverride

Creates a consumer override. A consumer override is applied to the consumer on its own authority to limit its own quota usage. Consumer overrides cannot be used to grant more quota than would be allowed by admin overrides, producer overrides, or the default limit of the service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createConsumerOverrideAsync(CreateConsumerOverrideRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createConsumerOverrideOperationCallable() + *
  • createConsumerOverrideCallable() + *
+ *
UpdateConsumerOverride

Updates a consumer override.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateConsumerOverrideAsync(UpdateConsumerOverrideRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateConsumerOverrideOperationCallable() + *
  • updateConsumerOverrideCallable() + *
+ *
DeleteConsumerOverride

Deletes a consumer override.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteConsumerOverrideAsync(DeleteConsumerOverrideRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteConsumerOverrideOperationCallable() + *
  • deleteConsumerOverrideCallable() + *
+ *
ListConsumerOverrides

Lists all consumer overrides on this limit.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listConsumerOverrides(ListConsumerOverridesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listConsumerOverridesPagedCallable() + *
  • listConsumerOverridesCallable() + *
+ *
ImportConsumerOverrides

Creates or updates multiple consumer overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importConsumerOverridesAsync(ImportConsumerOverridesRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importConsumerOverridesOperationCallable() + *
  • importConsumerOverridesCallable() + *
+ *
GenerateServiceIdentity

Generates service identity for service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • generateServiceIdentityAsync(GenerateServiceIdentityRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • generateServiceIdentityOperationCallable() + *
  • generateServiceIdentityCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/stub/ServiceUsageStubSettings.java b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/stub/ServiceUsageStubSettings.java index 5320f7f3066f..010876d91d9b 100644 --- a/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/stub/ServiceUsageStubSettings.java +++ b/java-service-usage/google-cloud-service-usage/src/main/java/com/google/api/serviceusage/v1beta1/stub/ServiceUsageStubSettings.java @@ -698,6 +698,12 @@ public ServiceUsageStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "serviceusage"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-servicedirectory/README.md b/java-servicedirectory/README.md index 266ff2a46e6a..9b2846b6fbe6 100644 --- a/java-servicedirectory/README.md +++ b/java-servicedirectory/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-servicedirectory.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-servicedirectory/2.31.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-servicedirectory/2.33.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceClient.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceClient.java index dc79e7f99d40..509c1c737a7d 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceClient.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceClient.java @@ -64,19 +64,56 @@ *

Note: close() needs to be called on the LookupServiceClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ResolveService

Returns a [service][google.cloud.servicedirectory.v1.Service] and its associated endpoints. Resolving a service is not considered an active developer method.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • resolveService(ResolveServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • resolveServiceCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java index d969730aa22f..86b567b04674 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java @@ -80,19 +80,369 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateNamespace

Creates a namespace, and returns the new namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createNamespace(CreateNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createNamespace(LocationName parent, Namespace namespace, String namespaceId) + *
  • createNamespace(String parent, Namespace namespace, String namespaceId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createNamespaceCallable() + *
+ *
ListNamespaces

Lists all namespaces.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNamespaces(ListNamespacesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNamespaces(LocationName parent) + *
  • listNamespaces(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNamespacesPagedCallable() + *
  • listNamespacesCallable() + *
+ *
GetNamespace

Gets a namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNamespace(GetNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNamespace(NamespaceName name) + *
  • getNamespace(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNamespaceCallable() + *
+ *
UpdateNamespace

Updates a namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateNamespace(UpdateNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateNamespace(Namespace namespace, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateNamespaceCallable() + *
+ *
DeleteNamespace

Deletes a namespace. This also deletes all services and endpoints in the namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNamespace(DeleteNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteNamespace(NamespaceName name) + *
  • deleteNamespace(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNamespaceCallable() + *
+ *
CreateService

Creates a service, and returns the new service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createService(CreateServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createService(NamespaceName parent, Service service, String serviceId) + *
  • createService(String parent, Service service, String serviceId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServiceCallable() + *
+ *
ListServices

Lists all services belonging to a namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServices(ListServicesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServices(NamespaceName parent) + *
  • listServices(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServicesPagedCallable() + *
  • listServicesCallable() + *
+ *
GetService

Gets a service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getService(GetServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getService(ServiceName name) + *
  • getService(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceCallable() + *
+ *
UpdateService

Updates a service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateService(UpdateServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateService(Service service, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateServiceCallable() + *
+ *
DeleteService

Deletes a service. This also deletes all endpoints associated with the service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteService(DeleteServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteService(ServiceName name) + *
  • deleteService(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteServiceCallable() + *
+ *
CreateEndpoint

Creates an endpoint, and returns the new endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createEndpoint(CreateEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createEndpoint(ServiceName parent, Endpoint endpoint, String endpointId) + *
  • createEndpoint(String parent, Endpoint endpoint, String endpointId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createEndpointCallable() + *
+ *
ListEndpoints

Lists all endpoints.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listEndpoints(ListEndpointsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listEndpoints(ServiceName parent) + *
  • listEndpoints(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listEndpointsPagedCallable() + *
  • listEndpointsCallable() + *
+ *
GetEndpoint

Gets an endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getEndpoint(GetEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getEndpoint(EndpointName name) + *
  • getEndpoint(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getEndpointCallable() + *
+ *
UpdateEndpoint

Updates an endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateEndpoint(UpdateEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateEndpoint(Endpoint endpoint, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateEndpointCallable() + *
+ *
DeleteEndpoint

Deletes an endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteEndpoint(DeleteEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteEndpoint(EndpointName name) + *
  • deleteEndpoint(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteEndpointCallable() + *
+ *
GetIamPolicy

Gets the IAM Policy for a resource (namespace or service only).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the IAM Policy for a resource (namespace or service only).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Tests IAM permissions for a resource (namespace or service only).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java index 2264dad3790d..5152ea4e323d 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java @@ -194,6 +194,12 @@ public LookupServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicedirectory"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java index a7b6a2e8efa0..db3650332324 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java @@ -496,6 +496,12 @@ public RegistrationServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicedirectory"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceClient.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceClient.java index cb10837c5f7b..3fe172d3c806 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceClient.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceClient.java @@ -65,19 +65,56 @@ *

Note: close() needs to be called on the LookupServiceClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ResolveService

Returns a [service][google.cloud.servicedirectory.v1beta1.Service] and its associated endpoints. Resolving a service is not considered an active developer method.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • resolveService(ResolveServiceRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • resolveServiceCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java index e64dad4ff388..0eb84af33ba0 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java @@ -81,19 +81,369 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
CreateNamespace

Creates a namespace, and returns the new namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createNamespace(CreateNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createNamespace(LocationName parent, Namespace namespace, String namespaceId) + *
  • createNamespace(String parent, Namespace namespace, String namespaceId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createNamespaceCallable() + *
+ *
ListNamespaces

Lists all namespaces.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listNamespaces(ListNamespacesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listNamespaces(LocationName parent) + *
  • listNamespaces(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listNamespacesPagedCallable() + *
  • listNamespacesCallable() + *
+ *
GetNamespace

Gets a namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getNamespace(GetNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getNamespace(NamespaceName name) + *
  • getNamespace(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getNamespaceCallable() + *
+ *
UpdateNamespace

Updates a namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateNamespace(UpdateNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateNamespace(Namespace namespace, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateNamespaceCallable() + *
+ *
DeleteNamespace

Deletes a namespace. This also deletes all services and endpoints in the namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteNamespace(DeleteNamespaceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteNamespace(NamespaceName name) + *
  • deleteNamespace(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteNamespaceCallable() + *
+ *
CreateService

Creates a service, and returns the new service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createService(CreateServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createService(NamespaceName parent, Service service, String serviceId) + *
  • createService(String parent, Service service, String serviceId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServiceCallable() + *
+ *
ListServices

Lists all services belonging to a namespace.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServices(ListServicesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServices(NamespaceName parent) + *
  • listServices(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServicesPagedCallable() + *
  • listServicesCallable() + *
+ *
GetService

Gets a service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getService(GetServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getService(ServiceName name) + *
  • getService(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServiceCallable() + *
+ *
UpdateService

Updates a service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateService(UpdateServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateService(Service service, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateServiceCallable() + *
+ *
DeleteService

Deletes a service. This also deletes all endpoints associated with the service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteService(DeleteServiceRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteService(ServiceName name) + *
  • deleteService(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteServiceCallable() + *
+ *
CreateEndpoint

Creates an endpoint, and returns the new endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createEndpoint(CreateEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createEndpoint(ServiceName parent, Endpoint endpoint, String endpointId) + *
  • createEndpoint(String parent, Endpoint endpoint, String endpointId) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createEndpointCallable() + *
+ *
ListEndpoints

Lists all endpoints.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listEndpoints(ListEndpointsRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listEndpoints(ServiceName parent) + *
  • listEndpoints(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listEndpointsPagedCallable() + *
  • listEndpointsCallable() + *
+ *
GetEndpoint

Gets an endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getEndpoint(GetEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getEndpoint(EndpointName name) + *
  • getEndpoint(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getEndpointCallable() + *
+ *
UpdateEndpoint

Updates an endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateEndpoint(UpdateEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateEndpoint(Endpoint endpoint, FieldMask updateMask) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateEndpointCallable() + *
+ *
DeleteEndpoint

Deletes an endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteEndpoint(DeleteEndpointRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteEndpoint(EndpointName name) + *
  • deleteEndpoint(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteEndpointCallable() + *
+ *
GetIamPolicy

Gets the IAM Policy for a resource

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *
+ *
SetIamPolicy

Sets the IAM Policy for a resource

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *
+ *
TestIamPermissions

Tests IAM permissions for a resource (namespace, service or service workload only).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *
+ *
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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *
  • listLocationsCallable() + *
+ *
GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java index b8b1710e9148..cab9cd385f74 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/LookupServiceStubSettings.java @@ -195,6 +195,12 @@ public LookupServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicedirectory"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/RegistrationServiceStubSettings.java b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/RegistrationServiceStubSettings.java index 060fc79133a1..8007cf8ab06b 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/RegistrationServiceStubSettings.java +++ b/java-servicedirectory/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/RegistrationServiceStubSettings.java @@ -497,6 +497,12 @@ public RegistrationServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "servicedirectory"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-shell/README.md b/java-shell/README.md index 474e240cd22a..7133e87320ea 100644 --- a/java-shell/README.md +++ b/java-shell/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-shell.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-shell/2.29.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-shell/2.31.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceClient.java b/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceClient.java index c54978af8655..f159d181e1d6 100644 --- a/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceClient.java +++ b/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceClient.java @@ -56,19 +56,92 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
GetEnvironment

Gets an environment. Returns NOT_FOUND if the environment does not exist.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getEnvironment(GetEnvironmentRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getEnvironment(EnvironmentName name) + *
  • getEnvironment(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getEnvironmentCallable() + *
+ *
StartEnvironment

Starts an existing environment, allowing clients to connect to it. The returned operation will contain an instance of StartEnvironmentMetadata in its metadata field. Users can wait for the environment to start by polling this operation via GetOperation. Once the environment has finished starting and is ready to accept connections, the operation will contain a StartEnvironmentResponse in its response field.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • startEnvironmentAsync(StartEnvironmentRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • startEnvironmentOperationCallable() + *
  • startEnvironmentCallable() + *
+ *
AuthorizeEnvironment

Sends OAuth credentials to a running environment on behalf of a user. When this completes, the environment will be authorized to run various Google Cloud command line tools without requiring the user to manually authenticate.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • authorizeEnvironmentAsync(AuthorizeEnvironmentRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • authorizeEnvironmentOperationCallable() + *
  • authorizeEnvironmentCallable() + *
+ *
AddPublicKey

Adds a public SSH key to an environment, allowing clients with the corresponding private key to connect to that environment via SSH. If a key with the same content already exists, this will error with ALREADY_EXISTS.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • addPublicKeyAsync(AddPublicKeyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • addPublicKeyOperationCallable() + *
  • addPublicKeyCallable() + *
+ *
RemovePublicKey

Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key. If a key with the same content is not present, this will error with NOT_FOUND.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removePublicKeyAsync(RemovePublicKeyRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removePublicKeyOperationCallable() + *
  • removePublicKeyCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java b/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java index 6ef291aaad79..22a2b8fb060a 100644 --- a/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java +++ b/java-shell/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java @@ -193,6 +193,12 @@ public CloudShellServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudshell"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-shopping-merchant-inventories/README.md b/java-shopping-merchant-inventories/README.md index 2d67c2137415..2205104a618b 100644 --- a/java-shopping-merchant-inventories/README.md +++ b/java-shopping-merchant-inventories/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shopping-merchant-inventories/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-inventories.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-inventories/0.6.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-inventories/0.8.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryServiceClient.java b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryServiceClient.java index 6b12d701a279..6237dcbd8219 100644 --- a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryServiceClient.java +++ b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryServiceClient.java @@ -62,19 +62,68 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListLocalInventories

Lists the `LocalInventory` resources for the given product in your merchant account. The response might contain fewer items than specified by `pageSize`. If `pageToken` was returned in previous request, it can be used to obtain additional results. + *

`LocalInventory` resources are listed per product for a given account.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocalInventories(ListLocalInventoriesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listLocalInventories(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocalInventoriesPagedCallable() + *
  • listLocalInventoriesCallable() + *
+ *
InsertLocalInventory

Inserts a `LocalInventory` resource to a product in your merchant account. + *

Replaces the full `LocalInventory` resource if an entry with the same [`storeCode`][google.shopping.merchant.inventories.v1beta.LocalInventory.store_code] already exists for the product. + *

It might take up to 30 minutes for the new or updated `LocalInventory` resource to appear in products.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • insertLocalInventory(InsertLocalInventoryRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • insertLocalInventoryCallable() + *
+ *
DeleteLocalInventory

Deletes the specified `LocalInventory` from the given product in your merchant account. It might take a up to an hour for the `LocalInventory` to be deleted from the specific product. Once you have received a successful delete response, wait for that period before attempting a delete again.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteLocalInventory(DeleteLocalInventoryRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteLocalInventory(LocalInventoryName name) + *
  • deleteLocalInventory(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteLocalInventoryCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryServiceClient.java b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryServiceClient.java index 4254abdb895f..241a49096c12 100644 --- a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryServiceClient.java +++ b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryServiceClient.java @@ -63,19 +63,68 @@ * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
MethodDescriptionMethod Variants
ListRegionalInventories

Lists the `RegionalInventory` resources for the given product in your merchant account. The response might contain fewer items than specified by `pageSize`. If `pageToken` was returned in previous request, it can be used to obtain additional results. + *

`RegionalInventory` resources are listed per product for a given account.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRegionalInventories(ListRegionalInventoriesRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRegionalInventories(String parent) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRegionalInventoriesPagedCallable() + *
  • listRegionalInventoriesCallable() + *
+ *
InsertRegionalInventory

Inserts a `RegionalInventory` to a given product in your merchant account. + *

Replaces the full `RegionalInventory` resource if an entry with the same [`region`][google.shopping.merchant.inventories.v1beta.RegionalInventory.region] already exists for the product. + *

It might take up to 30 minutes for the new or updated `RegionalInventory` resource to appear in products.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • insertRegionalInventory(InsertRegionalInventoryRequest request) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • insertRegionalInventoryCallable() + *
+ *
DeleteRegionalInventory

Deletes the specified `RegionalInventory` resource from the given product in your merchant account. It might take up to an hour for the `RegionalInventory` to be deleted from the specific product. Once you have received a successful delete response, wait for that period before attempting a delete again.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteRegionalInventory(DeleteRegionalInventoryRequest request) + *
+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteRegionalInventory(RegionalInventoryName name) + *
  • deleteRegionalInventory(String name) + *
+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteRegionalInventoryCallable() + *
+ *
* *

See the individual methods for example code. * diff --git a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/LocalInventoryServiceStubSettings.java b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/LocalInventoryServiceStubSettings.java index b686fbeb7ae1..205db4093f49 100644 --- a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/LocalInventoryServiceStubSettings.java +++ b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/LocalInventoryServiceStubSettings.java @@ -212,6 +212,12 @@ public LocalInventoryServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "merchantapi"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/RegionalInventoryServiceStubSettings.java b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/RegionalInventoryServiceStubSettings.java index 69a800ac3694..76e81ee512e1 100644 --- a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/RegionalInventoryServiceStubSettings.java +++ b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/java/com/google/shopping/merchant/inventories/v1beta/stub/RegionalInventoryServiceStubSettings.java @@ -223,6 +223,12 @@ public RegionalInventoryServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "merchantapi"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); diff --git a/versions.txt b/versions.txt index a56fc1dda0a1..a9d99c13b1b9 100644 --- a/versions.txt +++ b/versions.txt @@ -712,4 +712,4 @@ proto-google-cloud-edgenetwork-v1:0.0.0:0.0.1-SNAPSHOT grpc-google-cloud-edgenetwork-v1:0.0.0:0.0.1-SNAPSHOT google-cloud-cloudquotas:0.0.0:0.0.1-SNAPSHOT proto-google-cloud-cloudquotas-v1:0.0.0:0.0.1-SNAPSHOT -grpc-google-cloud-cloudquotas-v1:0.0.0:0.0.1-SNAPSHOT \ No newline at end of file +grpc-google-cloud-cloudquotas-v1:0.0.0:0.0.1-SNAPSHOT