From 995973b65bb3f7a78f30dfc3df75550c992fae5d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 20:38:34 +0000 Subject: [PATCH] feat: publish updated definitions for cloud/datafusion/v1 and cloud/datafusion/v1beta1 (#111) Making fields required is not a breaking change in java - [x] Regenerate this pull request now. Committer: @viacheslav-rostovtsev PiperOrigin-RevId: 421416031 Source-Link: https://github.com/googleapis/googleapis/commit/5438a17c9bcedf933854df8eb288ab300cc70a1d Source-Link: https://github.com/googleapis/googleapis-gen/commit/cc7213f0c2ac6623c4e8d4ba572337c837990bf5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2M3MjEzZjBjMmFjNjYyM2M0ZThkNGJhNTcyMzM3YzgzNzk5MGJmNSJ9 fix: multiple fields now have field_behavior REQUIRED in cloud/datafusion/v1 service definition fix: multiple fields now have field_behavior REQUIRED in cloud/datafusion/v1beta1 service definition --- .github/.OwlBot.lock.yaml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 3 + .../cloud/datafusion/v1/DataFusionClient.java | 157 ++++- .../cloud/datafusion/v1/gapic_metadata.json | 6 +- .../cloud/datafusion/v1/package-info.java | 5 +- .../datafusion/v1beta1/DataFusionClient.java | 233 ++++++- .../datafusion/v1beta1/gapic_metadata.json | 10 +- .../datafusion/v1beta1/package-info.java | 5 +- .../datafusion/v1/DataFusionClientTest.java | 204 +++++- .../v1beta1/DataFusionClientTest.java | 279 +++++++- proto-google-cloud-data-fusion-v1/pom.xml | 8 + .../datafusion/v1/CreateInstanceRequest.java | 70 +- .../v1/CreateInstanceRequestOrBuilder.java | 20 +- .../cloud/datafusion/v1/CryptoKeyConfig.java | 14 +- .../v1/CryptoKeyConfigOrBuilder.java | 4 +- .../cloud/datafusion/v1/Datafusion.java | 273 ++++---- .../datafusion/v1/DeleteInstanceRequest.java | 42 +- .../v1/DeleteInstanceRequestOrBuilder.java | 12 +- .../datafusion/v1/GetInstanceRequest.java | 42 +- .../v1/GetInstanceRequestOrBuilder.java | 12 +- .../google/cloud/datafusion/v1/Instance.java | 657 ++++++++++++++++- .../cloud/datafusion/v1/InstanceName.java | 223 ++++++ .../datafusion/v1/InstanceOrBuilder.java | 93 ++- .../v1/ListAvailableVersionsRequest.java | 56 +- ...ListAvailableVersionsRequestOrBuilder.java | 16 +- .../datafusion/v1/ListInstancesRequest.java | 42 +- .../v1/ListInstancesRequestOrBuilder.java | 12 +- .../cloud/datafusion/v1/LocationName.java | 192 +++++ .../datafusion/v1/OperationMetadata.java | 20 +- .../v1/OperationMetadataOrBuilder.java | 5 +- .../datafusion/v1/RestartInstanceRequest.java | 42 +- .../v1/RestartInstanceRequestOrBuilder.java | 12 +- .../datafusion/v1/UpdateInstanceRequest.java | 96 ++- .../v1/UpdateInstanceRequestOrBuilder.java | 18 +- .../google/cloud/datafusion/v1/Version.java | 307 ++++++++ .../cloud/datafusion/v1/VersionOrBuilder.java | 25 + .../cloud/datafusion/v1/datafusion.proto | 153 ++-- .../v1beta1/AddDnsPeeringRequest.java | 42 +- .../AddDnsPeeringRequestOrBuilder.java | 12 +- .../v1beta1/CreateInstanceRequest.java | 70 +- .../CreateInstanceRequestOrBuilder.java | 20 +- .../datafusion/v1beta1/CryptoKeyConfig.java | 14 +- .../v1beta1/CryptoKeyConfigOrBuilder.java | 4 +- .../v1beta1/DeleteInstanceRequest.java | 42 +- .../DeleteInstanceRequestOrBuilder.java | 12 +- .../v1beta1/GetInstanceRequest.java | 42 +- .../v1beta1/GetInstanceRequestOrBuilder.java | 12 +- .../cloud/datafusion/v1beta1/Instance.java | 659 +++++++++++++++++- .../datafusion/v1beta1/InstanceOrBuilder.java | 94 ++- .../v1beta1/ListAvailableVersionsRequest.java | 56 +- ...ListAvailableVersionsRequestOrBuilder.java | 16 +- .../v1beta1/ListInstancesRequest.java | 42 +- .../ListInstancesRequestOrBuilder.java | 12 +- .../datafusion/v1beta1/LocationName.java | 192 +++++ .../datafusion/v1beta1/OperationMetadata.java | 20 +- .../v1beta1/OperationMetadataOrBuilder.java | 5 +- .../v1beta1/RemoveDnsPeeringRequest.java | 42 +- .../RemoveDnsPeeringRequestOrBuilder.java | 12 +- .../v1beta1/RemoveIamPolicyRequest.java | 28 +- .../RemoveIamPolicyRequestOrBuilder.java | 8 +- .../v1beta1/RestartInstanceRequest.java | 42 +- .../RestartInstanceRequestOrBuilder.java | 12 +- .../v1beta1/UpdateInstanceRequest.java | 72 +- .../UpdateInstanceRequestOrBuilder.java | 18 +- .../v1beta1/UpgradeInstanceRequest.java | 42 +- .../UpgradeInstanceRequestOrBuilder.java | 12 +- .../cloud/datafusion/v1beta1/V1Beta1.java | 403 ++++++----- .../cloud/datafusion/v1beta1/Version.java | 309 ++++++++ .../datafusion/v1beta1/VersionOrBuilder.java | 25 + .../cloud/datafusion/v1beta1/v1beta1.proto | 205 ++++-- 70 files changed, 4901 insertions(+), 1065 deletions(-) create mode 100644 proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceName.java create mode 100644 proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/LocationName.java create mode 100644 proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/LocationName.java diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9786771c..9351fdfb 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b + digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9ea039c0..6e1bb240 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,3 +5,6 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ + +If you write sample code, please follow the [samples format]( +https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionClient.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionClient.java index 8a462f61..f758d162 100644 --- a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionClient.java +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionClient.java @@ -49,7 +49,10 @@ * *
{@code
  * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
- *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   GetInstanceRequest request =
+ *       GetInstanceRequest.newBuilder()
+ *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ *           .build();
  *   Instance response = dataFusionClient.getInstance(request);
  * }
  * }
@@ -170,7 +173,34 @@ public final OperationsClient getOperationsClient() { * *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String parent = "parent-995424086";
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Version element : dataFusionClient.listAvailableVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve instance information in + * the format projects/{project}/locations/{location}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAvailableVersionsPagedResponse listAvailableVersions(LocationName parent) { + ListAvailableVersionsRequest request = + ListAvailableVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAvailableVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Version element : dataFusionClient.listAvailableVersions(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -197,7 +227,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(String par
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListAvailableVersionsRequest request =
    *       ListAvailableVersionsRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setLatestPatchOnly(true)
@@ -226,7 +256,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListAvailableVersionsRequest request =
    *       ListAvailableVersionsRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setLatestPatchOnly(true)
@@ -255,7 +285,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListAvailableVersionsRequest request =
    *       ListAvailableVersionsRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setLatestPatchOnly(true)
@@ -291,7 +321,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListInstancesRequest request =
    *       ListInstancesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setFilter("filter-1274492040")
@@ -320,7 +350,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListInstancesRequest request =
    *       ListInstancesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setFilter("filter-1274492040")
@@ -350,7 +380,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListInstancesRequest request =
    *       ListInstancesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setFilter("filter-1274492040")
@@ -383,7 +413,10 @@ public final UnaryCallable listInst
    *
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   Instance response = dataFusionClient.getInstance(request);
    * }
    * }
@@ -403,7 +436,10 @@ public final Instance getInstance(GetInstanceRequest request) { * *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   ApiFuture future = dataFusionClient.getInstanceCallable().futureCall(request);
    *   // Do something.
    *   Instance response = future.get();
@@ -422,17 +458,49 @@ public final UnaryCallable getInstanceCallable() {
    *
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String parent = "parent-995424086";
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Instance instance = Instance.newBuilder().build();
+   *   String instanceId = "instanceId902024336";
+   *   Instance response = dataFusionClient.createInstanceAsync(parent, instance, instanceId).get();
+   * }
+   * }
+ * + * @param parent Required. The instance's project and location in the format + * projects/{project}/locations/{location}. + * @param instance An instance resource. + * @param instanceId Required. The name of the instance to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + LocationName parent, Instance instance, String instanceId) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInstance(instance) + .setInstanceId(instanceId) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   Instance instance = Instance.newBuilder().build();
    *   String instanceId = "instanceId902024336";
    *   Instance response = dataFusionClient.createInstanceAsync(parent, instance, instanceId).get();
    * }
    * }
* - * @param parent The instance's project and location in the format + * @param parent Required. The instance's project and location in the format * projects/{project}/locations/{location}. * @param instance An instance resource. - * @param instanceId The name of the instance to create. + * @param instanceId Required. The name of the instance to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( @@ -456,7 +524,7 @@ public final OperationFuture createInstanceAsync( * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * CreateInstanceRequest request = * CreateInstanceRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setInstanceId("instanceId902024336") * .setInstance(Instance.newBuilder().build()) * .build(); @@ -482,7 +550,7 @@ public final OperationFuture createInstanceAsync( * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * CreateInstanceRequest request = * CreateInstanceRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setInstanceId("instanceId902024336") * .setInstance(Instance.newBuilder().build()) * .build(); @@ -508,7 +576,7 @@ public final OperationFuture createInstanceAsync( * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * CreateInstanceRequest request = * CreateInstanceRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setInstanceId("instanceId902024336") * .setInstance(Instance.newBuilder().build()) * .build(); @@ -530,12 +598,35 @@ public final UnaryCallable createInstanceCalla * *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String name = "name3373707";
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   dataFusionClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The instance resource name in the format + * projects/{project}/locations/{location}/instances/{instance} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(InstanceName name) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Date Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
    *   dataFusionClient.deleteInstanceAsync(name).get();
    * }
    * }
* - * @param name The instance resource name in the format + * @param name Required. The instance resource name in the format * projects/{project}/locations/{location}/instances/{instance} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -553,7 +644,9 @@ public final OperationFuture deleteInstanceAsync(Strin *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   dataFusionClient.deleteInstanceAsync(request).get();
    * }
    * }
@@ -575,7 +668,9 @@ public final OperationFuture deleteInstanceAsync( *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   OperationFuture future =
    *       dataFusionClient.deleteInstanceOperationCallable().futureCall(request);
    *   // Do something.
@@ -597,7 +692,9 @@ public final OperationFuture deleteInstanceAsync(
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   ApiFuture future = dataFusionClient.deleteInstanceCallable().futureCall(request);
    *   // Do something.
    *   future.get();
@@ -622,9 +719,9 @@ public final UnaryCallable deleteInstanceCalla
    * }
    * }
* - * @param instance The instance resource that replaces the resource on the server. Currently, Data - * Fusion only allows replacing labels, options, and stack driver settings. All other fields - * will be ignored. + * @param instance Required. The instance resource that replaces the resource on the server. + * Currently, Data Fusion only allows replacing labels, options, and stack driver settings. + * All other fields will be ignored. * @param updateMask Field mask is used to specify the fields that the update will overwrite in an * instance resource. The fields specified in the update_mask are relative to the resource, * not the full request. A field will be overwritten if it is in the mask. If the user does @@ -721,7 +818,9 @@ public final UnaryCallable updateInstanceCalla *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   RestartInstanceRequest request =
-   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *       RestartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   Instance response = dataFusionClient.restartInstanceAsync(request).get();
    * }
    * }
@@ -743,7 +842,9 @@ public final OperationFuture restartInstanceAsync( *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   RestartInstanceRequest request =
-   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *       RestartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   OperationFuture future =
    *       dataFusionClient.restartInstanceOperationCallable().futureCall(request);
    *   // Do something.
@@ -765,7 +866,9 @@ public final OperationFuture restartInstanceAsync(
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   RestartInstanceRequest request =
-   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *       RestartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   ApiFuture future = dataFusionClient.restartInstanceCallable().futureCall(request);
    *   // Do something.
    *   Operation response = future.get();
diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/gapic_metadata.json b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/gapic_metadata.json
index 1f175c39..83b57f49 100644
--- a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/gapic_metadata.json
+++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/gapic_metadata.json
@@ -11,16 +11,16 @@
           "libraryClient": "DataFusionClient",
           "rpcs": {
             "CreateInstance": {
-              "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"]
+              "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"]
             },
             "DeleteInstance": {
-              "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"]
+              "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"]
             },
             "GetInstance": {
               "methods": ["getInstance", "getInstanceCallable"]
             },
             "ListAvailableVersions": {
-              "methods": ["listAvailableVersions", "listAvailableVersions", "listAvailableVersionsPagedCallable", "listAvailableVersionsCallable"]
+              "methods": ["listAvailableVersions", "listAvailableVersions", "listAvailableVersions", "listAvailableVersionsPagedCallable", "listAvailableVersionsCallable"]
             },
             "ListInstances": {
               "methods": ["listInstances", "listInstancesPagedCallable", "listInstancesCallable"]
diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/package-info.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/package-info.java
index 4df6433d..fe3b3b17 100644
--- a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/package-info.java
+++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/package-info.java
@@ -26,7 +26,10 @@
  *
  * 
{@code
  * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
- *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   GetInstanceRequest request =
+ *       GetInstanceRequest.newBuilder()
+ *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ *           .build();
  *   Instance response = dataFusionClient.getInstance(request);
  * }
  * }
diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java index a3941e69..a4a89b16 100644 --- a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java @@ -49,7 +49,10 @@ * *
{@code
  * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
- *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   GetInstanceRequest request =
+ *       GetInstanceRequest.newBuilder()
+ *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ *           .build();
  *   Instance response = dataFusionClient.getInstance(request);
  * }
  * }
@@ -171,7 +174,34 @@ public final OperationsClient getOperationsClient() { * *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String parent = "parent-995424086";
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Version element : dataFusionClient.listAvailableVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve instance information in + * the format projects/{project}/locations/{location}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAvailableVersionsPagedResponse listAvailableVersions(LocationName parent) { + ListAvailableVersionsRequest request = + ListAvailableVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAvailableVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Version element : dataFusionClient.listAvailableVersions(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -198,7 +228,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(String par
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListAvailableVersionsRequest request =
    *       ListAvailableVersionsRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setLatestPatchOnly(true)
@@ -227,7 +257,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListAvailableVersionsRequest request =
    *       ListAvailableVersionsRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setLatestPatchOnly(true)
@@ -256,7 +286,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListAvailableVersionsRequest request =
    *       ListAvailableVersionsRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setLatestPatchOnly(true)
@@ -292,7 +322,7 @@ public final ListAvailableVersionsPagedResponse listAvailableVersions(
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListInstancesRequest request =
    *       ListInstancesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setFilter("filter-1274492040")
@@ -321,7 +351,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListInstancesRequest request =
    *       ListInstancesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setFilter("filter-1274492040")
@@ -351,7 +381,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   ListInstancesRequest request =
    *       ListInstancesRequest.newBuilder()
-   *           .setParent("parent-995424086")
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
    *           .setFilter("filter-1274492040")
@@ -384,7 +414,10 @@ public final UnaryCallable listInst
    *
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   Instance response = dataFusionClient.getInstance(request);
    * }
    * }
@@ -404,7 +437,10 @@ public final Instance getInstance(GetInstanceRequest request) { * *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   ApiFuture future = dataFusionClient.getInstanceCallable().futureCall(request);
    *   // Do something.
    *   Instance response = future.get();
@@ -423,17 +459,49 @@ public final UnaryCallable getInstanceCallable() {
    *
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String parent = "parent-995424086";
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Instance instance = Instance.newBuilder().build();
+   *   String instanceId = "instanceId902024336";
+   *   Instance response = dataFusionClient.createInstanceAsync(parent, instance, instanceId).get();
+   * }
+   * }
+ * + * @param parent Required. The instance's project and location in the format + * projects/{project}/locations/{location}. + * @param instance An instance resource. + * @param instanceId Required. The name of the instance to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + LocationName parent, Instance instance, String instanceId) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInstance(instance) + .setInstanceId(instanceId) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   Instance instance = Instance.newBuilder().build();
    *   String instanceId = "instanceId902024336";
    *   Instance response = dataFusionClient.createInstanceAsync(parent, instance, instanceId).get();
    * }
    * }
* - * @param parent The instance's project and location in the format + * @param parent Required. The instance's project and location in the format * projects/{project}/locations/{location}. * @param instance An instance resource. - * @param instanceId The name of the instance to create. + * @param instanceId Required. The name of the instance to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( @@ -457,7 +525,7 @@ public final OperationFuture createInstanceAsync( * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * CreateInstanceRequest request = * CreateInstanceRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setInstanceId("instanceId902024336") * .setInstance(Instance.newBuilder().build()) * .build(); @@ -483,7 +551,7 @@ public final OperationFuture createInstanceAsync( * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * CreateInstanceRequest request = * CreateInstanceRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setInstanceId("instanceId902024336") * .setInstance(Instance.newBuilder().build()) * .build(); @@ -509,7 +577,7 @@ public final OperationFuture createInstanceAsync( * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * CreateInstanceRequest request = * CreateInstanceRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setInstanceId("instanceId902024336") * .setInstance(Instance.newBuilder().build()) * .build(); @@ -531,12 +599,35 @@ public final UnaryCallable createInstanceCalla * *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String name = "name3373707";
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   dataFusionClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The instance resource name in the format + * projects/{project}/locations/{location}/instances/{instance} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(InstanceName name) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
    *   dataFusionClient.deleteInstanceAsync(name).get();
    * }
    * }
* - * @param name The instance resource name in the format + * @param name Required. The instance resource name in the format * projects/{project}/locations/{location}/instances/{instance} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -554,7 +645,9 @@ public final OperationFuture deleteInstanceAsync(Strin *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   dataFusionClient.deleteInstanceAsync(request).get();
    * }
    * }
@@ -576,7 +669,9 @@ public final OperationFuture deleteInstanceAsync( *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   OperationFuture future =
    *       dataFusionClient.deleteInstanceOperationCallable().futureCall(request);
    *   // Do something.
@@ -598,7 +693,9 @@ public final OperationFuture deleteInstanceAsync(
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   DeleteInstanceRequest request =
-   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *       DeleteInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   ApiFuture future = dataFusionClient.deleteInstanceCallable().futureCall(request);
    *   // Do something.
    *   future.get();
@@ -623,9 +720,9 @@ public final UnaryCallable deleteInstanceCalla
    * }
    * }
* - * @param instance The instance resource that replaces the resource on the server. Currently, Data - * Fusion only allows replacing labels, options, and stack driver settings. All other fields - * will be ignored. + * @param instance Required. The instance resource that replaces the resource on the server. + * Currently, Data Fusion only allows replacing labels, options, and stack driver settings. + * All other fields will be ignored. * @param updateMask Field mask is used to specify the fields that the update will overwrite in an * instance resource. The fields specified in the update_mask are relative to the resource, * not the full request. A field will be overwritten if it is in the mask. If the user does @@ -722,7 +819,9 @@ public final UnaryCallable updateInstanceCalla *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   RestartInstanceRequest request =
-   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *       RestartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   Instance response = dataFusionClient.restartInstanceAsync(request).get();
    * }
    * }
