Using this API, you can can create and manage MapConfigs (Map IDs), StyleConfigs (JSON-based + * styling), and MapContextConfigs (associations between styles, datasets, and map variants). + * + *
This API offers features through three channels: + * + *
Capabilities described here are generally available across both the v2alpha and v2beta + * endpoints. + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * MapConfig mapConfig = MapConfig.newBuilder().build();
+ * MapConfig response = mapManagementClient.createMapConfig(parent, mapConfig);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the MapManagementClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
CreateMapConfig |
+ * Creates a MapConfig in a project. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetMapConfig |
+ * Gets a MapConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListMapConfigs |
+ * Lists MapConfigs for a project. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateMapConfig |
+ * Updates a MapConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteMapConfig |
+ * Deletes a MapConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateStyleConfig |
+ * Creates a StyleConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetStyleConfig |
+ * Gets a StyleConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListStyleConfigs |
+ * Lists StyleConfigs. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateStyleConfig |
+ * Updates a StyleConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteStyleConfig |
+ * Deletes a StyleConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateMapContextConfig |
+ * Creates a MapContextConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetMapContextConfig |
+ * Gets a MapContextConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListMapContextConfigs |
+ * Lists MapContextConfigs. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateMapContextConfig |
+ * Updates a MapContextConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteMapContextConfig |
+ * Deletes a MapContextConfig. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of MapManagementSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MapManagementSettings mapManagementSettings =
+ * MapManagementSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * MapManagementClient mapManagementClient = MapManagementClient.create(mapManagementSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MapManagementSettings mapManagementSettings =
+ * MapManagementSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * MapManagementClient mapManagementClient = MapManagementClient.create(mapManagementSettings);
+ * }
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MapManagementSettings mapManagementSettings =
+ * MapManagementSettings.newHttpJsonBuilder().build();
+ * MapManagementClient mapManagementClient = MapManagementClient.create(mapManagementSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class MapManagementClient implements BackgroundResource { + private final @Nullable MapManagementSettings settings; + private final MapManagementStub stub; + + /** Constructs an instance of MapManagementClient with default settings. */ + public static final MapManagementClient create() throws IOException { + return create(MapManagementSettings.newBuilder().build()); + } + + /** + * Constructs an instance of MapManagementClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final MapManagementClient create(MapManagementSettings settings) + throws IOException { + return new MapManagementClient(settings); + } + + /** + * Constructs an instance of MapManagementClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(MapManagementSettings). + */ + public static final MapManagementClient create(MapManagementStub stub) { + return new MapManagementClient(stub); + } + + /** + * Constructs an instance of MapManagementClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected MapManagementClient(MapManagementSettings settings) throws IOException { + this.settings = settings; + this.stub = ((MapManagementStubSettings) settings.getStubSettings()).createStub(); + } + + protected MapManagementClient(MapManagementStub stub) { + this.settings = null; + this.stub = stub; + } + + public final @Nullable MapManagementSettings getSettings() { + return settings; + } + + public MapManagementStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a MapConfig in a project. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * MapConfig mapConfig = MapConfig.newBuilder().build();
+ * MapConfig response = mapManagementClient.createMapConfig(parent, mapConfig);
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that will own the MapConfig. Format:
+ * `projects/{$my-project-id}`
+ * @param mapConfig Required. The MapConfig to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapConfig createMapConfig(@Nullable ProjectName parent, MapConfig mapConfig) {
+ CreateMapConfigRequest request =
+ CreateMapConfigRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setMapConfig(mapConfig)
+ .build();
+ return createMapConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MapConfig in a project.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * MapConfig mapConfig = MapConfig.newBuilder().build();
+ * MapConfig response = mapManagementClient.createMapConfig(parent, mapConfig);
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that will own the MapConfig. Format:
+ * `projects/{$my-project-id}`
+ * @param mapConfig Required. The MapConfig to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapConfig createMapConfig(String parent, MapConfig mapConfig) {
+ CreateMapConfigRequest request =
+ CreateMapConfigRequest.newBuilder().setParent(parent).setMapConfig(mapConfig).build();
+ return createMapConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MapConfig in a project.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * CreateMapConfigRequest request =
+ * CreateMapConfigRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setMapConfig(MapConfig.newBuilder().build())
+ * .build();
+ * MapConfig response = mapManagementClient.createMapConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapConfig createMapConfig(CreateMapConfigRequest request) {
+ return createMapConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MapConfig in a project.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * CreateMapConfigRequest request =
+ * CreateMapConfigRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setMapConfig(MapConfig.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.createMapConfigCallable().futureCall(request);
+ * // Do something.
+ * MapConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapConfigName name = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]");
+ * MapConfig response = mapManagementClient.getMapConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapConfig. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapConfig getMapConfig(@Nullable MapConfigName name) {
+ GetMapConfigRequest request =
+ GetMapConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getMapConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a MapConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String name = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString();
+ * MapConfig response = mapManagementClient.getMapConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapConfig. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapConfig getMapConfig(String name) {
+ GetMapConfigRequest request = GetMapConfigRequest.newBuilder().setName(name).build();
+ return getMapConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a MapConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * GetMapConfigRequest request =
+ * GetMapConfigRequest.newBuilder()
+ * .setName(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .build();
+ * MapConfig response = mapManagementClient.getMapConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapConfig getMapConfig(GetMapConfigRequest request) {
+ return getMapConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a MapConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * GetMapConfigRequest request =
+ * GetMapConfigRequest.newBuilder()
+ * .setName(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .build();
+ * ApiFuture future = mapManagementClient.getMapConfigCallable().futureCall(request);
+ * // Do something.
+ * MapConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (MapConfig element : mapManagementClient.listMapConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that owns the MapConfigs. Format: `projects/{project}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMapConfigsPagedResponse listMapConfigs(@Nullable ProjectName parent) {
+ ListMapConfigsRequest request =
+ ListMapConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMapConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MapConfigs for a project.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * for (MapConfig element : mapManagementClient.listMapConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that owns the MapConfigs. Format: `projects/{project}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMapConfigsPagedResponse listMapConfigs(String parent) {
+ ListMapConfigsRequest request = ListMapConfigsRequest.newBuilder().setParent(parent).build();
+ return listMapConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MapConfigs for a project.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListMapConfigsRequest request =
+ * ListMapConfigsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (MapConfig element : mapManagementClient.listMapConfigs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMapConfigsPagedResponse listMapConfigs(ListMapConfigsRequest request) {
+ return listMapConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MapConfigs for a project.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListMapConfigsRequest request =
+ * ListMapConfigsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.listMapConfigsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (MapConfig element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListMapConfigsRequest request =
+ * ListMapConfigsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListMapConfigsResponse response =
+ * mapManagementClient.listMapConfigsCallable().call(request);
+ * for (MapConfig element : response.getMapConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapConfig mapConfig = MapConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * MapConfig response = mapManagementClient.updateMapConfig(mapConfig, updateMask);
+ * }
+ * }
+ *
+ * @param mapConfig Required. The MapConfig to update.
+ * The MapConfig's `name` field is used to identify the MapConfig to update. Format: + * `projects/{project}/mapConfigs/{map_config}` + * @param updateMask Optional. The specific field to update for the MapConfig. If not specified, + * the MapConfig will be updated in its entirety. Valid fields are: + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * UpdateMapConfigRequest request =
+ * UpdateMapConfigRequest.newBuilder()
+ * .setMapConfig(MapConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * MapConfig response = mapManagementClient.updateMapConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapConfig updateMapConfig(UpdateMapConfigRequest request) {
+ return updateMapConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a MapConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * UpdateMapConfigRequest request =
+ * UpdateMapConfigRequest.newBuilder()
+ * .setMapConfig(MapConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.updateMapConfigCallable().futureCall(request);
+ * // Do something.
+ * MapConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapConfigName name = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]");
+ * boolean force = true;
+ * mapManagementClient.deleteMapConfig(name, force);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapConfig to delete. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @param force Optional. If set to true, any MapContextConfigs from this MapConfig will also be
+ * deleted. (Otherwise, the request will only work if the MapConfig has no MapContextConfigs.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteMapConfig(@Nullable MapConfigName name, boolean force) {
+ DeleteMapConfigRequest request =
+ DeleteMapConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setForce(force)
+ .build();
+ deleteMapConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a MapConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String name = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString();
+ * boolean force = true;
+ * mapManagementClient.deleteMapConfig(name, force);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapConfig to delete. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @param force Optional. If set to true, any MapContextConfigs from this MapConfig will also be
+ * deleted. (Otherwise, the request will only work if the MapConfig has no MapContextConfigs.)
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteMapConfig(String name, boolean force) {
+ DeleteMapConfigRequest request =
+ DeleteMapConfigRequest.newBuilder().setName(name).setForce(force).build();
+ deleteMapConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a MapConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * DeleteMapConfigRequest request =
+ * DeleteMapConfigRequest.newBuilder()
+ * .setName(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .setForce(true)
+ * .build();
+ * mapManagementClient.deleteMapConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteMapConfig(DeleteMapConfigRequest request) {
+ deleteMapConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a MapConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * DeleteMapConfigRequest request =
+ * DeleteMapConfigRequest.newBuilder()
+ * .setName(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future = mapManagementClient.deleteMapConfigCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * StyleConfig styleConfig = StyleConfig.newBuilder().build();
+ * StyleConfig response = mapManagementClient.createStyleConfig(parent, styleConfig);
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that will own the StyleConfig. Format:
+ * `projects/{project}`
+ * @param styleConfig Required. The StyleConfig to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StyleConfig createStyleConfig(
+ @Nullable ProjectName parent, StyleConfig styleConfig) {
+ CreateStyleConfigRequest request =
+ CreateStyleConfigRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setStyleConfig(styleConfig)
+ .build();
+ return createStyleConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * StyleConfig styleConfig = StyleConfig.newBuilder().build();
+ * StyleConfig response = mapManagementClient.createStyleConfig(parent, styleConfig);
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that will own the StyleConfig. Format:
+ * `projects/{project}`
+ * @param styleConfig Required. The StyleConfig to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StyleConfig createStyleConfig(String parent, StyleConfig styleConfig) {
+ CreateStyleConfigRequest request =
+ CreateStyleConfigRequest.newBuilder().setParent(parent).setStyleConfig(styleConfig).build();
+ return createStyleConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * CreateStyleConfigRequest request =
+ * CreateStyleConfigRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setStyleConfig(StyleConfig.newBuilder().build())
+ * .build();
+ * StyleConfig response = mapManagementClient.createStyleConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StyleConfig createStyleConfig(CreateStyleConfigRequest request) {
+ return createStyleConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * CreateStyleConfigRequest request =
+ * CreateStyleConfigRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setStyleConfig(StyleConfig.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.createStyleConfigCallable().futureCall(request);
+ * // Do something.
+ * StyleConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * StyleConfigName name = StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]");
+ * StyleConfig response = mapManagementClient.getStyleConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the StyleConfig. Format:
+ * `projects/{project}/styleConfigs/{style_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StyleConfig getStyleConfig(@Nullable StyleConfigName name) {
+ GetStyleConfigRequest request =
+ GetStyleConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getStyleConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String name = StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]").toString();
+ * StyleConfig response = mapManagementClient.getStyleConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the StyleConfig. Format:
+ * `projects/{project}/styleConfigs/{style_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StyleConfig getStyleConfig(String name) {
+ GetStyleConfigRequest request = GetStyleConfigRequest.newBuilder().setName(name).build();
+ return getStyleConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * GetStyleConfigRequest request =
+ * GetStyleConfigRequest.newBuilder()
+ * .setName(StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]").toString())
+ * .build();
+ * StyleConfig response = mapManagementClient.getStyleConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StyleConfig getStyleConfig(GetStyleConfigRequest request) {
+ return getStyleConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * GetStyleConfigRequest request =
+ * GetStyleConfigRequest.newBuilder()
+ * .setName(StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]").toString())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.getStyleConfigCallable().futureCall(request);
+ * // Do something.
+ * StyleConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (StyleConfig element : mapManagementClient.listStyleConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that owns the StyleConfigs. Format: `projects/{project}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListStyleConfigsPagedResponse listStyleConfigs(@Nullable ProjectName parent) {
+ ListStyleConfigsRequest request =
+ ListStyleConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listStyleConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists StyleConfigs.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * for (StyleConfig element : mapManagementClient.listStyleConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent project that owns the StyleConfigs. Format: `projects/{project}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListStyleConfigsPagedResponse listStyleConfigs(String parent) {
+ ListStyleConfigsRequest request =
+ ListStyleConfigsRequest.newBuilder().setParent(parent).build();
+ return listStyleConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists StyleConfigs.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListStyleConfigsRequest request =
+ * ListStyleConfigsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setView(StyleConfigView.forNumber(0))
+ * .build();
+ * for (StyleConfig element : mapManagementClient.listStyleConfigs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListStyleConfigsPagedResponse listStyleConfigs(ListStyleConfigsRequest request) {
+ return listStyleConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists StyleConfigs.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListStyleConfigsRequest request =
+ * ListStyleConfigsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setView(StyleConfigView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.listStyleConfigsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (StyleConfig element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListStyleConfigsRequest request =
+ * ListStyleConfigsRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setView(StyleConfigView.forNumber(0))
+ * .build();
+ * while (true) {
+ * ListStyleConfigsResponse response =
+ * mapManagementClient.listStyleConfigsCallable().call(request);
+ * for (StyleConfig element : response.getStyleConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * StyleConfig styleConfig = StyleConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * StyleConfig response = mapManagementClient.updateStyleConfig(styleConfig, updateMask);
+ * }
+ * }
+ *
+ * @param styleConfig Required. The StyleConfig to update.
+ * The StyleConfig's `name` field is used to identify the StyleConfig to update. Format: + * `projects/{project}/styleConfigs/{style_config}` + * @param updateMask Optional. The list of fields to update. If not specified, the StyleConfig + * will be updated in its entirety. Valid fields are: + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * UpdateStyleConfigRequest request =
+ * UpdateStyleConfigRequest.newBuilder()
+ * .setStyleConfig(StyleConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * StyleConfig response = mapManagementClient.updateStyleConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StyleConfig updateStyleConfig(UpdateStyleConfigRequest request) {
+ return updateStyleConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * UpdateStyleConfigRequest request =
+ * UpdateStyleConfigRequest.newBuilder()
+ * .setStyleConfig(StyleConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.updateStyleConfigCallable().futureCall(request);
+ * // Do something.
+ * StyleConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * StyleConfigName name = StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]");
+ * mapManagementClient.deleteStyleConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the StyleConfig to delete. Format:
+ * `projects/{project}/styleConfigs/{style_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteStyleConfig(@Nullable StyleConfigName name) {
+ DeleteStyleConfigRequest request =
+ DeleteStyleConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteStyleConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String name = StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]").toString();
+ * mapManagementClient.deleteStyleConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the StyleConfig to delete. Format:
+ * `projects/{project}/styleConfigs/{style_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteStyleConfig(String name) {
+ DeleteStyleConfigRequest request = DeleteStyleConfigRequest.newBuilder().setName(name).build();
+ deleteStyleConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * DeleteStyleConfigRequest request =
+ * DeleteStyleConfigRequest.newBuilder()
+ * .setName(StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]").toString())
+ * .build();
+ * mapManagementClient.deleteStyleConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteStyleConfig(DeleteStyleConfigRequest request) {
+ deleteStyleConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a StyleConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * DeleteStyleConfigRequest request =
+ * DeleteStyleConfigRequest.newBuilder()
+ * .setName(StyleConfigName.of("[PROJECT]", "[STYLE_CONFIG]").toString())
+ * .build();
+ * ApiFuture future = mapManagementClient.deleteStyleConfigCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapConfigName parent = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]");
+ * MapContextConfig mapContextConfig = MapContextConfig.newBuilder().build();
+ * MapContextConfig response =
+ * mapManagementClient.createMapContextConfig(parent, mapContextConfig);
+ * }
+ * }
+ *
+ * @param parent Required. Parent MapConfig that will own the MapContextConfig. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @param mapContextConfig Required. The MapContextConfig to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapContextConfig createMapContextConfig(
+ @Nullable MapConfigName parent, MapContextConfig mapContextConfig) {
+ CreateMapContextConfigRequest request =
+ CreateMapContextConfigRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setMapContextConfig(mapContextConfig)
+ .build();
+ return createMapContextConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String parent = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString();
+ * MapContextConfig mapContextConfig = MapContextConfig.newBuilder().build();
+ * MapContextConfig response =
+ * mapManagementClient.createMapContextConfig(parent, mapContextConfig);
+ * }
+ * }
+ *
+ * @param parent Required. Parent MapConfig that will own the MapContextConfig. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @param mapContextConfig Required. The MapContextConfig to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapContextConfig createMapContextConfig(
+ String parent, MapContextConfig mapContextConfig) {
+ CreateMapContextConfigRequest request =
+ CreateMapContextConfigRequest.newBuilder()
+ .setParent(parent)
+ .setMapContextConfig(mapContextConfig)
+ .build();
+ return createMapContextConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * CreateMapContextConfigRequest request =
+ * CreateMapContextConfigRequest.newBuilder()
+ * .setParent(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .setMapContextConfig(MapContextConfig.newBuilder().build())
+ * .build();
+ * MapContextConfig response = mapManagementClient.createMapContextConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapContextConfig createMapContextConfig(CreateMapContextConfigRequest request) {
+ return createMapContextConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * CreateMapContextConfigRequest request =
+ * CreateMapContextConfigRequest.newBuilder()
+ * .setParent(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .setMapContextConfig(MapContextConfig.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.createMapContextConfigCallable().futureCall(request);
+ * // Do something.
+ * MapContextConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapContextConfigName name =
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]");
+ * MapContextConfig response = mapManagementClient.getMapContextConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapContextConfig. Format:
+ * `projects/{project}/mapConfigs/{map_config}/mapContextConfigs/{map_context_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapContextConfig getMapContextConfig(@Nullable MapContextConfigName name) {
+ GetMapContextConfigRequest request =
+ GetMapContextConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getMapContextConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String name =
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]").toString();
+ * MapContextConfig response = mapManagementClient.getMapContextConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapContextConfig. Format:
+ * `projects/{project}/mapConfigs/{map_config}/mapContextConfigs/{map_context_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapContextConfig getMapContextConfig(String name) {
+ GetMapContextConfigRequest request =
+ GetMapContextConfigRequest.newBuilder().setName(name).build();
+ return getMapContextConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * GetMapContextConfigRequest request =
+ * GetMapContextConfigRequest.newBuilder()
+ * .setName(
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]")
+ * .toString())
+ * .build();
+ * MapContextConfig response = mapManagementClient.getMapContextConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapContextConfig getMapContextConfig(GetMapContextConfigRequest request) {
+ return getMapContextConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * GetMapContextConfigRequest request =
+ * GetMapContextConfigRequest.newBuilder()
+ * .setName(
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.getMapContextConfigCallable().futureCall(request);
+ * // Do something.
+ * MapContextConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapConfigName parent = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]");
+ * for (MapContextConfig element :
+ * mapManagementClient.listMapContextConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent MapConfig that owns the MapContextConfigs. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMapContextConfigsPagedResponse listMapContextConfigs(
+ @Nullable MapConfigName parent) {
+ ListMapContextConfigsRequest request =
+ ListMapContextConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMapContextConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MapContextConfigs.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String parent = MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString();
+ * for (MapContextConfig element :
+ * mapManagementClient.listMapContextConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent MapConfig that owns the MapContextConfigs. Format:
+ * `projects/{project}/mapConfigs/{map_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMapContextConfigsPagedResponse listMapContextConfigs(String parent) {
+ ListMapContextConfigsRequest request =
+ ListMapContextConfigsRequest.newBuilder().setParent(parent).build();
+ return listMapContextConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MapContextConfigs.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListMapContextConfigsRequest request =
+ * ListMapContextConfigsRequest.newBuilder()
+ * .setParent(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (MapContextConfig element :
+ * mapManagementClient.listMapContextConfigs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMapContextConfigsPagedResponse listMapContextConfigs(
+ ListMapContextConfigsRequest request) {
+ return listMapContextConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists MapContextConfigs.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListMapContextConfigsRequest request =
+ * ListMapContextConfigsRequest.newBuilder()
+ * .setParent(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.listMapContextConfigsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (MapContextConfig element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ListMapContextConfigsRequest request =
+ * ListMapContextConfigsRequest.newBuilder()
+ * .setParent(MapConfigName.of("[PROJECT]", "[MAP_CONFIG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListMapContextConfigsResponse response =
+ * mapManagementClient.listMapContextConfigsCallable().call(request);
+ * for (MapContextConfig element : response.getMapContextConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapContextConfig mapContextConfig = MapContextConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * MapContextConfig response =
+ * mapManagementClient.updateMapContextConfig(mapContextConfig, updateMask);
+ * }
+ * }
+ *
+ * @param mapContextConfig Required. The MapContextConfig to update.
+ * The MapContextConfig's `name` field is used to identify the MapContextConfig to update. + * Format: `projects/{project}/mapConfigs/{map_config}/mapContextConfigs/{map_context_config}` + * @param updateMask Optional. The list of fields to update. If not specified, the + * MapContextConfig will be updated in its entirety. Valid fields are: + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * UpdateMapContextConfigRequest request =
+ * UpdateMapContextConfigRequest.newBuilder()
+ * .setMapContextConfig(MapContextConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * MapContextConfig response = mapManagementClient.updateMapContextConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MapContextConfig updateMapContextConfig(UpdateMapContextConfigRequest request) {
+ return updateMapContextConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * UpdateMapContextConfigRequest request =
+ * UpdateMapContextConfigRequest.newBuilder()
+ * .setMapContextConfig(MapContextConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.updateMapContextConfigCallable().futureCall(request);
+ * // Do something.
+ * MapContextConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * MapContextConfigName name =
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]");
+ * mapManagementClient.deleteMapContextConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapContextConfig to delete. Format:
+ * `projects/{project}/mapConfigs/{map_config}/mapContextConfigs/{map_context_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteMapContextConfig(@Nullable MapContextConfigName name) {
+ DeleteMapContextConfigRequest request =
+ DeleteMapContextConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteMapContextConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * String name =
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]").toString();
+ * mapManagementClient.deleteMapContextConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Resource name of the MapContextConfig to delete. Format:
+ * `projects/{project}/mapConfigs/{map_config}/mapContextConfigs/{map_context_config}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteMapContextConfig(String name) {
+ DeleteMapContextConfigRequest request =
+ DeleteMapContextConfigRequest.newBuilder().setName(name).build();
+ deleteMapContextConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * DeleteMapContextConfigRequest request =
+ * DeleteMapContextConfigRequest.newBuilder()
+ * .setName(
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]")
+ * .toString())
+ * .build();
+ * mapManagementClient.deleteMapContextConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteMapContextConfig(DeleteMapContextConfigRequest request) {
+ deleteMapContextConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a MapContextConfig.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * DeleteMapContextConfigRequest request =
+ * DeleteMapContextConfigRequest.newBuilder()
+ * .setName(
+ * MapContextConfigName.of("[PROJECT]", "[MAP_CONFIG]", "[MAP_CONTEXT_CONFIG]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * mapManagementClient.deleteMapContextConfigCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createMapConfig: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * MapManagementSettings.Builder mapManagementSettingsBuilder = MapManagementSettings.newBuilder();
+ * mapManagementSettingsBuilder
+ * .createMapConfigSettings()
+ * .setRetrySettings(
+ * mapManagementSettingsBuilder
+ * .createMapConfigSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * MapManagementSettings mapManagementSettings = mapManagementSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class MapManagementSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= MapManagementClient =======================
+ *
+ * Service Description: The Map Management API uses your inputs to create and manage Google Cloud
+ * based styling resources for Google Maps.
+ *
+ * Using this API, you can can create and manage MapConfigs (Map IDs), StyleConfigs (JSON-based
+ * styling), and MapContextConfigs (associations between styles, datasets, and map variants).
+ *
+ * This API offers features through three channels:
+ *
+ * Capabilities described here are generally available across both the v2alpha and v2beta
+ * endpoints.
+ *
+ * Sample for MapManagementClient:
+ *
+ * This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcMapManagementCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcMapManagementStub extends MapManagementStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonMapManagementCallableFactory
+ implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonMapManagementStub extends MapManagementStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (MapManagementClient mapManagementClient = MapManagementClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * MapConfig mapConfig = MapConfig.newBuilder().build();
+ * MapConfig response = mapManagementClient.createMapConfig(parent, mapConfig);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.maps.mapmanagement.v2;
+
+import javax.annotation.Generated;
diff --git a/java-maps-mapmanagement/google-maps-mapmanagement/src/main/java/com/google/maps/mapmanagement/v2/stub/GrpcMapManagementCallableFactory.java b/java-maps-mapmanagement/google-maps-mapmanagement/src/main/java/com/google/maps/mapmanagement/v2/stub/GrpcMapManagementCallableFactory.java
new file mode 100644
index 000000000000..3e28a7f5c4c8
--- /dev/null
+++ b/java-maps-mapmanagement/google-maps-mapmanagement/src/main/java/com/google/maps/mapmanagement/v2/stub/GrpcMapManagementCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.maps.mapmanagement.v2.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the MapManagement service API.
+ *
+ *