@@ -744,7 +843,9 @@ public final OperationFuture restartInstanceAsync( *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   RestartInstanceRequest request =
-   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *       RestartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   OperationFuture future =
    *       dataFusionClient.restartInstanceOperationCallable().futureCall(request);
    *   // Do something.
@@ -766,7 +867,9 @@ public final OperationFuture restartInstanceAsync(
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   RestartInstanceRequest request =
-   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *       RestartInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   ApiFuture future = dataFusionClient.restartInstanceCallable().futureCall(request);
    *   // Do something.
    *   Operation response = future.get();
@@ -786,7 +889,9 @@ public final UnaryCallable restartInstanceCal
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   UpgradeInstanceRequest request =
-   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *       UpgradeInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   Instance response = dataFusionClient.upgradeInstanceAsync(request).get();
    * }
    * }
@@ -808,7 +913,9 @@ public final OperationFuture upgradeInstanceAsync( *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   UpgradeInstanceRequest request =
-   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *       UpgradeInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   OperationFuture future =
    *       dataFusionClient.upgradeInstanceOperationCallable().futureCall(request);
    *   // Do something.
@@ -830,7 +937,9 @@ public final OperationFuture upgradeInstanceAsync(
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
    *   UpgradeInstanceRequest request =
-   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *       UpgradeInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
    *   ApiFuture future = dataFusionClient.upgradeInstanceCallable().futureCall(request);
    *   // Do something.
    *   Operation response = future.get();
@@ -1033,12 +1142,36 @@ public final ListNamespacesPagedResponse listNamespaces(ListNamespacesRequest re
    *
    * 
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String parent = "parent-995424086";
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   AddDnsPeeringResponse response = dataFusionClient.addDnsPeering(parent);
+   * }
+   * }
+ * + * @param parent Required. The resource on which DNS peering will be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AddDnsPeeringResponse addDnsPeering(InstanceName parent) { + AddDnsPeeringRequest request = + AddDnsPeeringRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return addDnsPeering(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
    *   AddDnsPeeringResponse response = dataFusionClient.addDnsPeering(parent);
    * }
    * }
* - * @param parent The resource on which DNS peering will be created. + * @param parent Required. The resource on which DNS peering will be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddDnsPeeringResponse addDnsPeering(String parent) { @@ -1056,7 +1189,7 @@ public final AddDnsPeeringResponse addDnsPeering(String parent) { * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * AddDnsPeeringRequest request = * AddDnsPeeringRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) * .setDnsPeering(DnsPeering.newBuilder().build()) * .build(); * AddDnsPeeringResponse response = dataFusionClient.addDnsPeering(request); @@ -1080,7 +1213,7 @@ public final AddDnsPeeringResponse addDnsPeering(AddDnsPeeringRequest request) { * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * AddDnsPeeringRequest request = * AddDnsPeeringRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) * .setDnsPeering(DnsPeering.newBuilder().build()) * .build(); * ApiFuture future = @@ -1102,12 +1235,36 @@ public final UnaryCallable addDnsPe * *
{@code
    * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
-   *   String parent = "parent-995424086";
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   RemoveDnsPeeringResponse response = dataFusionClient.removeDnsPeering(parent);
+   * }
+   * }
+ * + * @param parent Required. The resource on which DNS peering will be removed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RemoveDnsPeeringResponse removeDnsPeering(InstanceName parent) { + RemoveDnsPeeringRequest request = + RemoveDnsPeeringRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return removeDnsPeering(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
    *   RemoveDnsPeeringResponse response = dataFusionClient.removeDnsPeering(parent);
    * }
    * }
* - * @param parent The resource on which DNS peering will be removed. + * @param parent Required. The resource on which DNS peering will be removed. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RemoveDnsPeeringResponse removeDnsPeering(String parent) { @@ -1126,7 +1283,7 @@ public final RemoveDnsPeeringResponse removeDnsPeering(String parent) { * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * RemoveDnsPeeringRequest request = * RemoveDnsPeeringRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) * .setZone("zone3744684") * .build(); * RemoveDnsPeeringResponse response = dataFusionClient.removeDnsPeering(request); @@ -1150,7 +1307,7 @@ public final RemoveDnsPeeringResponse removeDnsPeering(RemoveDnsPeeringRequest r * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * RemoveDnsPeeringRequest request = * RemoveDnsPeeringRequest.newBuilder() - * .setParent("parent-995424086") + * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) * .setZone("zone3744684") * .build(); * ApiFuture future = diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/gapic_metadata.json b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/gapic_metadata.json index 34af1c69..b80b1da6 100644 --- a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/gapic_metadata.json +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/gapic_metadata.json @@ -11,19 +11,19 @@ "libraryClient": "DataFusionClient", "rpcs": { "AddDnsPeering": { - "methods": ["addDnsPeering", "addDnsPeering", "addDnsPeeringCallable"] + "methods": ["addDnsPeering", "addDnsPeering", "addDnsPeering", "addDnsPeeringCallable"] }, "CreateInstance": { - "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] + "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] }, "DeleteInstance": { - "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] + "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] }, "GetInstance": { "methods": ["getInstance", "getInstanceCallable"] }, "ListAvailableVersions": { - "methods": ["listAvailableVersions", "listAvailableVersions", "listAvailableVersionsPagedCallable", "listAvailableVersionsCallable"] + "methods": ["listAvailableVersions", "listAvailableVersions", "listAvailableVersions", "listAvailableVersionsPagedCallable", "listAvailableVersionsCallable"] }, "ListDnsPeerings": { "methods": ["listDnsPeerings", "listDnsPeerings", "listDnsPeerings", "listDnsPeeringsPagedCallable", "listDnsPeeringsCallable"] @@ -35,7 +35,7 @@ "methods": ["listNamespaces", "listNamespaces", "listNamespaces", "listNamespacesPagedCallable", "listNamespacesCallable"] }, "RemoveDnsPeering": { - "methods": ["removeDnsPeering", "removeDnsPeering", "removeDnsPeeringCallable"] + "methods": ["removeDnsPeering", "removeDnsPeering", "removeDnsPeering", "removeDnsPeeringCallable"] }, "RemoveIamPolicy": { "methods": ["removeIamPolicy", "removeIamPolicyCallable"] diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/package-info.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/package-info.java index 2ac06ab2..b4483219 100644 --- a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/package-info.java +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/package-info.java @@ -26,7 +26,10 @@ * *
{@code
  * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
- *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   GetInstanceRequest request =
+ *       GetInstanceRequest.newBuilder()
+ *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ *           .build();
  *   Instance response = dataFusionClient.getInstance(request);
  * }
  * }
diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/DataFusionClientTest.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/DataFusionClientTest.java index 3001b2c0..433801dd 100644 --- a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/DataFusionClientTest.java +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/DataFusionClientTest.java @@ -98,6 +98,51 @@ public void listAvailableVersionsTest() throws Exception { .build(); mockDataFusion.addResponse(expectedResponse); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAvailableVersionsPagedResponse pagedListResponse = client.listAvailableVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAvailableVersionsList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAvailableVersionsRequest actualRequest = + ((ListAvailableVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAvailableVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAvailableVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAvailableVersionsTest2() throws Exception { + Version responsesElement = Version.newBuilder().build(); + ListAvailableVersionsResponse expectedResponse = + ListAvailableVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllAvailableVersions(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + String parent = "parent-995424086"; ListAvailableVersionsPagedResponse pagedListResponse = client.listAvailableVersions(parent); @@ -120,7 +165,7 @@ public void listAvailableVersionsTest() throws Exception { } @Test - public void listAvailableVersionsExceptionTest() throws Exception { + public void listAvailableVersionsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); @@ -145,7 +190,7 @@ public void listInstancesTest() throws Exception { ListInstancesRequest request = ListInstancesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") @@ -182,7 +227,7 @@ public void listInstancesExceptionTest() throws Exception { try { ListInstancesRequest request = ListInstancesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") @@ -199,7 +244,7 @@ public void listInstancesExceptionTest() throws Exception { public void getInstanceTest() throws Exception { Instance expectedResponse = Instance.newBuilder() - .setName("name3373707") + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) .setDescription("description-1724546052") .setEnableStackdriverLogging(true) .setEnableStackdriverMonitoring(true) @@ -224,10 +269,14 @@ public void getInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); mockDataFusion.addResponse(expectedResponse); - GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); Instance actualResponse = client.getInstance(request); Assert.assertEquals(expectedResponse, actualResponse); @@ -249,7 +298,10 @@ public void getInstanceExceptionTest() throws Exception { mockDataFusion.addException(exception); try { - GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); client.getInstance(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -261,7 +313,7 @@ public void getInstanceExceptionTest() throws Exception { public void createInstanceTest() throws Exception { Instance expectedResponse = Instance.newBuilder() - .setName("name3373707") + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) .setDescription("description-1724546052") .setEnableStackdriverLogging(true) .setEnableStackdriverMonitoring(true) @@ -286,6 +338,84 @@ public void createInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(instanceId, actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -316,7 +446,7 @@ public void createInstanceTest() throws Exception { } @Test - public void createInstanceExceptionTest() throws Exception { + public void createInstanceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); @@ -344,6 +474,48 @@ public void deleteInstanceTest() throws Exception { .build(); mockDataFusion.addResponse(resultOperation); + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + client.deleteInstanceAsync(name).get(); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInstanceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + String name = "name3373707"; client.deleteInstanceAsync(name).get(); @@ -360,7 +532,7 @@ public void deleteInstanceTest() throws Exception { } @Test - public void deleteInstanceExceptionTest() throws Exception { + public void deleteInstanceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); @@ -379,7 +551,7 @@ public void deleteInstanceExceptionTest() throws Exception { public void updateInstanceTest() throws Exception { Instance expectedResponse = Instance.newBuilder() - .setName("name3373707") + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) .setDescription("description-1724546052") .setEnableStackdriverLogging(true) .setEnableStackdriverMonitoring(true) @@ -404,6 +576,7 @@ public void updateInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -452,7 +625,7 @@ public void updateInstanceExceptionTest() throws Exception { public void restartInstanceTest() throws Exception { Instance expectedResponse = Instance.newBuilder() - .setName("name3373707") + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) .setDescription("description-1724546052") .setEnableStackdriverLogging(true) .setEnableStackdriverMonitoring(true) @@ -477,6 +650,7 @@ public void restartInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -487,7 +661,9 @@ public void restartInstanceTest() throws Exception { mockDataFusion.addResponse(resultOperation); RestartInstanceRequest request = - RestartInstanceRequest.newBuilder().setName("name3373707").build(); + RestartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); Instance actualResponse = client.restartInstanceAsync(request).get(); Assert.assertEquals(expectedResponse, actualResponse); @@ -510,7 +686,9 @@ public void restartInstanceExceptionTest() throws Exception { try { RestartInstanceRequest request = - RestartInstanceRequest.newBuilder().setName("name3373707").build(); + RestartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); client.restartInstanceAsync(request).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/DataFusionClientTest.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/DataFusionClientTest.java index 1b5a7431..709b2d7f 100644 --- a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/DataFusionClientTest.java +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/DataFusionClientTest.java @@ -100,6 +100,51 @@ public void listAvailableVersionsTest() throws Exception { .build(); mockDataFusion.addResponse(expectedResponse); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAvailableVersionsPagedResponse pagedListResponse = client.listAvailableVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAvailableVersionsList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAvailableVersionsRequest actualRequest = + ((ListAvailableVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAvailableVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAvailableVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAvailableVersionsTest2() throws Exception { + Version responsesElement = Version.newBuilder().build(); + ListAvailableVersionsResponse expectedResponse = + ListAvailableVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllAvailableVersions(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + String parent = "parent-995424086"; ListAvailableVersionsPagedResponse pagedListResponse = client.listAvailableVersions(parent); @@ -122,7 +167,7 @@ public void listAvailableVersionsTest() throws Exception { } @Test - public void listAvailableVersionsExceptionTest() throws Exception { + public void listAvailableVersionsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); @@ -147,7 +192,7 @@ public void listInstancesTest() throws Exception { ListInstancesRequest request = ListInstancesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") @@ -184,7 +229,7 @@ public void listInstancesExceptionTest() throws Exception { try { ListInstancesRequest request = ListInstancesRequest.newBuilder() - .setParent("parent-995424086") + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") @@ -226,10 +271,14 @@ public void getInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); mockDataFusion.addResponse(expectedResponse); - GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); Instance actualResponse = client.getInstance(request); Assert.assertEquals(expectedResponse, actualResponse); @@ -251,7 +300,10 @@ public void getInstanceExceptionTest() throws Exception { mockDataFusion.addException(exception); try { - GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); client.getInstance(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -288,6 +340,84 @@ public void createInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(instanceId, actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -318,7 +448,7 @@ public void createInstanceTest() throws Exception { } @Test - public void createInstanceExceptionTest() throws Exception { + public void createInstanceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); @@ -346,6 +476,48 @@ public void deleteInstanceTest() throws Exception { .build(); mockDataFusion.addResponse(resultOperation); + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + client.deleteInstanceAsync(name).get(); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInstanceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + String name = "name3373707"; client.deleteInstanceAsync(name).get(); @@ -362,7 +534,7 @@ public void deleteInstanceTest() throws Exception { } @Test - public void deleteInstanceExceptionTest() throws Exception { + public void deleteInstanceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); @@ -406,6 +578,7 @@ public void updateInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -479,6 +652,7 @@ public void restartInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -489,7 +663,9 @@ public void restartInstanceTest() throws Exception { mockDataFusion.addResponse(resultOperation); RestartInstanceRequest request = - RestartInstanceRequest.newBuilder().setName("name3373707").build(); + RestartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); Instance actualResponse = client.restartInstanceAsync(request).get(); Assert.assertEquals(expectedResponse, actualResponse); @@ -512,7 +688,9 @@ public void restartInstanceExceptionTest() throws Exception { try { RestartInstanceRequest request = - RestartInstanceRequest.newBuilder().setName("name3373707").build(); + RestartInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); client.restartInstanceAsync(request).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { @@ -551,6 +729,7 @@ public void upgradeInstanceTest() throws Exception { .setDataprocServiceAccount("dataprocServiceAccount-1287630888") .setEnableRbac(true) .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .addAllDisabledReason(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -561,7 +740,9 @@ public void upgradeInstanceTest() throws Exception { mockDataFusion.addResponse(resultOperation); UpgradeInstanceRequest request = - UpgradeInstanceRequest.newBuilder().setName("name3373707").build(); + UpgradeInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); Instance actualResponse = client.upgradeInstanceAsync(request).get(); Assert.assertEquals(expectedResponse, actualResponse); @@ -584,7 +765,9 @@ public void upgradeInstanceExceptionTest() throws Exception { try { UpgradeInstanceRequest request = - UpgradeInstanceRequest.newBuilder().setName("name3373707").build(); + UpgradeInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); client.upgradeInstanceAsync(request).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { @@ -724,6 +907,41 @@ public void addDnsPeeringTest() throws Exception { AddDnsPeeringResponse expectedResponse = AddDnsPeeringResponse.newBuilder().build(); mockDataFusion.addResponse(expectedResponse); + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + AddDnsPeeringResponse actualResponse = client.addDnsPeering(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddDnsPeeringRequest actualRequest = ((AddDnsPeeringRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addDnsPeeringExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.addDnsPeering(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addDnsPeeringTest2() throws Exception { + AddDnsPeeringResponse expectedResponse = AddDnsPeeringResponse.newBuilder().build(); + mockDataFusion.addResponse(expectedResponse); + String parent = "parent-995424086"; AddDnsPeeringResponse actualResponse = client.addDnsPeering(parent); @@ -741,7 +959,7 @@ public void addDnsPeeringTest() throws Exception { } @Test - public void addDnsPeeringExceptionTest() throws Exception { + public void addDnsPeeringExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); @@ -759,6 +977,41 @@ public void removeDnsPeeringTest() throws Exception { RemoveDnsPeeringResponse expectedResponse = RemoveDnsPeeringResponse.newBuilder().build(); mockDataFusion.addResponse(expectedResponse); + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + RemoveDnsPeeringResponse actualResponse = client.removeDnsPeering(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveDnsPeeringRequest actualRequest = ((RemoveDnsPeeringRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeDnsPeeringExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.removeDnsPeering(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeDnsPeeringTest2() throws Exception { + RemoveDnsPeeringResponse expectedResponse = RemoveDnsPeeringResponse.newBuilder().build(); + mockDataFusion.addResponse(expectedResponse); + String parent = "parent-995424086"; RemoveDnsPeeringResponse actualResponse = client.removeDnsPeering(parent); @@ -776,7 +1029,7 @@ public void removeDnsPeeringTest() throws Exception { } @Test - public void removeDnsPeeringExceptionTest() throws Exception { + public void removeDnsPeeringExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockDataFusion.addException(exception); diff --git a/proto-google-cloud-data-fusion-v1/pom.xml b/proto-google-cloud-data-fusion-v1/pom.xml index 9e6b450d..a7a940aa 100644 --- a/proto-google-cloud-data-fusion-v1/pom.xml +++ b/proto-google-cloud-data-fusion-v1/pom.xml @@ -21,6 +21,14 @@ com.google.api.grpc proto-google-common-protos + + com.google.api + api-common + + + com.google.guava + guava + diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequest.java index 324295f8..6613fdf4 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequest.java @@ -141,11 +141,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -165,11 +167,13 @@ public java.lang.String getParent() { * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -192,10 +196,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The instanceId. */ @@ -215,10 +219,10 @@ public java.lang.String getInstanceId() { * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for instanceId. */ @@ -650,11 +654,13 @@ public Builder mergeFrom( * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -673,11 +679,13 @@ public java.lang.String getParent() { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -696,11 +704,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -718,11 +728,13 @@ public Builder setParent(java.lang.String value) { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -736,11 +748,13 @@ public Builder clearParent() { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -761,10 +775,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The instanceId. */ @@ -783,10 +797,10 @@ public java.lang.String getInstanceId() { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for instanceId. */ @@ -805,10 +819,10 @@ public com.google.protobuf.ByteString getInstanceIdBytes() { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The instanceId to set. * @return This builder for chaining. @@ -826,10 +840,10 @@ public Builder setInstanceId(java.lang.String value) { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -843,10 +857,10 @@ public Builder clearInstanceId() { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for instanceId to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequestOrBuilder.java index 79e1d827..7c347e3e 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -40,11 +42,13 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -54,10 +58,10 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The instanceId. */ @@ -66,10 +70,10 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for instanceId. */ diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfig.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfig.java index 14421de0..c0e814e4 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfig.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfig.java @@ -123,7 +123,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The keyReference. */ @@ -148,7 +148,7 @@ public java.lang.String getKeyReference() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for keyReference. */ @@ -492,7 +492,7 @@ public Builder mergeFrom( * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The keyReference. */ @@ -516,7 +516,7 @@ public java.lang.String getKeyReference() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for keyReference. */ @@ -540,7 +540,7 @@ public com.google.protobuf.ByteString getKeyReferenceBytes() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @param value The keyReference to set. * @return This builder for chaining. @@ -563,7 +563,7 @@ public Builder setKeyReference(java.lang.String value) { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ @@ -582,7 +582,7 @@ public Builder clearKeyReference() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @param value The bytes for keyReference to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfigOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfigOrBuilder.java index c0f113b8..f5ef8603 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfigOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfigOrBuilder.java @@ -32,7 +32,7 @@ public interface CryptoKeyConfigOrBuilder * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The keyReference. */ @@ -46,7 +46,7 @@ public interface CryptoKeyConfigOrBuilder * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. *
* - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for keyReference. */ diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Datafusion.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Datafusion.java index 3f69c093..20b2d94f 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Datafusion.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Datafusion.java @@ -116,130 +116,150 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "grunning/operations.proto\032 google/protob" + "uf/field_mask.proto\032\037google/protobuf/tim" + "estamp.proto\"7\n\rNetworkConfig\022\017\n\007network" - + "\030\001 \001(\t\022\025\n\rip_allocation\030\002 \001(\t\"V\n\007Version" - + "\022\026\n\016version_number\030\001 \001(\t\022\027\n\017default_vers" - + "ion\030\002 \001(\010\022\032\n\022available_features\030\003 \003(\t\"\307\002" - + "\n\013Accelerator\022Q\n\020accelerator_type\030\001 \001(\0162" - + "7.google.cloud.datafusion.v1.Accelerator" - + ".AcceleratorType\022<\n\005state\030\002 \001(\0162-.google" - + ".cloud.datafusion.v1.Accelerator.State\"_" - + "\n\017AcceleratorType\022 \n\034ACCELERATOR_TYPE_UN" - + "SPECIFIED\020\000\022\007\n\003CDC\020\001\022\016\n\nHEALTHCARE\020\002\022\021\n\r" - + "CCAI_INSIGHTS\020\003\"F\n\005State\022\025\n\021STATE_UNSPEC" - + "IFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\013\n\007UN" - + "KNOWN\020\003\"(\n\017CryptoKeyConfig\022\025\n\rkey_refere" - + "nce\030\001 \001(\t\"\204\014\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A" - + "\003\022\023\n\013description\030\002 \001(\t\022<\n\004type\030\003 \001(\0162).g" - + "oogle.cloud.datafusion.v1.Instance.TypeB" - + "\003\340A\002\022\"\n\032enable_stackdriver_logging\030\004 \001(\010" - + "\022%\n\035enable_stackdriver_monitoring\030\005 \001(\010\022" - + "\030\n\020private_instance\030\006 \001(\010\022A\n\016network_con" - + "fig\030\007 \001(\0132).google.cloud.datafusion.v1.N" - + "etworkConfig\022@\n\006labels\030\010 \003(\01320.google.cl" - + "oud.datafusion.v1.Instance.LabelsEntry\022B" - + "\n\007options\030\t \003(\01321.google.cloud.datafusio" - + "n.v1.Instance.OptionsEntry\0224\n\013create_tim" - + "e\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\0224\n\013update_time\030\013 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\022>\n\005state\030\014 \001(\0162*.google.c" - + "loud.datafusion.v1.Instance.StateB\003\340A\003\022\032" - + "\n\rstate_message\030\r \001(\tB\003\340A\003\022\035\n\020service_en" - + "dpoint\030\016 \001(\tB\003\340A\003\022\014\n\004zone\030\017 \001(\t\022\017\n\007versi" - + "on\030\020 \001(\t\022\036\n\017service_account\030\021 \001(\tB\005\030\001\340A\003" - + "\022\024\n\014display_name\030\022 \001(\t\022>\n\021available_vers" - + "ion\030\023 \003(\0132#.google.cloud.datafusion.v1.V" - + "ersion\022\031\n\014api_endpoint\030\024 \001(\tB\003\340A\003\022\027\n\ngcs" - + "_bucket\030\025 \001(\tB\003\340A\003\022=\n\014accelerators\030\026 \003(\013" - + "2\'.google.cloud.datafusion.v1.Accelerato" - + "r\022\037\n\022p4_service_account\030\027 \001(\tB\003\340A\003\022\036\n\021te" - + "nant_project_id\030\030 \001(\tB\003\340A\003\022 \n\030dataproc_s" - + "ervice_account\030\031 \001(\t\022\023\n\013enable_rbac\030\033 \001(" - + "\010\022F\n\021crypto_key_config\030\034 \001(\0132+.google.cl" - + "oud.datafusion.v1.CryptoKeyConfig\032-\n\013Lab" - + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + "\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\"F\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t" - + "\n\005BASIC\020\001\022\016\n\nENTERPRISE\020\002\022\r\n\tDEVELOPER\020\003" - + "\"\246\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CRE" - + "ATING\020\001\022\n\n\006ACTIVE\020\002\022\n\n\006FAILED\020\003\022\014\n\010DELET" - + "ING\020\004\022\r\n\tUPGRADING\020\005\022\016\n\nRESTARTING\020\006\022\014\n\010" - + "UPDATING\020\007\022\021\n\rAUTO_UPDATING\020\010\022\022\n\016AUTO_UP" - + "GRADING\020\t:e\352Ab\n\"datafusion.googleapis.co" - + "m/Instance\022\n\005state\030\014" + + " \001(\0162*.google.cloud.datafusion.v1.Instan" + + "ce.StateB\003\340A\003\022\032\n\rstate_message\030\r \001(\tB\003\340A" + + "\003\022\035\n\020service_endpoint\030\016 \001(\tB\003\340A\003\022\014\n\004zone" + + "\030\017 \001(\t\022\017\n\007version\030\020 \001(\t\022\036\n\017service_accou" + + "nt\030\021 \001(\tB\005\030\001\340A\003\022\024\n\014display_name\030\022 \001(\t\022>\n" + + "\021available_version\030\023 \003(\0132#.google.cloud." + + "datafusion.v1.Version\022\031\n\014api_endpoint\030\024 " + + "\001(\tB\003\340A\003\022\027\n\ngcs_bucket\030\025 \001(\tB\003\340A\003\022=\n\014acc" + + "elerators\030\026 \003(\0132\'.google.cloud.datafusio" + + "n.v1.Accelerator\022\037\n\022p4_service_account\030\027" + + " \001(\tB\003\340A\003\022\036\n\021tenant_project_id\030\030 \001(\tB\003\340A" + + "\003\022 \n\030dataproc_service_account\030\031 \001(\t\022\023\n\013e" + + "nable_rbac\030\033 \001(\010\022F\n\021crypto_key_config\030\034 " + + "\001(\0132+.google.cloud.datafusion.v1.CryptoK" + + "eyConfig\022Q\n\017disabled_reason\030\035 \003(\01623.goog" + + "le.cloud.datafusion.v1.Instance.Disabled" + + "ReasonB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\032.\n\014OptionsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"F\n\004Type\022\024\n\020TY" + + "PE_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\016\n\nENTERPRIS" + + "E\020\002\022\r\n\tDEVELOPER\020\003\"\264\001\n\005State\022\025\n\021STATE_UN" + + "SPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\n\n" + + "\006FAILED\020\003\022\014\n\010DELETING\020\004\022\r\n\tUPGRADING\020\005\022\016" + + "\n\nRESTARTING\020\006\022\014\n\010UPDATING\020\007\022\021\n\rAUTO_UPD" + + "ATING\020\010\022\022\n\016AUTO_UPGRADING\020\t\022\014\n\010DISABLED\020" + + "\n\"D\n\016DisabledReason\022\037\n\033DISABLED_REASON_U" + + "NSPECIFIED\020\000\022\021\n\rKMS_KEY_ISSUE\020\001:e\352Ab\n\"da" + + "tafusion.googleapis.com/Instance\022 - * The instance resource name in the format + * Required. The instance resource name in the format * projects/{project}/locations/{location}/instances/{instance} *
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -141,11 +143,13 @@ public java.lang.String getName() { * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -485,11 +489,13 @@ public Builder mergeFrom( * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -508,11 +514,13 @@ public java.lang.String getName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -531,11 +539,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -553,11 +563,13 @@ public Builder setName(java.lang.String value) { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -571,11 +583,13 @@ public Builder clearName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DeleteInstanceRequestOrBuilder.java index a69a1fc4..85f5a514 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DeleteInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DeleteInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface DeleteInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -40,11 +42,13 @@ public interface DeleteInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequest.java index 0f831ba0..9b58008d 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequest.java @@ -117,11 +117,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -141,11 +143,13 @@ public java.lang.String getName() { * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -485,11 +489,13 @@ public Builder mergeFrom( * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -508,11 +514,13 @@ public java.lang.String getName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -531,11 +539,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -553,11 +563,13 @@ public Builder setName(java.lang.String value) { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -571,11 +583,13 @@ public Builder clearName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequestOrBuilder.java index 8b0909ce..07465904 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface GetInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -40,11 +42,13 @@ public interface GetInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Instance.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Instance.java index 2b9d949f..8edb42a0 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Instance.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Instance.java @@ -55,6 +55,7 @@ private Instance() { p4ServiceAccount_ = ""; tenantProjectId_ = ""; dataprocServiceAccount_ = ""; + disabledReason_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -323,6 +324,31 @@ private Instance( cryptoKeyConfig_ = subBuilder.buildPartial(); } + break; + } + case 232: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + disabledReason_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + disabledReason_.add(rawValue); + break; + } + case 234: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + disabledReason_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + disabledReason_.add(rawValue); + } + input.popLimit(oldLimit); break; } default: @@ -345,6 +371,9 @@ private Instance( if (((mutable_bitField0_ & 0x00000008) != 0)) { accelerators_ = java.util.Collections.unmodifiableList(accelerators_); } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + disabledReason_ = java.util.Collections.unmodifiableList(disabledReason_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -685,6 +714,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * AUTO_UPGRADING = 9; */ AUTO_UPGRADING(9), + /** + * + * + *
+     * Instance is disabled
+     * 
+ * + * DISABLED = 10; + */ + DISABLED(10), UNRECOGNIZED(-1), ; @@ -789,6 +828,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * AUTO_UPGRADING = 9; */ public static final int AUTO_UPGRADING_VALUE = 9; + /** + * + * + *
+     * Instance is disabled
+     * 
+ * + * DISABLED = 10; + */ + public static final int DISABLED_VALUE = 10; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -834,6 +883,8 @@ public static State forNumber(int value) { return AUTO_UPDATING; case 9: return AUTO_UPGRADING; + case 10: + return DISABLED; default: return null; } @@ -887,6 +938,141 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1.Instance.State) } + /** + * + * + *
+   * The reason for disabling the instance if the state is DISABLED.
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1.Instance.DisabledReason} + */ + public enum DisabledReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * This is an unknown reason for disabling.
+     * 
+ * + * DISABLED_REASON_UNSPECIFIED = 0; + */ + DISABLED_REASON_UNSPECIFIED(0), + /** + * + * + *
+     * The KMS key used by the instance is either revoked or denied access to
+     * 
+ * + * KMS_KEY_ISSUE = 1; + */ + KMS_KEY_ISSUE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * This is an unknown reason for disabling.
+     * 
+ * + * DISABLED_REASON_UNSPECIFIED = 0; + */ + public static final int DISABLED_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The KMS key used by the instance is either revoked or denied access to
+     * 
+ * + * KMS_KEY_ISSUE = 1; + */ + public static final int KMS_KEY_ISSUE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DisabledReason valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DisabledReason forNumber(int value) { + switch (value) { + case 0: + return DISABLED_REASON_UNSPECIFIED; + case 1: + return KMS_KEY_ISSUE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DisabledReason findValueByNumber(int number) { + return DisabledReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Instance.getDescriptor().getEnumTypes().get(2); + } + + private static final DisabledReason[] VALUES = values(); + + public static DisabledReason valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DisabledReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1.Instance.DisabledReason) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -897,7 +1083,9 @@ private State(int value) { * projects/{project}/locations/{location}/instances/{instance}. *
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -921,7 +1109,9 @@ public java.lang.String getName() { * projects/{project}/locations/{location}/instances/{instance}. *
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -1686,8 +1876,7 @@ public com.google.protobuf.ByteString getVersionBytes() { * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -1713,8 +1902,7 @@ public java.lang.String getServiceAccount() { * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -1915,8 +2103,7 @@ public com.google.protobuf.ByteString getApiEndpointBytes() { * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1939,8 +2126,7 @@ public java.lang.String getGcsBucket() { * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2251,6 +2437,116 @@ public com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder getCryptoKeyConfi return getCryptoKeyConfig(); } + public static final int DISABLED_REASON_FIELD_NUMBER = 29; + private java.util.List disabledReason_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datafusion.v1.Instance.DisabledReason> + disabledReason_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datafusion.v1.Instance.DisabledReason>() { + public com.google.cloud.datafusion.v1.Instance.DisabledReason convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Instance.DisabledReason result = + com.google.cloud.datafusion.v1.Instance.DisabledReason.valueOf(from); + return result == null + ? com.google.cloud.datafusion.v1.Instance.DisabledReason.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the disabledReason. + */ + @java.lang.Override + public java.util.List + getDisabledReasonList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datafusion.v1.Instance.DisabledReason>( + disabledReason_, disabledReason_converter_); + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of disabledReason. + */ + @java.lang.Override + public int getDisabledReasonCount() { + return disabledReason_.size(); + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The disabledReason at the given index. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance.DisabledReason getDisabledReason(int index) { + return disabledReason_converter_.convert(disabledReason_.get(index)); + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for disabledReason. + */ + @java.lang.Override + public java.util.List getDisabledReasonValueList() { + return disabledReason_; + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + */ + @java.lang.Override + public int getDisabledReasonValue(int index) { + return disabledReason_.get(index); + } + + private int disabledReasonMemoizedSerializedSize; + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2265,6 +2561,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -2344,6 +2641,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cryptoKeyConfig_ != null) { output.writeMessage(28, getCryptoKeyConfig()); } + if (getDisabledReasonList().size() > 0) { + output.writeUInt32NoTag(234); + output.writeUInt32NoTag(disabledReasonMemoizedSerializedSize); + } + for (int i = 0; i < disabledReason_.size(); i++) { + output.writeEnumNoTag(disabledReason_.get(i)); + } unknownFields.writeTo(output); } @@ -2450,6 +2754,19 @@ public int getSerializedSize() { if (cryptoKeyConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getCryptoKeyConfig()); } + { + int dataSize = 0; + for (int i = 0; i < disabledReason_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(disabledReason_.get(i)); + } + size += dataSize; + if (!getDisabledReasonList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + disabledReasonMemoizedSerializedSize = dataSize; + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2504,6 +2821,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCryptoKeyConfig()) { if (!getCryptoKeyConfig().equals(other.getCryptoKeyConfig())) return false; } + if (!disabledReason_.equals(other.disabledReason_)) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2585,6 +2903,10 @@ public int hashCode() { hash = (37 * hash) + CRYPTO_KEY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getCryptoKeyConfig().hashCode(); } + if (getDisabledReasonCount() > 0) { + hash = (37 * hash) + DISABLED_REASON_FIELD_NUMBER; + hash = (53 * hash) + disabledReason_.hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2833,6 +3155,8 @@ public Builder clear() { cryptoKeyConfig_ = null; cryptoKeyConfigBuilder_ = null; } + disabledReason_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -2922,6 +3246,11 @@ public com.google.cloud.datafusion.v1.Instance buildPartial() { } else { result.cryptoKeyConfig_ = cryptoKeyConfigBuilder_.build(); } + if (((bitField0_ & 0x00000010) != 0)) { + disabledReason_ = java.util.Collections.unmodifiableList(disabledReason_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.disabledReason_ = disabledReason_; onBuilt(); return result; } @@ -3109,6 +3438,16 @@ public Builder mergeFrom(com.google.cloud.datafusion.v1.Instance other) { if (other.hasCryptoKeyConfig()) { mergeCryptoKeyConfig(other.getCryptoKeyConfig()); } + if (!other.disabledReason_.isEmpty()) { + if (disabledReason_.isEmpty()) { + disabledReason_ = other.disabledReason_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureDisabledReasonIsMutable(); + disabledReason_.addAll(other.disabledReason_); + } + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3149,7 +3488,9 @@ public Builder mergeFrom( * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -3172,7 +3513,9 @@ public java.lang.String getName() { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -3195,7 +3538,9 @@ public com.google.protobuf.ByteString getNameBytes() { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -3217,7 +3562,9 @@ public Builder setName(java.lang.String value) { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -3235,7 +3582,9 @@ public Builder clearName() { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. @@ -5092,8 +5441,7 @@ public Builder setVersionBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5118,8 +5466,7 @@ public java.lang.String getServiceAccount() { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5144,8 +5491,7 @@ public com.google.protobuf.ByteString getServiceAccountBytes() { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5169,8 +5515,7 @@ public Builder setServiceAccount(java.lang.String value) { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5190,8 +5535,7 @@ public Builder clearServiceAccount() { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5802,8 +6146,7 @@ public Builder setApiEndpointBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5825,8 +6168,7 @@ public java.lang.String getGcsBucket() { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5848,8 +6190,7 @@ public com.google.protobuf.ByteString getGcsBucketBytes() { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5870,8 +6211,7 @@ public Builder setGcsBucket(java.lang.String value) { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5888,8 +6228,7 @@ public Builder clearGcsBucket() { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6839,6 +7178,254 @@ public com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder getCryptoKeyConfi return cryptoKeyConfigBuilder_; } + private java.util.List disabledReason_ = java.util.Collections.emptyList(); + + private void ensureDisabledReasonIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + disabledReason_ = new java.util.ArrayList(disabledReason_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the disabledReason. + */ + public java.util.List + getDisabledReasonList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datafusion.v1.Instance.DisabledReason>( + disabledReason_, disabledReason_converter_); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of disabledReason. + */ + public int getDisabledReasonCount() { + return disabledReason_.size(); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The disabledReason at the given index. + */ + public com.google.cloud.datafusion.v1.Instance.DisabledReason getDisabledReason(int index) { + return disabledReason_converter_.convert(disabledReason_.get(index)); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The disabledReason to set. + * @return This builder for chaining. + */ + public Builder setDisabledReason( + int index, com.google.cloud.datafusion.v1.Instance.DisabledReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisabledReasonIsMutable(); + disabledReason_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The disabledReason to add. + * @return This builder for chaining. + */ + public Builder addDisabledReason(com.google.cloud.datafusion.v1.Instance.DisabledReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisabledReasonIsMutable(); + disabledReason_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The disabledReason to add. + * @return This builder for chaining. + */ + public Builder addAllDisabledReason( + java.lang.Iterable + values) { + ensureDisabledReasonIsMutable(); + for (com.google.cloud.datafusion.v1.Instance.DisabledReason value : values) { + disabledReason_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisabledReason() { + disabledReason_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for disabledReason. + */ + public java.util.List getDisabledReasonValueList() { + return java.util.Collections.unmodifiableList(disabledReason_); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + */ + public int getDisabledReasonValue(int index) { + return disabledReason_.get(index); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + * @return This builder for chaining. + */ + public Builder setDisabledReasonValue(int index, int value) { + ensureDisabledReasonIsMutable(); + disabledReason_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for disabledReason to add. + * @return This builder for chaining. + */ + public Builder addDisabledReasonValue(int value) { + ensureDisabledReasonIsMutable(); + disabledReason_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for disabledReason to add. + * @return This builder for chaining. + */ + public Builder addAllDisabledReasonValue(java.lang.Iterable values) { + ensureDisabledReasonIsMutable(); + for (int value : values) { + disabledReason_.add(value); + } + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceName.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceName.java new file mode 100644 index 00000000..e6d899f2 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 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.cloud.datafusion.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.location = instanceName.location; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceOrBuilder.java index 506c164e..a0d5b741 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceOrBuilder.java @@ -31,7 +31,9 @@ public interface InstanceOrBuilder * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -44,7 +46,9 @@ public interface InstanceOrBuilder * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -519,8 +523,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -535,8 +538,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -659,8 +661,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -672,8 +673,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -865,4 +865,77 @@ public interface InstanceOrBuilder * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; */ com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder getCryptoKeyConfigOrBuilder(); + + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the disabledReason. + */ + java.util.List getDisabledReasonList(); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of disabledReason. + */ + int getDisabledReasonCount(); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The disabledReason at the given index. + */ + com.google.cloud.datafusion.v1.Instance.DisabledReason getDisabledReason(int index); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for disabledReason. + */ + java.util.List getDisabledReasonValueList(); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1.Instance.DisabledReason disabled_reason = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + */ + int getDisabledReasonValue(int index); } diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequest.java index f89fd039..896c17bf 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequest.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequest.java @@ -135,11 +135,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -159,11 +161,13 @@ public java.lang.String getParent() { * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -639,11 +643,13 @@ public Builder mergeFrom( * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -662,11 +668,13 @@ public java.lang.String getParent() { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -685,11 +693,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -707,11 +717,13 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -725,11 +737,13 @@ public Builder clearParent() { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequestOrBuilder.java index d312385c..483d5d91 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface ListAvailableVersionsRequestOrBuilder * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -40,11 +42,13 @@ public interface ListAvailableVersionsRequestOrBuilder * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequest.java index 778a2745..c7b2d6b6 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequest.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequest.java @@ -146,13 +146,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -172,13 +174,15 @@ public java.lang.String getParent() { * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -748,13 +752,15 @@ public Builder mergeFrom( * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -773,13 +779,15 @@ public java.lang.String getParent() { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -798,13 +806,15 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -822,13 +832,15 @@ public Builder setParent(java.lang.String value) { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -842,13 +854,15 @@ public Builder clearParent() { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequestOrBuilder.java index ef280121..5d7642ce 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequestOrBuilder.java @@ -27,13 +27,15 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -42,13 +44,15 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/LocationName.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/LocationName.java new file mode 100644 index 00000000..0590894b --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2021 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.cloud.datafusion.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadata.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadata.java index 535df08c..e93d3438 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadata.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadata.java @@ -446,9 +446,8 @@ public com.google.protobuf.ByteString getStatusDetailBytes() { *
    * Identifies whether the user has requested cancellation
    * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
    * 
* * bool requested_cancellation = 6; @@ -1789,9 +1788,8 @@ public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { *
      * Identifies whether the user has requested cancellation
      * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6; @@ -1808,9 +1806,8 @@ public boolean getRequestedCancellation() { *
      * Identifies whether the user has requested cancellation
      * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6; @@ -1830,9 +1827,8 @@ public Builder setRequestedCancellation(boolean value) { *
      * Identifies whether the user has requested cancellation
      * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6; diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadataOrBuilder.java index 1a418876..61d3e740 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadataOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadataOrBuilder.java @@ -174,9 +174,8 @@ public interface OperationMetadataOrBuilder *
    * Identifies whether the user has requested cancellation
    * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
    * 
* * bool requested_cancellation = 6; diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequest.java index 7b206d47..7d16195a 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequest.java @@ -117,11 +117,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -141,11 +143,13 @@ public java.lang.String getName() { * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -486,11 +490,13 @@ public Builder mergeFrom( * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -509,11 +515,13 @@ public java.lang.String getName() { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -532,11 +540,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -554,11 +564,13 @@ public Builder setName(java.lang.String value) { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -572,11 +584,13 @@ public Builder clearName() { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequestOrBuilder.java index c1d95c82..a4a99a94 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface RestartInstanceRequestOrBuilder * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -40,11 +42,13 @@ public interface RestartInstanceRequestOrBuilder * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequest.java index 48796de2..0c608a40 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequest.java @@ -18,7 +18,17 @@ package com.google.cloud.datafusion.v1; -/** Protobuf type {@code google.cloud.datafusion.v1.UpdateInstanceRequest} */ +/** + * + * + *
+ * Request message for updating a Data Fusion instance.
+ * Data Fusion allows updating the labels, options, and stack driver settings.
+ * This is also used for CDF version upgrade.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.UpdateInstanceRequest} + */ public final class UpdateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.UpdateInstanceRequest) @@ -131,12 +141,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the instance field is set. */ @@ -148,12 +160,14 @@ public boolean hasInstance() { * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The instance. */ @@ -167,12 +181,14 @@ public com.google.cloud.datafusion.v1.Instance getInstance() { * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ @java.lang.Override public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder() { @@ -418,7 +434,17 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } - /** Protobuf type {@code google.cloud.datafusion.v1.UpdateInstanceRequest} */ + /** + * + * + *
+   * Request message for updating a Data Fusion instance.
+   * Data Fusion allows updating the labels, options, and stack driver settings.
+   * This is also used for CDF version upgrade.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.UpdateInstanceRequest} + */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.UpdateInstanceRequest) @@ -600,12 +626,14 @@ public Builder mergeFrom( * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the instance field is set. */ @@ -616,12 +644,14 @@ public boolean hasInstance() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The instance. */ @@ -638,12 +668,14 @@ public com.google.cloud.datafusion.v1.Instance getInstance() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setInstance(com.google.cloud.datafusion.v1.Instance value) { if (instanceBuilder_ == null) { @@ -662,12 +694,14 @@ public Builder setInstance(com.google.cloud.datafusion.v1.Instance value) { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setInstance(com.google.cloud.datafusion.v1.Instance.Builder builderForValue) { if (instanceBuilder_ == null) { @@ -683,12 +717,14 @@ public Builder setInstance(com.google.cloud.datafusion.v1.Instance.Builder build * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeInstance(com.google.cloud.datafusion.v1.Instance value) { if (instanceBuilder_ == null) { @@ -711,12 +747,14 @@ public Builder mergeInstance(com.google.cloud.datafusion.v1.Instance value) { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearInstance() { if (instanceBuilder_ == null) { @@ -733,12 +771,14 @@ public Builder clearInstance() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.datafusion.v1.Instance.Builder getInstanceBuilder() { @@ -749,12 +789,14 @@ public com.google.cloud.datafusion.v1.Instance.Builder getInstanceBuilder() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder() { if (instanceBuilder_ != null) { @@ -769,12 +811,14 @@ public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datafusion.v1.Instance, diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequestOrBuilder.java index 7b7c31d6..9b74e9f8 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequestOrBuilder.java @@ -27,12 +27,14 @@ public interface UpdateInstanceRequestOrBuilder * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the instance field is set. */ @@ -41,12 +43,14 @@ public interface UpdateInstanceRequestOrBuilder * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The instance. */ @@ -55,12 +59,14 @@ public interface UpdateInstanceRequestOrBuilder * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1.Instance instance = 1; + * + * .google.cloud.datafusion.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder(); diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Version.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Version.java index 038e9b47..9aa29574 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Version.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Version.java @@ -41,6 +41,7 @@ private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Version() { versionNumber_ = ""; availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + type_ = 0; } @java.lang.Override @@ -95,6 +96,13 @@ private Version( availableFeatures_.add(s); break; } + case 32: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -132,6 +140,163 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.datafusion.v1.Version.Builder.class); } + /** + * + * + *
+   * Each type represents the release availability of a CDF version
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1.Version.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Version does not have availability yet
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Version is under development and not considered stable
+     * 
+ * + * TYPE_PREVIEW = 1; + */ + TYPE_PREVIEW(1), + /** + * + * + *
+     * Version is available for public use
+     * 
+ * + * TYPE_GENERAL_AVAILABILITY = 2; + */ + TYPE_GENERAL_AVAILABILITY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Version does not have availability yet
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Version is under development and not considered stable
+     * 
+ * + * TYPE_PREVIEW = 1; + */ + public static final int TYPE_PREVIEW_VALUE = 1; + /** + * + * + *
+     * Version is available for public use
+     * 
+ * + * TYPE_GENERAL_AVAILABILITY = 2; + */ + public static final int TYPE_GENERAL_AVAILABILITY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return TYPE_PREVIEW; + case 2: + return TYPE_GENERAL_AVAILABILITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Version.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1.Version.Type) + } + public static final int VERSION_NUMBER_FIELD_NUMBER = 1; private volatile java.lang.Object versionNumber_; /** @@ -260,6 +425,42 @@ public com.google.protobuf.ByteString getAvailableFeaturesBytes(int index) { return availableFeatures_.getByteString(index); } + public static final int TYPE_FIELD_NUMBER = 4; + private int type_; + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Version.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Version.Type result = + com.google.cloud.datafusion.v1.Version.Type.valueOf(type_); + return result == null ? com.google.cloud.datafusion.v1.Version.Type.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -283,6 +484,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < availableFeatures_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, availableFeatures_.getRaw(i)); } + if (type_ != com.google.cloud.datafusion.v1.Version.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, type_); + } unknownFields.writeTo(output); } @@ -306,6 +510,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAvailableFeaturesList().size(); } + if (type_ != com.google.cloud.datafusion.v1.Version.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -324,6 +531,7 @@ public boolean equals(final java.lang.Object obj) { if (!getVersionNumber().equals(other.getVersionNumber())) return false; if (getDefaultVersion() != other.getDefaultVersion()) return false; if (!getAvailableFeaturesList().equals(other.getAvailableFeaturesList())) return false; + if (type_ != other.type_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -343,6 +551,8 @@ public int hashCode() { hash = (37 * hash) + AVAILABLE_FEATURES_FIELD_NUMBER; hash = (53 * hash) + getAvailableFeaturesList().hashCode(); } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -495,6 +705,8 @@ public Builder clear() { availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + return this; } @@ -530,6 +742,7 @@ public com.google.cloud.datafusion.v1.Version buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.availableFeatures_ = availableFeatures_; + result.type_ = type_; onBuilt(); return result; } @@ -596,6 +809,9 @@ public Builder mergeFrom(com.google.cloud.datafusion.v1.Version other) { } onChanged(); } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -953,6 +1169,97 @@ public Builder addAvailableFeaturesBytes(com.google.protobuf.ByteString value) { return this; } + private int type_ = 0; + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Version.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Version.Type result = + com.google.cloud.datafusion.v1.Version.Type.valueOf(type_); + return result == null ? com.google.cloud.datafusion.v1.Version.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.datafusion.v1.Version.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/VersionOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/VersionOrBuilder.java index 7f26416b..a5cdeedb 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/VersionOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/VersionOrBuilder.java @@ -111,4 +111,29 @@ public interface VersionOrBuilder * @return The bytes of the availableFeatures at the given index. */ com.google.protobuf.ByteString getAvailableFeaturesBytes(int index); + + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1.Version.Type type = 4; + * + * @return The type. + */ + com.google.cloud.datafusion.v1.Version.Type getType(); } diff --git a/proto-google-cloud-data-fusion-v1/src/main/proto/google/cloud/datafusion/v1/datafusion.proto b/proto-google-cloud-data-fusion-v1/src/main/proto/google/cloud/datafusion/v1/datafusion.proto index aae22833..61510509 100644 --- a/proto-google-cloud-data-fusion-v1/src/main/proto/google/cloud/datafusion/v1/datafusion.proto +++ b/proto-google-cloud-data-fusion-v1/src/main/proto/google/cloud/datafusion/v1/datafusion.proto @@ -30,19 +30,21 @@ option java_multiple_files = true; option java_package = "com.google.cloud.datafusion.v1"; option php_namespace = "Google\\Cloud\\DataFusion\\V1"; option ruby_package = "Google::Cloud::DataFusion::V1"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; // Service for creating and managing Data Fusion instances. // Data Fusion enables ETL developers to build code-free, data integration // pipelines via a point-and-click UI. service DataFusion { option (google.api.default_host) = "datafusion.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Lists possible versions for Data Fusion instances in the specified project // and location. - rpc ListAvailableVersions(ListAvailableVersionsRequest) - returns (ListAvailableVersionsResponse) { + rpc ListAvailableVersions(ListAvailableVersionsRequest) returns (ListAvailableVersionsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/versions" }; @@ -64,8 +66,7 @@ service DataFusion { } // Creates a new Data Fusion instance in the specified project and location. - rpc CreateInstance(CreateInstanceRequest) - returns (google.longrunning.Operation) { + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/instances" body: "instance" @@ -78,8 +79,7 @@ service DataFusion { } // Deletes a single Date Fusion instance. - rpc DeleteInstance(DeleteInstanceRequest) - returns (google.longrunning.Operation) { + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/instances/*}" }; @@ -91,8 +91,7 @@ service DataFusion { } // Updates a single Data Fusion instance. - rpc UpdateInstance(UpdateInstanceRequest) - returns (google.longrunning.Operation) { + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" body: "instance" @@ -106,8 +105,7 @@ service DataFusion { // Restart a single Data Fusion instance. // At the end of an operation instance is fully restarted. - rpc RestartInstance(RestartInstanceRequest) - returns (google.longrunning.Operation) { + rpc RestartInstance(RestartInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:restart" body: "*" @@ -141,6 +139,18 @@ message NetworkConfig { // The Data Fusion version. This proto message stores information about certain // Data Fusion version, which is used for Data Fusion version upgrade. message Version { + // Each type represents the release availability of a CDF version + enum Type { + // Version does not have availability yet + TYPE_UNSPECIFIED = 0; + + // Version is under development and not considered stable + TYPE_PREVIEW = 1; + + // Version is available for public use + TYPE_GENERAL_AVAILABILITY = 2; + } + // The version number of the Data Fusion instance, such as '6.0.1.0'. string version_number = 1; @@ -149,6 +159,9 @@ message Version { // Represents a list of available feature names for a given version. repeated string available_features = 3; + + // Type represents the release availability of the version + Type type = 4; } // Identifies Data Fusion accelerators for an instance. @@ -201,7 +214,9 @@ message CryptoKeyConfig { // The name of the key which is used to encrypt/decrypt customer data. For key // in Cloud KMS, the key should be in the format of // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - string key_reference = 1; + string key_reference = 1 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; } // Represents a Data Fusion instance. @@ -267,11 +282,28 @@ message Instance { // Instance is being auto-upgraded AUTO_UPGRADING = 9; + + // Instance is disabled + DISABLED = 10; + } + + // The reason for disabling the instance if the state is DISABLED. + enum DisabledReason { + // This is an unknown reason for disabling. + DISABLED_REASON_UNSPECIFIED = 0; + + // The KMS key used by the instance is either revoked or denied access to + KMS_KEY_ISSUE = 1; } // Output only. The name of this instance is in the form of // projects/{project}/locations/{location}/instances/{instance}. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; // A description of this instance. string description = 2; @@ -304,12 +336,10 @@ message Instance { map options = 9; // Output only. The time the instance was created. - google.protobuf.Timestamp create_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the instance was last updated. - google.protobuf.Timestamp update_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of this Data Fusion instance. State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -328,10 +358,11 @@ message Instance { // Current version of the Data Fusion. Only specifiable in Update. string version = 16; - // Output only. Deprecated. Use tenant_project_id instead to extract the - // tenant project ID. - string service_account = 17 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID. + string service_account = 17 [ + deprecated = true, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Display name for an instance. string display_name = 18; @@ -343,8 +374,7 @@ message Instance { // Output only. Endpoint on which the REST APIs is accessible. string api_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Cloud Storage bucket generated by Data Fusion in the customer - // project. + // Output only. Cloud Storage bucket generated by Data Fusion in the customer project. string gcs_bucket = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of accelerators enabled for this CDF instance. @@ -369,15 +399,23 @@ message Instance { // The crypto key configuration. This field is used by the Customer-Managed // Encryption Keys (CMEK) feature. CryptoKeyConfig crypto_key_config = 28; + + // Output only. If the instance state is DISABLED, the reason for disabling the instance. + repeated DisabledReason disabled_reason = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for listing Data Fusion instances. message ListInstancesRequest { - // The project and location for which to retrieve instance information + // Required. The project and location for which to retrieve instance information // in the format projects/{project}/locations/{location}. If the location is // specified as '-' (wildcard), then all regions available to the project // are queried, and the results are aggregated. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. int32 page_size = 2; @@ -408,9 +446,14 @@ message ListInstancesResponse { // Request message for the list available versions request. message ListAvailableVersionsRequest { - // Required. The project and location for which to retrieve instance - // information in the format projects/{project}/locations/{location}. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. The project and location for which to retrieve instance information + // in the format projects/{project}/locations/{location}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. int32 page_size = 2; @@ -437,19 +480,29 @@ message ListAvailableVersionsResponse { // Request message for getting details about a Data Fusion instance. message GetInstanceRequest { - // The instance resource name in the format + // Required. The instance resource name in the format // projects/{project}/locations/{location}/instances/{instance}. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; } // Request message for creating a Data Fusion instance. message CreateInstanceRequest { - // The instance's project and location in the format + // Required. The instance's project and location in the format // projects/{project}/locations/{location}. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The name of the instance to create. - string instance_id = 2; + // Required. The name of the instance to create. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; // An instance resource. Instance instance = 3; @@ -457,16 +510,24 @@ message CreateInstanceRequest { // Request message for deleting a Data Fusion instance. message DeleteInstanceRequest { - // The instance resource name in the format + // Required. The instance resource name in the format // projects/{project}/locations/{location}/instances/{instance} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; } +// Request message for updating a Data Fusion instance. +// Data Fusion allows updating the labels, options, and stack driver settings. +// This is also used for CDF version upgrade. message UpdateInstanceRequest { - // The instance resource that replaces the resource on the server. Currently, + // Required. The instance resource that replaces the resource on the server. Currently, // Data Fusion only allows replacing labels, options, and stack driver // settings. All other fields will be ignored. - Instance instance = 1; + Instance instance = 1 [(google.api.field_behavior) = REQUIRED]; // Field mask is used to specify the fields that the update will overwrite // in an instance resource. The fields specified in the update_mask are @@ -479,9 +540,14 @@ message UpdateInstanceRequest { // Request message for restarting a Data Fusion instance. message RestartInstanceRequest { - // Name of the Data Fusion instance which need to be restarted in the form of + // Required. Name of the Data Fusion instance which need to be restarted in the form of // projects/{project}/locations/{location}/instances/{instance} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; } // Represents the metadata of a long-running operation. @@ -503,9 +569,8 @@ message OperationMetadata { // Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. bool requested_cancellation = 6; // API version used to start the operation. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequest.java index bd3ea25e..313d2da6 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequest.java @@ -133,10 +133,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource on which DNS peering will be created.
+   * Required. The resource on which DNS peering will be created.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -156,10 +158,12 @@ public java.lang.String getParent() { * * *
-   * The resource on which DNS peering will be created.
+   * Required. The resource on which DNS peering will be created.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -576,10 +580,12 @@ public Builder mergeFrom( * * *
-     * The resource on which DNS peering will be created.
+     * Required. The resource on which DNS peering will be created.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -598,10 +604,12 @@ public java.lang.String getParent() { * * *
-     * The resource on which DNS peering will be created.
+     * Required. The resource on which DNS peering will be created.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -620,10 +628,12 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The resource on which DNS peering will be created.
+     * Required. The resource on which DNS peering will be created.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -641,10 +651,12 @@ public Builder setParent(java.lang.String value) { * * *
-     * The resource on which DNS peering will be created.
+     * Required. The resource on which DNS peering will be created.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -658,10 +670,12 @@ public Builder clearParent() { * * *
-     * The resource on which DNS peering will be created.
+     * Required. The resource on which DNS peering will be created.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequestOrBuilder.java index 96426b71..209c0ac9 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequestOrBuilder.java @@ -27,10 +27,12 @@ public interface AddDnsPeeringRequestOrBuilder * * *
-   * The resource on which DNS peering will be created.
+   * Required. The resource on which DNS peering will be created.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -39,10 +41,12 @@ public interface AddDnsPeeringRequestOrBuilder * * *
-   * The resource on which DNS peering will be created.
+   * Required. The resource on which DNS peering will be created.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequest.java index 1a008584..574d7fd0 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequest.java @@ -141,11 +141,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -165,11 +167,13 @@ public java.lang.String getParent() { * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -192,10 +196,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The instanceId. */ @@ -215,10 +219,10 @@ public java.lang.String getInstanceId() { * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for instanceId. */ @@ -651,11 +655,13 @@ public Builder mergeFrom( * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -674,11 +680,13 @@ public java.lang.String getParent() { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -697,11 +705,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -719,11 +729,13 @@ public Builder setParent(java.lang.String value) { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -737,11 +749,13 @@ public Builder clearParent() { * * *
-     * The instance's project and location in the format
+     * Required. The instance's project and location in the format
      * projects/{project}/locations/{location}.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. @@ -762,10 +776,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The instanceId. */ @@ -784,10 +798,10 @@ public java.lang.String getInstanceId() { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for instanceId. */ @@ -806,10 +820,10 @@ public com.google.protobuf.ByteString getInstanceIdBytes() { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The instanceId to set. * @return This builder for chaining. @@ -827,10 +841,10 @@ public Builder setInstanceId(java.lang.String value) { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -844,10 +858,10 @@ public Builder clearInstanceId() { * * *
-     * The name of the instance to create.
+     * Required. The name of the instance to create.
      * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for instanceId to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequestOrBuilder.java index 39030772..8ca8b502 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -40,11 +42,13 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The instance's project and location in the format
+   * Required. The instance's project and location in the format
    * projects/{project}/locations/{location}.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -54,10 +58,10 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The instanceId. */ @@ -66,10 +70,10 @@ public interface CreateInstanceRequestOrBuilder * * *
-   * The name of the instance to create.
+   * Required. The name of the instance to create.
    * 
* - * string instance_id = 2; + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for instanceId. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfig.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfig.java index c84ad5b7..eb882fc6 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfig.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfig.java @@ -123,7 +123,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The keyReference. */ @@ -148,7 +148,7 @@ public java.lang.String getKeyReference() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for keyReference. */ @@ -494,7 +494,7 @@ public Builder mergeFrom( * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The keyReference. */ @@ -518,7 +518,7 @@ public java.lang.String getKeyReference() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for keyReference. */ @@ -542,7 +542,7 @@ public com.google.protobuf.ByteString getKeyReferenceBytes() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @param value The keyReference to set. * @return This builder for chaining. @@ -565,7 +565,7 @@ public Builder setKeyReference(java.lang.String value) { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ @@ -584,7 +584,7 @@ public Builder clearKeyReference() { * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @param value The bytes for keyReference to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfigOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfigOrBuilder.java index 6e283508..f60505c5 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfigOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfigOrBuilder.java @@ -32,7 +32,7 @@ public interface CryptoKeyConfigOrBuilder * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The keyReference. */ @@ -46,7 +46,7 @@ public interface CryptoKeyConfigOrBuilder * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. * * - * string key_reference = 1; + * string key_reference = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for keyReference. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequest.java index d9905cbf..6f89c2ee 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequest.java @@ -117,11 +117,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -141,11 +143,13 @@ public java.lang.String getName() { * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -486,11 +490,13 @@ public Builder mergeFrom( * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -509,11 +515,13 @@ public java.lang.String getName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -532,11 +540,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -554,11 +564,13 @@ public Builder setName(java.lang.String value) { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -572,11 +584,13 @@ public Builder clearName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequestOrBuilder.java index d856251f..5f9ee3e7 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface DeleteInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -40,11 +42,13 @@ public interface DeleteInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequest.java index 65fad59e..f1321e1f 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequest.java @@ -117,11 +117,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -141,11 +143,13 @@ public java.lang.String getName() { * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -486,11 +490,13 @@ public Builder mergeFrom( * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -509,11 +515,13 @@ public java.lang.String getName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -532,11 +540,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -554,11 +564,13 @@ public Builder setName(java.lang.String value) { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -572,11 +584,13 @@ public Builder clearName() { * * *
-     * The instance resource name in the format
+     * Required. The instance resource name in the format
      * projects/{project}/locations/{location}/instances/{instance}.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequestOrBuilder.java index 5ae56ccf..f0cfbb44 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface GetInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -40,11 +42,13 @@ public interface GetInstanceRequestOrBuilder * * *
-   * The instance resource name in the format
+   * Required. The instance resource name in the format
    * projects/{project}/locations/{location}/instances/{instance}.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Instance.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Instance.java index c54f1580..255f7c54 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Instance.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Instance.java @@ -55,6 +55,7 @@ private Instance() { p4ServiceAccount_ = ""; tenantProjectId_ = ""; dataprocServiceAccount_ = ""; + disabledReason_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -325,6 +326,31 @@ private Instance( cryptoKeyConfig_ = subBuilder.buildPartial(); } + break; + } + case 224: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + disabledReason_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + disabledReason_.add(rawValue); + break; + } + case 226: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + disabledReason_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + disabledReason_.add(rawValue); + } + input.popLimit(oldLimit); break; } default: @@ -347,6 +373,9 @@ private Instance( if (((mutable_bitField0_ & 0x00000008) != 0)) { accelerators_ = java.util.Collections.unmodifiableList(accelerators_); } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + disabledReason_ = java.util.Collections.unmodifiableList(disabledReason_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -686,6 +715,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * AUTO_UPGRADING = 9; */ AUTO_UPGRADING(9), + /** + * + * + *
+     * Instance is disabled
+     * 
+ * + * DISABLED = 10; + */ + DISABLED(10), UNRECOGNIZED(-1), ; @@ -789,6 +828,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * AUTO_UPGRADING = 9; */ public static final int AUTO_UPGRADING_VALUE = 9; + /** + * + * + *
+     * Instance is disabled
+     * 
+ * + * DISABLED = 10; + */ + public static final int DISABLED_VALUE = 10; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -834,6 +883,8 @@ public static State forNumber(int value) { return AUTO_UPDATING; case 9: return AUTO_UPGRADING; + case 10: + return DISABLED; default: return null; } @@ -887,6 +938,141 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1beta1.Instance.State) } + /** + * + * + *
+   * The reason for disabling the instance if the state is DISABLED.
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1beta1.Instance.DisabledReason} + */ + public enum DisabledReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * This is an unknown reason for disabling.
+     * 
+ * + * DISABLED_REASON_UNSPECIFIED = 0; + */ + DISABLED_REASON_UNSPECIFIED(0), + /** + * + * + *
+     * The KMS key used by the instance is either revoked or denied access to
+     * 
+ * + * KMS_KEY_ISSUE = 1; + */ + KMS_KEY_ISSUE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * This is an unknown reason for disabling.
+     * 
+ * + * DISABLED_REASON_UNSPECIFIED = 0; + */ + public static final int DISABLED_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The KMS key used by the instance is either revoked or denied access to
+     * 
+ * + * KMS_KEY_ISSUE = 1; + */ + public static final int KMS_KEY_ISSUE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DisabledReason valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DisabledReason forNumber(int value) { + switch (value) { + case 0: + return DISABLED_REASON_UNSPECIFIED; + case 1: + return KMS_KEY_ISSUE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DisabledReason findValueByNumber(int number) { + return DisabledReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.Instance.getDescriptor().getEnumTypes().get(2); + } + + private static final DisabledReason[] VALUES = values(); + + public static DisabledReason valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DisabledReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1beta1.Instance.DisabledReason) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -897,7 +1083,9 @@ private State(int value) { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -921,7 +1109,9 @@ public java.lang.String getName() { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -1688,8 +1878,7 @@ public com.google.protobuf.ByteString getVersionBytes() { * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -1715,8 +1904,7 @@ public java.lang.String getServiceAccount() { * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -1918,8 +2106,7 @@ public com.google.protobuf.ByteString getApiEndpointBytes() { * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1942,8 +2129,7 @@ public java.lang.String getGcsBucket() { * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2256,6 +2442,116 @@ public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig getCryptoKeyConfig() return getCryptoKeyConfig(); } + public static final int DISABLED_REASON_FIELD_NUMBER = 28; + private java.util.List disabledReason_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datafusion.v1beta1.Instance.DisabledReason> + disabledReason_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datafusion.v1beta1.Instance.DisabledReason>() { + public com.google.cloud.datafusion.v1beta1.Instance.DisabledReason convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Instance.DisabledReason result = + com.google.cloud.datafusion.v1beta1.Instance.DisabledReason.valueOf(from); + return result == null + ? com.google.cloud.datafusion.v1beta1.Instance.DisabledReason.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the disabledReason. + */ + @java.lang.Override + public java.util.List + getDisabledReasonList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datafusion.v1beta1.Instance.DisabledReason>( + disabledReason_, disabledReason_converter_); + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of disabledReason. + */ + @java.lang.Override + public int getDisabledReasonCount() { + return disabledReason_.size(); + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The disabledReason at the given index. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance.DisabledReason getDisabledReason(int index) { + return disabledReason_converter_.convert(disabledReason_.get(index)); + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for disabledReason. + */ + @java.lang.Override + public java.util.List getDisabledReasonValueList() { + return disabledReason_; + } + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + */ + @java.lang.Override + public int getDisabledReasonValue(int index) { + return disabledReason_.get(index); + } + + private int disabledReasonMemoizedSerializedSize; + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2270,6 +2566,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -2350,6 +2647,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cryptoKeyConfig_ != null) { output.writeMessage(27, getCryptoKeyConfig()); } + if (getDisabledReasonList().size() > 0) { + output.writeUInt32NoTag(226); + output.writeUInt32NoTag(disabledReasonMemoizedSerializedSize); + } + for (int i = 0; i < disabledReason_.size(); i++) { + output.writeEnumNoTag(disabledReason_.get(i)); + } unknownFields.writeTo(output); } @@ -2457,6 +2761,19 @@ public int getSerializedSize() { if (cryptoKeyConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getCryptoKeyConfig()); } + { + int dataSize = 0; + for (int i = 0; i < disabledReason_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(disabledReason_.get(i)); + } + size += dataSize; + if (!getDisabledReasonList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + disabledReasonMemoizedSerializedSize = dataSize; + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2512,6 +2829,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCryptoKeyConfig()) { if (!getCryptoKeyConfig().equals(other.getCryptoKeyConfig())) return false; } + if (!disabledReason_.equals(other.disabledReason_)) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2593,6 +2911,10 @@ public int hashCode() { hash = (37 * hash) + CRYPTO_KEY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getCryptoKeyConfig().hashCode(); } + if (getDisabledReasonCount() > 0) { + hash = (37 * hash) + DISABLED_REASON_FIELD_NUMBER; + hash = (53 * hash) + disabledReason_.hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2841,6 +3163,8 @@ public Builder clear() { cryptoKeyConfig_ = null; cryptoKeyConfigBuilder_ = null; } + disabledReason_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -2930,6 +3254,11 @@ public com.google.cloud.datafusion.v1beta1.Instance buildPartial() { } else { result.cryptoKeyConfig_ = cryptoKeyConfigBuilder_.build(); } + if (((bitField0_ & 0x00000010) != 0)) { + disabledReason_ = java.util.Collections.unmodifiableList(disabledReason_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.disabledReason_ = disabledReason_; onBuilt(); return result; } @@ -3117,6 +3446,16 @@ public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.Instance other) { if (other.hasCryptoKeyConfig()) { mergeCryptoKeyConfig(other.getCryptoKeyConfig()); } + if (!other.disabledReason_.isEmpty()) { + if (disabledReason_.isEmpty()) { + disabledReason_ = other.disabledReason_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureDisabledReasonIsMutable(); + disabledReason_.addAll(other.disabledReason_); + } + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3157,7 +3496,9 @@ public Builder mergeFrom( * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -3180,7 +3521,9 @@ public java.lang.String getName() { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -3203,7 +3546,9 @@ public com.google.protobuf.ByteString getNameBytes() { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -3225,7 +3570,9 @@ public Builder setName(java.lang.String value) { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -3243,7 +3590,9 @@ public Builder clearName() { * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. @@ -5104,8 +5453,7 @@ public Builder setVersionBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5130,8 +5478,7 @@ public java.lang.String getServiceAccount() { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5156,8 +5503,7 @@ public com.google.protobuf.ByteString getServiceAccountBytes() { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5181,8 +5527,7 @@ public Builder setServiceAccount(java.lang.String value) { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5202,8 +5547,7 @@ public Builder clearServiceAccount() { * * *
-     * Output only. Deprecated. Use tenant_project_id instead to extract the
-     * tenant project ID.
+     * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
      * 
* * @@ -5819,8 +6163,7 @@ public Builder setApiEndpointBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5842,8 +6185,7 @@ public java.lang.String getGcsBucket() { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5865,8 +6207,7 @@ public com.google.protobuf.ByteString getGcsBucketBytes() { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5887,8 +6228,7 @@ public Builder setGcsBucket(java.lang.String value) { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5905,8 +6245,7 @@ public Builder clearGcsBucket() { * * *
-     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-     * project.
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
      * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6862,6 +7201,256 @@ public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder getCryptoKeyC return cryptoKeyConfigBuilder_; } + private java.util.List disabledReason_ = java.util.Collections.emptyList(); + + private void ensureDisabledReasonIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + disabledReason_ = new java.util.ArrayList(disabledReason_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the disabledReason. + */ + public java.util.List + getDisabledReasonList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datafusion.v1beta1.Instance.DisabledReason>( + disabledReason_, disabledReason_converter_); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of disabledReason. + */ + public int getDisabledReasonCount() { + return disabledReason_.size(); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The disabledReason at the given index. + */ + public com.google.cloud.datafusion.v1beta1.Instance.DisabledReason getDisabledReason( + int index) { + return disabledReason_converter_.convert(disabledReason_.get(index)); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The disabledReason to set. + * @return This builder for chaining. + */ + public Builder setDisabledReason( + int index, com.google.cloud.datafusion.v1beta1.Instance.DisabledReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisabledReasonIsMutable(); + disabledReason_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The disabledReason to add. + * @return This builder for chaining. + */ + public Builder addDisabledReason( + com.google.cloud.datafusion.v1beta1.Instance.DisabledReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisabledReasonIsMutable(); + disabledReason_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The disabledReason to add. + * @return This builder for chaining. + */ + public Builder addAllDisabledReason( + java.lang.Iterable + values) { + ensureDisabledReasonIsMutable(); + for (com.google.cloud.datafusion.v1beta1.Instance.DisabledReason value : values) { + disabledReason_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisabledReason() { + disabledReason_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for disabledReason. + */ + public java.util.List getDisabledReasonValueList() { + return java.util.Collections.unmodifiableList(disabledReason_); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + */ + public int getDisabledReasonValue(int index) { + return disabledReason_.get(index); + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + * @return This builder for chaining. + */ + public Builder setDisabledReasonValue(int index, int value) { + ensureDisabledReasonIsMutable(); + disabledReason_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for disabledReason to add. + * @return This builder for chaining. + */ + public Builder addDisabledReasonValue(int value) { + ensureDisabledReasonIsMutable(); + disabledReason_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+     * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for disabledReason to add. + * @return This builder for chaining. + */ + public Builder addAllDisabledReasonValue(java.lang.Iterable values) { + ensureDisabledReasonIsMutable(); + for (int value : values) { + disabledReason_.add(value); + } + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceOrBuilder.java index c21ad659..7541a7a2 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceOrBuilder.java @@ -31,7 +31,9 @@ public interface InstanceOrBuilder * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -44,7 +46,9 @@ public interface InstanceOrBuilder * projects/{project}/locations/{location}/instances/{instance}. * * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -519,8 +523,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -535,8 +538,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Deprecated. Use tenant_project_id instead to extract the
-   * tenant project ID.
+   * Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
    * 
* * @@ -659,8 +661,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -672,8 +673,7 @@ public interface InstanceOrBuilder * * *
-   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
-   * project.
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
    * 
* * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -865,4 +865,78 @@ public interface InstanceOrBuilder * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; */ com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder getCryptoKeyConfigOrBuilder(); + + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the disabledReason. + */ + java.util.List + getDisabledReasonList(); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of disabledReason. + */ + int getDisabledReasonCount(); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The disabledReason at the given index. + */ + com.google.cloud.datafusion.v1beta1.Instance.DisabledReason getDisabledReason(int index); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for disabledReason. + */ + java.util.List getDisabledReasonValueList(); + /** + * + * + *
+   * Output only. If the instance state is DISABLED, the reason for disabling the instance.
+   * 
+ * + * + * repeated .google.cloud.datafusion.v1beta1.Instance.DisabledReason disabled_reason = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledReason at the given index. + */ + int getDisabledReasonValue(int index); } diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequest.java index 49c72f70..3c1ee9de 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequest.java @@ -135,11 +135,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -159,11 +161,13 @@ public java.lang.String getParent() { * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -643,11 +647,13 @@ public Builder mergeFrom( * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -666,11 +672,13 @@ public java.lang.String getParent() { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -689,11 +697,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -711,11 +721,13 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -729,11 +741,13 @@ public Builder clearParent() { * * *
-     * Required. The project and location for which to retrieve instance
-     * information in the format projects/{project}/locations/{location}.
+     * Required. The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequestOrBuilder.java index 75c325cb..abc6c2fe 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface ListAvailableVersionsRequestOrBuilder * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -40,11 +42,13 @@ public interface ListAvailableVersionsRequestOrBuilder * * *
-   * Required. The project and location for which to retrieve instance
-   * information in the format projects/{project}/locations/{location}.
+   * Required. The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequest.java index 08e3878a..ff2f6732 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequest.java @@ -146,13 +146,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -172,13 +174,15 @@ public java.lang.String getParent() { * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -749,13 +753,15 @@ public Builder mergeFrom( * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -774,13 +780,15 @@ public java.lang.String getParent() { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -799,13 +807,15 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -823,13 +833,15 @@ public Builder setParent(java.lang.String value) { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -843,13 +855,15 @@ public Builder clearParent() { * * *
-     * The project and location for which to retrieve instance information
+     * Required. The project and location for which to retrieve instance information
      * in the format projects/{project}/locations/{location}. If the location is
      * specified as '-' (wildcard), then all regions available to the project
      * are queried, and the results are aggregated.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequestOrBuilder.java index 92f11c7e..a3c96a15 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequestOrBuilder.java @@ -27,13 +27,15 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -42,13 +44,15 @@ public interface ListInstancesRequestOrBuilder * * *
-   * The project and location for which to retrieve instance information
+   * Required. The project and location for which to retrieve instance information
    * in the format projects/{project}/locations/{location}. If the location is
    * specified as '-' (wildcard), then all regions available to the project
    * are queried, and the results are aggregated.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/LocationName.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/LocationName.java new file mode 100644 index 00000000..1f829c27 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2021 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.cloud.datafusion.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadata.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadata.java index ea464bfa..c3386202 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadata.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadata.java @@ -417,9 +417,8 @@ public com.google.protobuf.ByteString getStatusDetailBytes() { *
    * Identifies whether the user has requested cancellation
    * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
    * 
* * bool requested_cancellation = 6; @@ -1605,9 +1604,8 @@ public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { *
      * Identifies whether the user has requested cancellation
      * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6; @@ -1624,9 +1622,8 @@ public boolean getRequestedCancellation() { *
      * Identifies whether the user has requested cancellation
      * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6; @@ -1646,9 +1643,8 @@ public Builder setRequestedCancellation(boolean value) { *
      * Identifies whether the user has requested cancellation
      * of the operation. Operations that have successfully been cancelled
-     * have [Operation.error][] value with a
-     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-     * `Code.CANCELLED`.
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6; diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadataOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadataOrBuilder.java index a1774713..6b72d55b 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadataOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadataOrBuilder.java @@ -174,9 +174,8 @@ public interface OperationMetadataOrBuilder *
    * Identifies whether the user has requested cancellation
    * of the operation. Operations that have successfully been cancelled
-   * have [Operation.error][] value with a
-   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
-   * `Code.CANCELLED`.
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
    * 
* * bool requested_cancellation = 6; diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequest.java index 699ea94e..c2383810 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequest.java @@ -125,10 +125,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource on which DNS peering will be removed.
+   * Required. The resource on which DNS peering will be removed.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -148,10 +150,12 @@ public java.lang.String getParent() { * * *
-   * The resource on which DNS peering will be removed.
+   * Required. The resource on which DNS peering will be removed.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -557,10 +561,12 @@ public Builder mergeFrom( * * *
-     * The resource on which DNS peering will be removed.
+     * Required. The resource on which DNS peering will be removed.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -579,10 +585,12 @@ public java.lang.String getParent() { * * *
-     * The resource on which DNS peering will be removed.
+     * Required. The resource on which DNS peering will be removed.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -601,10 +609,12 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * The resource on which DNS peering will be removed.
+     * Required. The resource on which DNS peering will be removed.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -622,10 +632,12 @@ public Builder setParent(java.lang.String value) { * * *
-     * The resource on which DNS peering will be removed.
+     * Required. The resource on which DNS peering will be removed.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -639,10 +651,12 @@ public Builder clearParent() { * * *
-     * The resource on which DNS peering will be removed.
+     * Required. The resource on which DNS peering will be removed.
      * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequestOrBuilder.java index c5d5eaef..be967aa9 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequestOrBuilder.java @@ -27,10 +27,12 @@ public interface RemoveDnsPeeringRequestOrBuilder * * *
-   * The resource on which DNS peering will be removed.
+   * Required. The resource on which DNS peering will be removed.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -39,10 +41,12 @@ public interface RemoveDnsPeeringRequestOrBuilder * * *
-   * The resource on which DNS peering will be removed.
+   * Required. The resource on which DNS peering will be removed.
    * 
* - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequest.java index d6615675..8cf72a6f 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequest.java @@ -117,10 +117,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource on which IAM policy to be removed is attached to.
+   * Required. The resource on which IAM policy to be removed is attached to.
    * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The resource. */ @@ -140,10 +140,10 @@ public java.lang.String getResource() { * * *
-   * The resource on which IAM policy to be removed is attached to.
+   * Required. The resource on which IAM policy to be removed is attached to.
    * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for resource. */ @@ -484,10 +484,10 @@ public Builder mergeFrom( * * *
-     * The resource on which IAM policy to be removed is attached to.
+     * Required. The resource on which IAM policy to be removed is attached to.
      * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The resource. */ @@ -506,10 +506,10 @@ public java.lang.String getResource() { * * *
-     * The resource on which IAM policy to be removed is attached to.
+     * Required. The resource on which IAM policy to be removed is attached to.
      * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for resource. */ @@ -528,10 +528,10 @@ public com.google.protobuf.ByteString getResourceBytes() { * * *
-     * The resource on which IAM policy to be removed is attached to.
+     * Required. The resource on which IAM policy to be removed is attached to.
      * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The resource to set. * @return This builder for chaining. @@ -549,10 +549,10 @@ public Builder setResource(java.lang.String value) { * * *
-     * The resource on which IAM policy to be removed is attached to.
+     * Required. The resource on which IAM policy to be removed is attached to.
      * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ @@ -566,10 +566,10 @@ public Builder clearResource() { * * *
-     * The resource on which IAM policy to be removed is attached to.
+     * Required. The resource on which IAM policy to be removed is attached to.
      * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for resource to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequestOrBuilder.java index ee9ab77b..04768228 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequestOrBuilder.java @@ -27,10 +27,10 @@ public interface RemoveIamPolicyRequestOrBuilder * * *
-   * The resource on which IAM policy to be removed is attached to.
+   * Required. The resource on which IAM policy to be removed is attached to.
    * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The resource. */ @@ -39,10 +39,10 @@ public interface RemoveIamPolicyRequestOrBuilder * * *
-   * The resource on which IAM policy to be removed is attached to.
+   * Required. The resource on which IAM policy to be removed is attached to.
    * 
* - * string resource = 1; + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for resource. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequest.java index d2cd4494..85940879 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequest.java @@ -117,11 +117,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -141,11 +143,13 @@ public java.lang.String getName() { * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -486,11 +490,13 @@ public Builder mergeFrom( * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -509,11 +515,13 @@ public java.lang.String getName() { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -532,11 +540,13 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -554,11 +564,13 @@ public Builder setName(java.lang.String value) { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -572,11 +584,13 @@ public Builder clearName() { * * *
-     * Name of the Data Fusion instance which need to be restarted in the form of
+     * Required. Name of the Data Fusion instance which need to be restarted in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequestOrBuilder.java index 56ad24ca..c88fa295 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequestOrBuilder.java @@ -27,11 +27,13 @@ public interface RestartInstanceRequestOrBuilder * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -40,11 +42,13 @@ public interface RestartInstanceRequestOrBuilder * * *
-   * Name of the Data Fusion instance which need to be restarted in the form of
+   * Required. Name of the Data Fusion instance which need to be restarted in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequest.java index 65865f8d..34464bb5 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequest.java @@ -141,12 +141,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the instance field is set. */ @@ -158,12 +160,14 @@ public boolean hasInstance() { * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The instance. */ @@ -177,12 +181,14 @@ public com.google.cloud.datafusion.v1beta1.Instance getInstance() { * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ @java.lang.Override public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { @@ -621,12 +627,14 @@ public Builder mergeFrom( * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the instance field is set. */ @@ -637,12 +645,14 @@ public boolean hasInstance() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The instance. */ @@ -659,12 +669,14 @@ public com.google.cloud.datafusion.v1beta1.Instance getInstance() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setInstance(com.google.cloud.datafusion.v1beta1.Instance value) { if (instanceBuilder_ == null) { @@ -683,12 +695,14 @@ public Builder setInstance(com.google.cloud.datafusion.v1beta1.Instance value) { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setInstance( com.google.cloud.datafusion.v1beta1.Instance.Builder builderForValue) { @@ -705,12 +719,14 @@ public Builder setInstance( * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeInstance(com.google.cloud.datafusion.v1beta1.Instance value) { if (instanceBuilder_ == null) { @@ -733,12 +749,14 @@ public Builder mergeInstance(com.google.cloud.datafusion.v1beta1.Instance value) * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearInstance() { if (instanceBuilder_ == null) { @@ -755,12 +773,14 @@ public Builder clearInstance() { * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.datafusion.v1beta1.Instance.Builder getInstanceBuilder() { @@ -771,12 +791,14 @@ public com.google.cloud.datafusion.v1beta1.Instance.Builder getInstanceBuilder() * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { if (instanceBuilder_ != null) { @@ -791,12 +813,14 @@ public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilde * * *
-     * The instance resource that replaces the resource on the server. Currently,
+     * Required. The instance resource that replaces the resource on the server. Currently,
      * Data Fusion only allows replacing labels, options, and stack driver
      * settings. All other fields will be ignored.
      * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.datafusion.v1beta1.Instance, diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequestOrBuilder.java index 421a918b..b921dcfc 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequestOrBuilder.java @@ -27,12 +27,14 @@ public interface UpdateInstanceRequestOrBuilder * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return Whether the instance field is set. */ @@ -41,12 +43,14 @@ public interface UpdateInstanceRequestOrBuilder * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * * * @return The instance. */ @@ -55,12 +59,14 @@ public interface UpdateInstanceRequestOrBuilder * * *
-   * The instance resource that replaces the resource on the server. Currently,
+   * Required. The instance resource that replaces the resource on the server. Currently,
    * Data Fusion only allows replacing labels, options, and stack driver
    * settings. All other fields will be ignored.
    * 
* - * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * .google.cloud.datafusion.v1beta1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder(); diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequest.java index d9ecf551..6daf39d7 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequest.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequest.java @@ -118,13 +118,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * Required. Name of the Data Fusion instance which need to be upgraded in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * Instance will be upgraded with the latest stable version of the Data
    * Fusion.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -144,13 +146,15 @@ public java.lang.String getName() { * * *
-   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * Required. Name of the Data Fusion instance which need to be upgraded in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * Instance will be upgraded with the latest stable version of the Data
    * Fusion.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -492,13 +496,15 @@ public Builder mergeFrom( * * *
-     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * Required. Name of the Data Fusion instance which need to be upgraded in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * Instance will be upgraded with the latest stable version of the Data
      * Fusion.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -517,13 +523,15 @@ public java.lang.String getName() { * * *
-     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * Required. Name of the Data Fusion instance which need to be upgraded in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * Instance will be upgraded with the latest stable version of the Data
      * Fusion.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -542,13 +550,15 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * Required. Name of the Data Fusion instance which need to be upgraded in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * Instance will be upgraded with the latest stable version of the Data
      * Fusion.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -566,13 +576,15 @@ public Builder setName(java.lang.String value) { * * *
-     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * Required. Name of the Data Fusion instance which need to be upgraded in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * Instance will be upgraded with the latest stable version of the Data
      * Fusion.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -586,13 +598,15 @@ public Builder clearName() { * * *
-     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * Required. Name of the Data Fusion instance which need to be upgraded in the form of
      * projects/{project}/locations/{location}/instances/{instance}
      * Instance will be upgraded with the latest stable version of the Data
      * Fusion.
      * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequestOrBuilder.java index 250d212a..9d74678b 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequestOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequestOrBuilder.java @@ -27,13 +27,15 @@ public interface UpgradeInstanceRequestOrBuilder * * *
-   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * Required. Name of the Data Fusion instance which need to be upgraded in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * Instance will be upgraded with the latest stable version of the Data
    * Fusion.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -42,13 +44,15 @@ public interface UpgradeInstanceRequestOrBuilder * * *
-   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * Required. Name of the Data Fusion instance which need to be upgraded in the form of
    * projects/{project}/locations/{location}/instances/{instance}
    * Instance will be upgraded with the latest stable version of the Data
    * Fusion.
    * 
* - * string name = 1; + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/V1Beta1.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/V1Beta1.java index 50005959..c42b172a 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/V1Beta1.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/V1Beta1.java @@ -170,195 +170,218 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eld_mask.proto\032\037google/protobuf/timestam" + "p.proto\032\027google/rpc/status.proto\"7\n\rNetw" + "orkConfig\022\017\n\007network\030\001 \001(\t\022\025\n\rip_allocat" - + "ion\030\002 \001(\t\"V\n\007Version\022\026\n\016version_number\030\001" - + " \001(\t\022\027\n\017default_version\030\002 \001(\010\022\032\n\022availab" - + "le_features\030\003 \003(\t\"\263\001\n\013Accelerator\022V\n\020acc" - + "elerator_type\030\001 \001(\0162<.google.cloud.dataf" - + "usion.v1beta1.Accelerator.AcceleratorTyp" - + "e\"L\n\017AcceleratorType\022 \n\034ACCELERATOR_TYPE" - + "_UNSPECIFIED\020\000\022\007\n\003CDC\020\001\022\016\n\nHEALTHCARE\020\002\"" - + "(\n\017CryptoKeyConfig\022\025\n\rkey_reference\030\001 \001(" - + "\t\"\255\014\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\023\n\013des" - + "cription\030\002 \001(\t\022A\n\004type\030\003 \001(\0162..google.cl" - + "oud.datafusion.v1beta1.Instance.TypeB\003\340A" - + "\002\022\"\n\032enable_stackdriver_logging\030\004 \001(\010\022%\n" - + "\035enable_stackdriver_monitoring\030\005 \001(\010\022\030\n\020" - + "private_instance\030\006 \001(\010\022F\n\016network_config" - + "\030\007 \001(\0132..google.cloud.datafusion.v1beta1" - + ".NetworkConfig\022E\n\006labels\030\010 \003(\01325.google." - + "cloud.datafusion.v1beta1.Instance.Labels" - + "Entry\022G\n\007options\030\t \003(\01326.google.cloud.da" - + "tafusion.v1beta1.Instance.OptionsEntry\0224" - + "\n\013create_time\030\n \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\0224\n\013update_time\030\013 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022C\n\005state\030\014 \001(" - + "\0162/.google.cloud.datafusion.v1beta1.Inst" - + "ance.StateB\003\340A\003\022\032\n\rstate_message\030\r \001(\tB\003" - + "\340A\003\022\035\n\020service_endpoint\030\016 \001(\tB\003\340A\003\022\014\n\004zo" - + "ne\030\017 \001(\t\022\017\n\007version\030\020 \001(\t\022\036\n\017service_acc" - + "ount\030\021 \001(\tB\005\030\001\340A\003\022\024\n\014display_name\030\022 \001(\t\022" - + "C\n\021available_version\030\023 \003(\0132(.google.clou" - + "d.datafusion.v1beta1.Version\022\031\n\014api_endp" - + "oint\030\024 \001(\tB\003\340A\003\022\027\n\ngcs_bucket\030\025 \001(\tB\003\340A\003" - + "\022B\n\014accelerators\030\026 \003(\0132,.google.cloud.da" - + "tafusion.v1beta1.Accelerator\022\037\n\022p4_servi" - + "ce_account\030\027 \001(\tB\003\340A\003\022\036\n\021tenant_project_" - + "id\030\030 \001(\tB\003\340A\003\022 \n\030dataproc_service_accoun" - + "t\030\031 \001(\t\022\023\n\013enable_rbac\030\032 \001(\010\022K\n\021crypto_k" - + "ey_config\030\033 \001(\01320.google.cloud.datafusio" - + "n.v1beta1.CryptoKeyConfig\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032.\n\014Opti" - + "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + "\"F\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005BASIC\020" - + "\001\022\016\n\nENTERPRISE\020\002\022\r\n\tDEVELOPER\020\003\"\247\001\n\005Sta" - + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022" - + "\013\n\007RUNNING\020\002\022\n\n\006FAILED\020\003\022\014\n\010DELETING\020\004\022\r" - + "\n\tUPGRADING\020\005\022\016\n\nRESTARTING\020\006\022\014\n\010UPDATIN" - + "G\020\007\022\021\n\rAUTO_UPDATING\020\010\022\022\n\016AUTO_UPGRADING" - + "\020\t:e\352Ab\n\"datafusion.googleapis.com/Insta" - + "nce\022\n\niam_policy\030\002 \001(\0132*.google." - + "cloud.datafusion.v1beta1.IAMPolicy:}\352Az\n" - + "#datafusion.googleapis.com/Namespace\022Spr" - + "ojects/{project}/locations/{location}/in" - + "stances/{instance}/namespaces/{namespace" - + "}\"q\n\026ListNamespacesResponse\022>\n\nnamespace" - + "s\030\001 \003(\0132*.google.cloud.datafusion.v1beta" - + "1.Namespace\022\027\n\017next_page_token\030\002 \001(\t\"\210\001\n" - + "\nDnsPeering\022\021\n\004zone\030\001 \001(\tB\003\340A\002\022\023\n\006domain" - + "\030\002 \001(\tB\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\022\033\n" - + "\016target_project\030\004 \001(\tB\003\340A\001\022\033\n\016target_net" - + "work\030\005 \001(\tB\003\340A\001\"h\n\024AddDnsPeeringRequest\022" - + "\016\n\006parent\030\001 \001(\t\022@\n\013dns_peering\030\002 \001(\0132+.g" - + "oogle.cloud.datafusion.v1beta1.DnsPeerin" - + "g\"\027\n\025AddDnsPeeringResponse\"<\n\027RemoveDnsP" - + "eeringRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\004zone\030\002 " - + "\001(\tB\003\340A\002\"\032\n\030RemoveDnsPeeringResponse\"{\n\026" - + "ListDnsPeeringsRequest\022:\n\006parent\030\001 \001(\tB*" - + "\340A\002\372A$\n\"datafusion.googleapis.com/Instan" - + "ce\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\"u\n\027ListDnsPeeringsResponse\022A\n\014dns_peer" - + "ings\030\001 \003(\0132+.google.cloud.datafusion.v1b" - + "eta1.DnsPeering\022\027\n\017next_page_token\030\002 \001(\t" - + "*b\n\rNamespaceView\022\036\n\032NAMESPACE_VIEW_UNSP" - + "ECIFIED\020\000\022\030\n\024NAMESPACE_VIEW_BASIC\020\001\022\027\n\023N" - + "AMESPACE_VIEW_FULL\020\0022\311\026\n\nDataFusion\022\332\001\n\025" - + "ListAvailableVersions\022=.google.cloud.dat" - + "afusion.v1beta1.ListAvailableVersionsReq" - + "uest\032>.google.cloud.datafusion.v1beta1.L" - + "istAvailableVersionsResponse\"B\202\323\344\223\0023\0221/v" - + "1beta1/{parent=projects/*/locations/*}/v" - + "ersions\332A\006parent\022\272\001\n\rListInstances\0225.goo" - + "gle.cloud.datafusion.v1beta1.ListInstanc" - + "esRequest\0326.google.cloud.datafusion.v1be" - + "ta1.ListInstancesResponse\":\202\323\344\223\0024\0222/v1be" - + "ta1/{parent=projects/*/locations/*}/inst" - + "ances\022\251\001\n\013GetInstance\0223.google.cloud.dat" - + "afusion.v1beta1.GetInstanceRequest\032).goo" - + "gle.cloud.datafusion.v1beta1.Instance\":\202" - + "\323\344\223\0024\0222/v1beta1/{name=projects/*/locatio" - + "ns/*/instances/*}\022\354\001\n\016CreateInstance\0226.g" - + "oogle.cloud.datafusion.v1beta1.CreateIns" - + "tanceRequest\032\035.google.longrunning.Operat" - + "ion\"\202\001\202\323\344\223\002>\"2/v1beta1/{parent=projects/" - + "*/locations/*}/instances:\010instance\332A\033par" - + "ent,instance,instance_id\312A\035\n\010Instance\022\021O" - + "perationMetadata\022\327\001\n\016DeleteInstance\0226.go" - + "ogle.cloud.datafusion.v1beta1.DeleteInst" + + "ion\030\002 \001(\t\"\342\001\n\007Version\022\026\n\016version_number\030" + + "\001 \001(\t\022\027\n\017default_version\030\002 \001(\010\022\032\n\022availa" + + "ble_features\030\003 \003(\t\022;\n\004type\030\004 \001(\0162-.googl" + + "e.cloud.datafusion.v1beta1.Version.Type\"" + + "M\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\020\n\014TYPE_PR" + + "EVIEW\020\001\022\035\n\031TYPE_GENERAL_AVAILABILITY\020\002\"\263" + + "\001\n\013Accelerator\022V\n\020accelerator_type\030\001 \001(\016" + + "2<.google.cloud.datafusion.v1beta1.Accel" + + "erator.AcceleratorType\"L\n\017AcceleratorTyp" + + "e\022 \n\034ACCELERATOR_TYPE_UNSPECIFIED\020\000\022\007\n\003C" + + "DC\020\001\022\016\n\nHEALTHCARE\020\002\"P\n\017CryptoKeyConfig\022" + + "=\n\rkey_reference\030\001 \001(\tB&\372A#\n!cloudkms.go" + + "ogleapis.com/CryptoKey\"\200\016\n\010Instance\0228\n\004n" + + "ame\030\001 \001(\tB*\340A\003\372A$\n\"datafusion.googleapis" + + ".com/Instance\022\023\n\013description\030\002 \001(\t\022A\n\004ty" + + "pe\030\003 \001(\0162..google.cloud.datafusion.v1bet" + + "a1.Instance.TypeB\003\340A\002\022\"\n\032enable_stackdri" + + "ver_logging\030\004 \001(\010\022%\n\035enable_stackdriver_" + + "monitoring\030\005 \001(\010\022\030\n\020private_instance\030\006 \001" + + "(\010\022F\n\016network_config\030\007 \001(\0132..google.clou" + + "d.datafusion.v1beta1.NetworkConfig\022E\n\006la" + + "bels\030\010 \003(\01325.google.cloud.datafusion.v1b" + + "eta1.Instance.LabelsEntry\022G\n\007options\030\t \003" + + "(\01326.google.cloud.datafusion.v1beta1.Ins" + + "tance.OptionsEntry\0224\n\013create_time\030\n \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upda" + + "te_time\030\013 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\022C\n\005state\030\014 \001(\0162/.google.cloud.dat" + + "afusion.v1beta1.Instance.StateB\003\340A\003\022\032\n\rs" + + "tate_message\030\r \001(\tB\003\340A\003\022\035\n\020service_endpo" + + "int\030\016 \001(\tB\003\340A\003\022\014\n\004zone\030\017 \001(\t\022\017\n\007version\030" + + "\020 \001(\t\022\036\n\017service_account\030\021 \001(\tB\005\030\001\340A\003\022\024\n" + + "\014display_name\030\022 \001(\t\022C\n\021available_version" + + "\030\023 \003(\0132(.google.cloud.datafusion.v1beta1" + + ".Version\022\031\n\014api_endpoint\030\024 \001(\tB\003\340A\003\022\027\n\ng" + + "cs_bucket\030\025 \001(\tB\003\340A\003\022B\n\014accelerators\030\026 \003" + + "(\0132,.google.cloud.datafusion.v1beta1.Acc" + + "elerator\022\037\n\022p4_service_account\030\027 \001(\tB\003\340A" + + "\003\022\036\n\021tenant_project_id\030\030 \001(\tB\003\340A\003\022 \n\030dat" + + "aproc_service_account\030\031 \001(\t\022\023\n\013enable_rb" + + "ac\030\032 \001(\010\022K\n\021crypto_key_config\030\033 \001(\01320.go" + + "ogle.cloud.datafusion.v1beta1.CryptoKeyC" + + "onfig\022V\n\017disabled_reason\030\034 \003(\01628.google." + + "cloud.datafusion.v1beta1.Instance.Disabl" + + "edReasonB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\032.\n\014OptionsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"F\n\004Type\022\024\n\020" + + "TYPE_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\016\n\nENTERPR" + + "ISE\020\002\022\r\n\tDEVELOPER\020\003\"\265\001\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\013\n\007RUNNING\020\002" + + "\022\n\n\006FAILED\020\003\022\014\n\010DELETING\020\004\022\r\n\tUPGRADING\020" + + "\005\022\016\n\nRESTARTING\020\006\022\014\n\010UPDATING\020\007\022\021\n\rAUTO_" + + "UPDATING\020\010\022\022\n\016AUTO_UPGRADING\020\t\022\014\n\010DISABL" + + "ED\020\n\"D\n\016DisabledReason\022\037\n\033DISABLED_REASO" + + "N_UNSPECIFIED\020\000\022\021\n\rKMS_KEY_ISSUE\020\001:e\352Ab\n" + + "\"datafusion.googleapis.com/Instance\022\n\niam_policy\030\002 \001(\0132*.google.cloud.data" + + "fusion.v1beta1.IAMPolicy:}\352Az\n#datafusio" + + "n.googleapis.com/Namespace\022Sprojects/{pr" + + "oject}/locations/{location}/instances/{i" + + "nstance}/namespaces/{namespace}\"q\n\026ListN" + + "amespacesResponse\022>\n\nnamespaces\030\001 \003(\0132*." + + "google.cloud.datafusion.v1beta1.Namespac" + + "e\022\027\n\017next_page_token\030\002 \001(\t\"\210\001\n\nDnsPeerin" + + "g\022\021\n\004zone\030\001 \001(\tB\003\340A\002\022\023\n\006domain\030\002 \001(\tB\003\340A" + + "\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\022\033\n\016target_pr" + + "oject\030\004 \001(\tB\003\340A\001\022\033\n\016target_network\030\005 \001(\t" + + "B\003\340A\001\"\224\001\n\024AddDnsPeeringRequest\022:\n\006parent" + + "\030\001 \001(\tB*\340A\002\372A$\n\"datafusion.googleapis.co" + + "m/Instance\022@\n\013dns_peering\030\002 \001(\0132+.google" + + ".cloud.datafusion.v1beta1.DnsPeering\"\027\n\025" + + "AddDnsPeeringResponse\"h\n\027RemoveDnsPeerin" + + "gRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\n\"datafu" + + "sion.googleapis.com/Instance\022\021\n\004zone\030\002 \001" + + "(\tB\003\340A\002\"\032\n\030RemoveDnsPeeringResponse\"{\n\026L" + + "istDnsPeeringsRequest\022:\n\006parent\030\001 \001(\tB*\340" + + "A\002\372A$\n\"datafusion.googleapis.com/Instanc" + + "e\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\"u\n\027ListDnsPeeringsResponse\022A\n\014dns_peeri" + + "ngs\030\001 \003(\0132+.google.cloud.datafusion.v1be" + + "ta1.DnsPeering\022\027\n\017next_page_token\030\002 \001(\t*" + + "b\n\rNamespaceView\022\036\n\032NAMESPACE_VIEW_UNSPE" + + "CIFIED\020\000\022\030\n\024NAMESPACE_VIEW_BASIC\020\001\022\027\n\023NA" + + "MESPACE_VIEW_FULL\020\0022\311\026\n\nDataFusion\022\332\001\n\025L" + + "istAvailableVersions\022=.google.cloud.data" + + "fusion.v1beta1.ListAvailableVersionsRequ" + + "est\032>.google.cloud.datafusion.v1beta1.Li" + + "stAvailableVersionsResponse\"B\202\323\344\223\0023\0221/v1" + + "beta1/{parent=projects/*/locations/*}/ve" + + "rsions\332A\006parent\022\272\001\n\rListInstances\0225.goog" + + "le.cloud.datafusion.v1beta1.ListInstance" + + "sRequest\0326.google.cloud.datafusion.v1bet" + + "a1.ListInstancesResponse\":\202\323\344\223\0024\0222/v1bet" + + "a1/{parent=projects/*/locations/*}/insta" + + "nces\022\251\001\n\013GetInstance\0223.google.cloud.data" + + "fusion.v1beta1.GetInstanceRequest\032).goog" + + "le.cloud.datafusion.v1beta1.Instance\":\202\323" + + "\344\223\0024\0222/v1beta1/{name=projects/*/location" + + "s/*/instances/*}\022\354\001\n\016CreateInstance\0226.go" + + "ogle.cloud.datafusion.v1beta1.CreateInst" + "anceRequest\032\035.google.longrunning.Operati" - + "on\"n\202\323\344\223\0024*2/v1beta1/{name=projects/*/lo" - + "cations/*/instances/*}\332A\004name\312A*\n\025google" - + ".protobuf.Empty\022\021OperationMetadata\022\356\001\n\016U" - + "pdateInstance\0226.google.cloud.datafusion." - + "v1beta1.UpdateInstanceRequest\032\035.google.l" - + "ongrunning.Operation\"\204\001\202\323\344\223\002G2;/v1beta1/" - + "{instance.name=projects/*/locations/*/in" - + "stances/*}:\010instance\332A\024instance,update_m" - + "ask\312A\035\n\010Instance\022\021OperationMetadata\022\320\001\n\017" - + "RestartInstance\0227.google.cloud.datafusio" - + "n.v1beta1.RestartInstanceRequest\032\035.googl" - + "e.longrunning.Operation\"e\202\323\344\223\002?\":/v1beta" - + "1/{name=projects/*/locations/*/instances" - + "/*}:restart:\001*\312A\035\n\010Instance\022\021OperationMe" - + "tadata\022\320\001\n\017UpgradeInstance\0227.google.clou" - + "d.datafusion.v1beta1.UpgradeInstanceRequ" - + "est\032\035.google.longrunning.Operation\"e\202\323\344\223" - + "\002?\":/v1beta1/{name=projects/*/locations/" - + "*/instances/*}:upgrade:\001*\312A\035\n\010Instance\022\021" - + "OperationMetadata\022\316\001\n\017RemoveIamPolicy\0227." - + "google.cloud.datafusion.v1beta1.RemoveIa" - + "mPolicyRequest\0328.google.cloud.datafusion" - + ".v1beta1.RemoveIamPolicyResponse\"H\202\323\344\223\002B" - + "\"=/v1beta1/{resource=projects/*/location" - + "s/*/**}:removeIamPolicy:\001*\022\323\001\n\016ListNames" - + "paces\0226.google.cloud.datafusion.v1beta1." - + "ListNamespacesRequest\0327.google.cloud.dat" - + "afusion.v1beta1.ListNamespacesResponse\"P" - + "\202\323\344\223\002A\022?/v1beta1/{parent=projects/*/loca" - + "tions/*/instances/*}/namespaces\332A\006parent" - + "\022\330\001\n\rAddDnsPeering\0225.google.cloud.datafu" - + "sion.v1beta1.AddDnsPeeringRequest\0326.goog" - + "le.cloud.datafusion.v1beta1.AddDnsPeerin" - + "gResponse\"X\202\323\344\223\002I\"D/v1beta1/{parent=proj" - + "ects/*/locations/*/instances/*}/dnsPeeri" - + "ngs:add:\001*\332A\006parent\022\344\001\n\020RemoveDnsPeering" - + "\0228.google.cloud.datafusion.v1beta1.Remov" - + "eDnsPeeringRequest\0329.google.cloud.datafu" - + "sion.v1beta1.RemoveDnsPeeringResponse\"[\202" - + "\323\344\223\002L\"G/v1beta1/{parent=projects/*/locat" - + "ions/*/instances/*}/dnsPeerings:remove:\001" - + "*\332A\006parent\022\334\001\n\017ListDnsPeerings\0227.google." - + "cloud.datafusion.v1beta1.ListDnsPeerings" - + "Request\0328.google.cloud.datafusion.v1beta" - + "1.ListDnsPeeringsResponse\"V\202\323\344\223\002G\022E/v1be" - + "ta1/{parent=projects/*/locations/*/insta" - + "nces/*}/dnsPeerings:list\332A\006parent\032M\312A\031da" - + "tafusion.googleapis.com\322A.https://www.go" - + "ogleapis.com/auth/cloud-platformB\333\001\n#com" - + ".google.cloud.datafusion.v1beta1P\001ZIgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "datafusion/v1beta1;datafusion\252\002\037Google.C" - + "loud.DataFusion.V1Beta1\312\002\037Google\\Cloud\\D" - + "ataFusion\\V1beta1\352\002\"Google::Cloud::DataF" - + "usion::V1beta1b\006proto3" + + "on\"\202\001\202\323\344\223\002>\"2/v1beta1/{parent=projects/*" + + "/locations/*}/instances:\010instance\332A\033pare" + + "nt,instance,instance_id\312A\035\n\010Instance\022\021Op" + + "erationMetadata\022\327\001\n\016DeleteInstance\0226.goo" + + "gle.cloud.datafusion.v1beta1.DeleteInsta" + + "nceRequest\032\035.google.longrunning.Operatio" + + "n\"n\202\323\344\223\0024*2/v1beta1/{name=projects/*/loc" + + "ations/*/instances/*}\332A\004name\312A*\n\025google." + + "protobuf.Empty\022\021OperationMetadata\022\356\001\n\016Up" + + "dateInstance\0226.google.cloud.datafusion.v" + + "1beta1.UpdateInstanceRequest\032\035.google.lo" + + "ngrunning.Operation\"\204\001\202\323\344\223\002G2;/v1beta1/{" + + "instance.name=projects/*/locations/*/ins" + + "tances/*}:\010instance\332A\024instance,update_ma" + + "sk\312A\035\n\010Instance\022\021OperationMetadata\022\320\001\n\017R" + + "estartInstance\0227.google.cloud.datafusion" + + ".v1beta1.RestartInstanceRequest\032\035.google" + + ".longrunning.Operation\"e\202\323\344\223\002?\":/v1beta1" + + "/{name=projects/*/locations/*/instances/" + + "*}:restart:\001*\312A\035\n\010Instance\022\021OperationMet" + + "adata\022\320\001\n\017UpgradeInstance\0227.google.cloud" + + ".datafusion.v1beta1.UpgradeInstanceReque" + + "st\032\035.google.longrunning.Operation\"e\202\323\344\223\002" + + "?\":/v1beta1/{name=projects/*/locations/*" + + "/instances/*}:upgrade:\001*\312A\035\n\010Instance\022\021O" + + "perationMetadata\022\316\001\n\017RemoveIamPolicy\0227.g" + + "oogle.cloud.datafusion.v1beta1.RemoveIam" + + "PolicyRequest\0328.google.cloud.datafusion." + + "v1beta1.RemoveIamPolicyResponse\"H\202\323\344\223\002B\"" + + "=/v1beta1/{resource=projects/*/locations" + + "/*/**}:removeIamPolicy:\001*\022\323\001\n\016ListNamesp" + + "aces\0226.google.cloud.datafusion.v1beta1.L" + + "istNamespacesRequest\0327.google.cloud.data" + + "fusion.v1beta1.ListNamespacesResponse\"P\202" + + "\323\344\223\002A\022?/v1beta1/{parent=projects/*/locat" + + "ions/*/instances/*}/namespaces\332A\006parent\022" + + "\330\001\n\rAddDnsPeering\0225.google.cloud.datafus" + + "ion.v1beta1.AddDnsPeeringRequest\0326.googl" + + "e.cloud.datafusion.v1beta1.AddDnsPeering" + + "Response\"X\202\323\344\223\002I\"D/v1beta1/{parent=proje" + + "cts/*/locations/*/instances/*}/dnsPeerin" + + "gs:add:\001*\332A\006parent\022\344\001\n\020RemoveDnsPeering\022" + + "8.google.cloud.datafusion.v1beta1.Remove" + + "DnsPeeringRequest\0329.google.cloud.datafus" + + "ion.v1beta1.RemoveDnsPeeringResponse\"[\202\323" + + "\344\223\002L\"G/v1beta1/{parent=projects/*/locati" + + "ons/*/instances/*}/dnsPeerings:remove:\001*" + + "\332A\006parent\022\334\001\n\017ListDnsPeerings\0227.google.c" + + "loud.datafusion.v1beta1.ListDnsPeeringsR" + + "equest\0328.google.cloud.datafusion.v1beta1" + + ".ListDnsPeeringsResponse\"V\202\323\344\223\002G\022E/v1bet" + + "a1/{parent=projects/*/locations/*/instan" + + "ces/*}/dnsPeerings:list\332A\006parent\032M\312A\031dat" + + "afusion.googleapis.com\322A.https://www.goo" + + "gleapis.com/auth/cloud-platformB\326\002\n#com." + + "google.cloud.datafusion.v1beta1P\001ZIgoogl" + + "e.golang.org/genproto/googleapis/cloud/d" + + "atafusion/v1beta1;datafusion\252\002\037Google.Cl" + + "oud.DataFusion.V1Beta1\312\002\037Google\\Cloud\\Da" + + "taFusion\\V1beta1\352\002\"Google::Cloud::DataFu" + + "sion::V1beta1\352Ax\n!cloudkms.googleapis.co" + + "m/CryptoKey\022Sprojects/{project}/location" + + "s/{location}/keyRings/{key_ring}/cryptoK" + + "eys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -388,7 +411,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datafusion_v1beta1_Version_descriptor, new java.lang.String[] { - "VersionNumber", "DefaultVersion", "AvailableFeatures", + "VersionNumber", "DefaultVersion", "AvailableFeatures", "Type", }); internal_static_google_cloud_datafusion_v1beta1_Accelerator_descriptor = getDescriptor().getMessageTypes().get(2); @@ -439,6 +462,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataprocServiceAccount", "EnableRbac", "CryptoKeyConfig", + "DisabledReason", }); internal_static_google_cloud_datafusion_v1beta1_Instance_LabelsEntry_descriptor = internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor.getNestedTypes().get(0); @@ -656,6 +680,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Version.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Version.java index 5c2ce9b1..e9ad5f5c 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Version.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Version.java @@ -40,6 +40,7 @@ private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Version() { versionNumber_ = ""; availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + type_ = 0; } @java.lang.Override @@ -94,6 +95,13 @@ private Version( availableFeatures_.add(s); break; } + case 32: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -131,6 +139,163 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.datafusion.v1beta1.Version.Builder.class); } + /** + * + * + *
+   * Each type represents the release availability of a CDF version
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1beta1.Version.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Version does not have availability yet
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Version is under development and not considered stable
+     * 
+ * + * TYPE_PREVIEW = 1; + */ + TYPE_PREVIEW(1), + /** + * + * + *
+     * Version is available for public use
+     * 
+ * + * TYPE_GENERAL_AVAILABILITY = 2; + */ + TYPE_GENERAL_AVAILABILITY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Version does not have availability yet
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Version is under development and not considered stable
+     * 
+ * + * TYPE_PREVIEW = 1; + */ + public static final int TYPE_PREVIEW_VALUE = 1; + /** + * + * + *
+     * Version is available for public use
+     * 
+ * + * TYPE_GENERAL_AVAILABILITY = 2; + */ + public static final int TYPE_GENERAL_AVAILABILITY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return TYPE_PREVIEW; + case 2: + return TYPE_GENERAL_AVAILABILITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.Version.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1beta1.Version.Type) + } + public static final int VERSION_NUMBER_FIELD_NUMBER = 1; private volatile java.lang.Object versionNumber_; /** @@ -259,6 +424,42 @@ public com.google.protobuf.ByteString getAvailableFeaturesBytes(int index) { return availableFeatures_.getByteString(index); } + public static final int TYPE_FIELD_NUMBER = 4; + private int type_; + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Version.Type result = + com.google.cloud.datafusion.v1beta1.Version.Type.valueOf(type_); + return result == null ? com.google.cloud.datafusion.v1beta1.Version.Type.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -282,6 +483,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < availableFeatures_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, availableFeatures_.getRaw(i)); } + if (type_ != com.google.cloud.datafusion.v1beta1.Version.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, type_); + } unknownFields.writeTo(output); } @@ -305,6 +509,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAvailableFeaturesList().size(); } + if (type_ != com.google.cloud.datafusion.v1beta1.Version.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -324,6 +531,7 @@ public boolean equals(final java.lang.Object obj) { if (!getVersionNumber().equals(other.getVersionNumber())) return false; if (getDefaultVersion() != other.getDefaultVersion()) return false; if (!getAvailableFeaturesList().equals(other.getAvailableFeaturesList())) return false; + if (type_ != other.type_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -343,6 +551,8 @@ public int hashCode() { hash = (37 * hash) + AVAILABLE_FEATURES_FIELD_NUMBER; hash = (53 * hash) + getAvailableFeaturesList().hashCode(); } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -494,6 +704,8 @@ public Builder clear() { availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + return this; } @@ -529,6 +741,7 @@ public com.google.cloud.datafusion.v1beta1.Version buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.availableFeatures_ = availableFeatures_; + result.type_ = type_; onBuilt(); return result; } @@ -595,6 +808,9 @@ public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.Version other) { } onChanged(); } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -952,6 +1168,99 @@ public Builder addAvailableFeaturesBytes(com.google.protobuf.ByteString value) { return this; } + private int type_ = 0; + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Version.Type result = + com.google.cloud.datafusion.v1beta1.Version.Type.valueOf(type_); + return result == null + ? com.google.cloud.datafusion.v1beta1.Version.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.datafusion.v1beta1.Version.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type represents the release availability of the version
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/VersionOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/VersionOrBuilder.java index 20616424..72d3a052 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/VersionOrBuilder.java +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/VersionOrBuilder.java @@ -111,4 +111,29 @@ public interface VersionOrBuilder * @return The bytes of the availableFeatures at the given index. */ com.google.protobuf.ByteString getAvailableFeaturesBytes(int index); + + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Type represents the release availability of the version
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Version.Type type = 4; + * + * @return The type. + */ + com.google.cloud.datafusion.v1beta1.Version.Type getType(); } diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/proto/google/cloud/datafusion/v1beta1/v1beta1.proto b/proto-google-cloud-data-fusion-v1beta1/src/main/proto/google/cloud/datafusion/v1beta1/v1beta1.proto index d3f9565f..ac3f309c 100644 --- a/proto-google-cloud-data-fusion-v1beta1/src/main/proto/google/cloud/datafusion/v1beta1/v1beta1.proto +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/proto/google/cloud/datafusion/v1beta1/v1beta1.proto @@ -32,19 +32,21 @@ option java_multiple_files = true; option java_package = "com.google.cloud.datafusion.v1beta1"; option php_namespace = "Google\\Cloud\\DataFusion\\V1beta1"; option ruby_package = "Google::Cloud::DataFusion::V1beta1"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; // Service for creating and managing Data Fusion instances. // Data Fusion enables ETL developers to build code-free, data integration // pipelines via a point-and-click UI. service DataFusion { option (google.api.default_host) = "datafusion.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Lists possible versions for Data Fusion instances in the specified project // and location. - rpc ListAvailableVersions(ListAvailableVersionsRequest) - returns (ListAvailableVersionsResponse) { + rpc ListAvailableVersions(ListAvailableVersionsRequest) returns (ListAvailableVersionsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/versions" }; @@ -66,8 +68,7 @@ service DataFusion { } // Creates a new Data Fusion instance in the specified project and location. - rpc CreateInstance(CreateInstanceRequest) - returns (google.longrunning.Operation) { + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*}/instances" body: "instance" @@ -80,8 +81,7 @@ service DataFusion { } // Deletes a single Data Fusion instance. - rpc DeleteInstance(DeleteInstanceRequest) - returns (google.longrunning.Operation) { + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/instances/*}" }; @@ -93,8 +93,7 @@ service DataFusion { } // Updates a single Data Fusion instance. - rpc UpdateInstance(UpdateInstanceRequest) - returns (google.longrunning.Operation) { + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1beta1/{instance.name=projects/*/locations/*/instances/*}" body: "instance" @@ -108,8 +107,7 @@ service DataFusion { // Restart a single Data Fusion instance. // At the end of an operation instance is fully restarted. - rpc RestartInstance(RestartInstanceRequest) - returns (google.longrunning.Operation) { + rpc RestartInstance(RestartInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/instances/*}:restart" body: "*" @@ -122,8 +120,7 @@ service DataFusion { // Upgrade a single Data Fusion instance. // At the end of an operation instance is fully upgraded. - rpc UpgradeInstance(UpgradeInstanceRequest) - returns (google.longrunning.Operation) { + rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade" body: "*" @@ -135,8 +132,7 @@ service DataFusion { } // Remove IAM policy that is currently set on the given resource. - rpc RemoveIamPolicy(RemoveIamPolicyRequest) - returns (RemoveIamPolicyResponse) { + rpc RemoveIamPolicy(RemoveIamPolicyRequest) returns (RemoveIamPolicyResponse) { option (google.api.http) = { post: "/v1beta1/{resource=projects/*/locations/*/**}:removeIamPolicy" body: "*" @@ -161,8 +157,7 @@ service DataFusion { } // Remove DNS peering on the given resource. - rpc RemoveDnsPeering(RemoveDnsPeeringRequest) - returns (RemoveDnsPeeringResponse) { + rpc RemoveDnsPeering(RemoveDnsPeeringRequest) returns (RemoveDnsPeeringResponse) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*/instances/*}/dnsPeerings:remove" body: "*" @@ -171,8 +166,7 @@ service DataFusion { } // List DNS peering for a given resource. - rpc ListDnsPeerings(ListDnsPeeringsRequest) - returns (ListDnsPeeringsResponse) { + rpc ListDnsPeerings(ListDnsPeeringsRequest) returns (ListDnsPeeringsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*/instances/*}/dnsPeerings:list" }; @@ -201,6 +195,18 @@ message NetworkConfig { // The Data Fusion version. message Version { + // Each type represents the release availability of a CDF version + enum Type { + // Version does not have availability yet + TYPE_UNSPECIFIED = 0; + + // Version is under development and not considered stable + TYPE_PREVIEW = 1; + + // Version is available for public use + TYPE_GENERAL_AVAILABILITY = 2; + } + // The version number of the Data Fusion instance, such as '6.0.1.0'. string version_number = 1; @@ -209,6 +215,9 @@ message Version { // Represents a list of available feature names for a given version. repeated string available_features = 3; + + // Type represents the release availability of the version + Type type = 4; } // Identifies Data Fusion accelerators for an instance. @@ -237,7 +246,9 @@ message CryptoKeyConfig { // The name of the key which is used to encrypt/decrypt customer data. For key // in Cloud KMS, the key should be in the format of // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - string key_reference = 1; + string key_reference = 1 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; } // Represents a Data Fusion instance. @@ -302,11 +313,28 @@ message Instance { // Instance is being auto-upgraded AUTO_UPGRADING = 9; + + // Instance is disabled + DISABLED = 10; + } + + // The reason for disabling the instance if the state is DISABLED. + enum DisabledReason { + // This is an unknown reason for disabling. + DISABLED_REASON_UNSPECIFIED = 0; + + // The KMS key used by the instance is either revoked or denied access to + KMS_KEY_ISSUE = 1; } // Output only. The name of this instance is in the form of // projects/{project}/locations/{location}/instances/{instance}. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; // A description of this instance. string description = 2; @@ -339,12 +367,10 @@ message Instance { map options = 9; // Output only. The time the instance was created. - google.protobuf.Timestamp create_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the instance was last updated. - google.protobuf.Timestamp update_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of this Data Fusion instance. State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -363,10 +389,11 @@ message Instance { // Current version of Data Fusion. string version = 16; - // Output only. Deprecated. Use tenant_project_id instead to extract the - // tenant project ID. - string service_account = 17 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID. + string service_account = 17 [ + deprecated = true, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Display name for an instance. string display_name = 18; @@ -378,8 +405,7 @@ message Instance { // Output only. Endpoint on which the REST APIs is accessible. string api_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Cloud Storage bucket generated by Data Fusion in the customer - // project. + // Output only. Cloud Storage bucket generated by Data Fusion in the customer project. string gcs_bucket = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; // List of accelerators enabled for this CDF instance. @@ -404,15 +430,23 @@ message Instance { // The crypto key configuration. This field is used by the Customer-Managed // Encryption Keys (CMEK) feature. CryptoKeyConfig crypto_key_config = 27; + + // Output only. If the instance state is DISABLED, the reason for disabling the instance. + repeated DisabledReason disabled_reason = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for listing Data Fusion instances. message ListInstancesRequest { - // The project and location for which to retrieve instance information + // Required. The project and location for which to retrieve instance information // in the format projects/{project}/locations/{location}. If the location is // specified as '-' (wildcard), then all regions available to the project // are queried, and the results are aggregated. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. int32 page_size = 2; @@ -443,9 +477,14 @@ message ListInstancesResponse { // Request message for the list available versions request. message ListAvailableVersionsRequest { - // Required. The project and location for which to retrieve instance - // information in the format projects/{project}/locations/{location}. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. The project and location for which to retrieve instance information + // in the format projects/{project}/locations/{location}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. int32 page_size = 2; @@ -472,19 +511,29 @@ message ListAvailableVersionsResponse { // Request message for getting details about a Data Fusion instance. message GetInstanceRequest { - // The instance resource name in the format + // Required. The instance resource name in the format // projects/{project}/locations/{location}/instances/{instance}. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; } // Request message for creating a Data Fusion instance. message CreateInstanceRequest { - // The instance's project and location in the format + // Required. The instance's project and location in the format // projects/{project}/locations/{location}. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The name of the instance to create. - string instance_id = 2; + // Required. The name of the instance to create. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; // An instance resource. Instance instance = 3; @@ -492,19 +541,24 @@ message CreateInstanceRequest { // Request message for deleting a Data Fusion instance. message DeleteInstanceRequest { - // The instance resource name in the format + // Required. The instance resource name in the format // projects/{project}/locations/{location}/instances/{instance} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; } // Request message for updating a Data Fusion instance. // Data Fusion only allows updating the labels, options, and stack driver // settings. message UpdateInstanceRequest { - // The instance resource that replaces the resource on the server. Currently, + // Required. The instance resource that replaces the resource on the server. Currently, // Data Fusion only allows replacing labels, options, and stack driver // settings. All other fields will be ignored. - Instance instance = 1; + Instance instance = 1 [(google.api.field_behavior) = REQUIRED]; // Field mask is used to specify the fields that the update will overwrite // in an instance resource. The fields specified in the update_mask are @@ -517,19 +571,29 @@ message UpdateInstanceRequest { // Request message for restarting a Data Fusion instance. message RestartInstanceRequest { - // Name of the Data Fusion instance which need to be restarted in the form of + // Required. Name of the Data Fusion instance which need to be restarted in the form of // projects/{project}/locations/{location}/instances/{instance} - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; } // Request message for upgrading a Data Fusion instance. // To change the instance properties, instance update should be used. message UpgradeInstanceRequest { - // Name of the Data Fusion instance which need to be upgraded in the form of + // Required. Name of the Data Fusion instance which need to be upgraded in the form of // projects/{project}/locations/{location}/instances/{instance} // Instance will be upgraded with the latest stable version of the Data // Fusion. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; } // Represents the metadata of a long-running operation. @@ -551,9 +615,8 @@ message OperationMetadata { // Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. bool requested_cancellation = 6; // API version used to start the operation. @@ -562,12 +625,14 @@ message OperationMetadata { // Request message for RemoveIamPolicy method. message RemoveIamPolicyRequest { - // The resource on which IAM policy to be removed is attached to. - string resource = 1; + // Required. The resource on which IAM policy to be removed is attached to. + string resource = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for RemoveIamPolicy method. -message RemoveIamPolicyResponse {} +message RemoveIamPolicyResponse { + +} // List namespaces request. message ListNamespacesRequest { @@ -649,15 +714,22 @@ message DnsPeering { // Request message to create dns peering. message AddDnsPeeringRequest { - // The resource on which DNS peering will be created. - string parent = 1; + // Required. The resource on which DNS peering will be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; // Dns peering config. DnsPeering dns_peering = 2; } // Response message for set dns peering method. -message AddDnsPeeringResponse {} +message AddDnsPeeringResponse { + +} // A view for Namespace enum NamespaceView { @@ -673,15 +745,22 @@ enum NamespaceView { // Request message to remove dns peering. message RemoveDnsPeeringRequest { - // The resource on which DNS peering will be removed. - string parent = 1; + // Required. The resource on which DNS peering will be removed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; // Required. The zone to be removed. string zone = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for set dns peering method. -message RemoveDnsPeeringResponse {} +message RemoveDnsPeeringResponse { + +} // List dns peering request. message ListDnsPeeringsRequest {