diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java index 979c5866..796e9972 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java @@ -163,7 +163,7 @@ public DataCatalogStub getStub() { * *

This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not * return the complete resource, only the resource identifier and high level fields. Clients can - * subsequentally call `Get` methods. + * subsequently call `Get` methods. * *

Note that Data Catalog search queries do not guarantee full recall. Query results that match * your query may not be returned, even in subsequent result pages. Also note that results @@ -189,7 +189,8 @@ public DataCatalogStub getStub() { * @param scope Required. The scope of this search request. A `scope` that has empty * `include_org_ids`, `include_project_ids` AND false `include_gcp_public_datasets` is * considered invalid. Data Catalog will return an error in such a case. - * @param query Required. The query string in search query syntax. The query must be non-empty. + * @param query Optional. The query string in search query syntax. An empty query string will + * result in all data assets (in the specified scope) that the user has access to. *

Query strings can be simple as "x" or more qualified as: *

* - * @param tagTemplateId Required. The id of the tag template to create. + * @param tagTemplateId Required. The ID of the tag template to create. + *

The ID must contain only lowercase letters (a-z), numbers (0-9), or underscores (_), and + * must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8. * @param tagTemplate Required. The tag template to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1752,7 +1757,9 @@ public final TagTemplate createTagTemplate( *

  • projects/{project_id}/locations/us-central1 * * - * @param tagTemplateId Required. The id of the tag template to create. + * @param tagTemplateId Required. The ID of the tag template to create. + *

    The ID must contain only lowercase letters (a-z), numbers (0-9), or underscores (_), and + * must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8. * @param tagTemplate Required. The tag template to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1965,10 +1972,10 @@ public final TagTemplate updateTagTemplate(TagTemplate tagTemplate) { * } * * @param tagTemplate Required. The template to update. The "name" field must be set. - * @param updateMask The field mask specifies the parts of the template to overwrite. - *

    Allowed fields: - *

    * `display_name` - *

    If absent or empty, all of the allowed fields above will be updated. + * @param updateMask Names of fields whose values to overwrite on a tag template. Currently, only + * `display_name` can be overwritten. + *

    In general, if this parameter is absent or empty, all modifiable fields are overwritten. + * If such fields are non-required and omitted in the request body, their values are emptied. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TagTemplate updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask) { @@ -2180,10 +2187,11 @@ public final UnaryCallable deleteTagTemplateCal *

  • projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} * * - * @param tagTemplateFieldId Required. The ID of the tag template field to create. Field ids can - * contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes - * (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs - * must also be unique within their template. + * @param tagTemplateFieldId Required. The ID of the tag template field to create. + *

    Note: Adding a required field to an existing template is *not* allowed. + *

    Field IDs can contain letters (both uppercase and lowercase), numbers (0-9), underscores + * (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters + * long. Field IDs must also be unique within their template. * @param tagTemplateField Required. The tag template field to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2224,10 +2232,11 @@ public final TagTemplateField createTagTemplateField( *

  • projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} * * - * @param tagTemplateFieldId Required. The ID of the tag template field to create. Field ids can - * contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes - * (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs - * must also be unique within their template. + * @param tagTemplateFieldId Required. The ID of the tag template field to create. + *

    Note: Adding a required field to an existing template is *not* allowed. + *

    Field IDs can contain letters (both uppercase and lowercase), numbers (0-9), underscores + * (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters + * long. Field IDs must also be unique within their template. * @param tagTemplateField Required. The tag template field to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2398,13 +2407,19 @@ public final TagTemplateField updateTagTemplateField( * * * @param tagTemplateField Required. The template to update. - * @param updateMask Optional. The field mask specifies the parts of the template to be updated. - * Allowed fields: + * @param updateMask Optional. Names of fields whose values to overwrite on an individual field of + * a tag template. The following fields are modifiable: *

    * `display_name` * `type.enum_type` * `is_required` - *

    If `update_mask` is not set or empty, all of the allowed fields above will be updated. - *

    When updating an enum type, the provided values will be merged with the existing values. - * Therefore, enum values can only be added, existing enum values cannot be deleted nor - * renamed. Updating a template field from optional to required is NOT allowed. + *

    If this parameter is absent or empty, all modifiable fields are overwritten. If such + * fields are non-required and omitted in the request body, their values are emptied with one + * exception: when updating an enum type, the provided values are merged with the existing + * values. Therefore, enum values can only be added, existing enum values cannot be deleted or + * renamed. + *

    Additionally, updating a template field from optional to required is + *

    + * * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TagTemplateField updateTagTemplateField( @@ -2445,13 +2460,19 @@ public final TagTemplateField updateTagTemplateField( * * * @param tagTemplateField Required. The template to update. - * @param updateMask Optional. The field mask specifies the parts of the template to be updated. - * Allowed fields: + * @param updateMask Optional. Names of fields whose values to overwrite on an individual field of + * a tag template. The following fields are modifiable: *

    * `display_name` * `type.enum_type` * `is_required` - *

    If `update_mask` is not set or empty, all of the allowed fields above will be updated. - *

    When updating an enum type, the provided values will be merged with the existing values. - * Therefore, enum values can only be added, existing enum values cannot be deleted nor - * renamed. Updating a template field from optional to required is NOT allowed. + *

    If this parameter is absent or empty, all modifiable fields are overwritten. If such + * fields are non-required and omitted in the request body, their values are emptied with one + * exception: when updating an enum type, the provided values are merged with the existing + * values. Therefore, enum values can only be added, existing enum values cannot be deleted or + * renamed. + *

    Additionally, updating a template field from optional to required is + *

    + * * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TagTemplateField updateTagTemplateField( @@ -2661,6 +2682,155 @@ public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldReque return stub.renameTagTemplateFieldCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Renames an enum value in a tag template. The enum values have to be unique within one enum + * field. + * + *

    Sample code: + * + *

    {@code
    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    +   *   TagTemplateFieldEnumValueName name =
    +   *       TagTemplateFieldEnumValueName.of(
    +   *           "[PROJECT]",
    +   *           "[LOCATION]",
    +   *           "[TAG_TEMPLATE]",
    +   *           "[TAG_TEMPLATE_FIELD_ID]",
    +   *           "[ENUM_VALUE_DISPLAY_NAME]");
    +   *   String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027";
    +   *   TagTemplateField response =
    +   *       dataCatalogClient.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName);
    +   * }
    +   * }
    + * + * @param name Required. The name of the enum field value. Example: + * + * + * @param newEnumValueDisplayName Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField renameTagTemplateFieldEnumValue( + TagTemplateFieldEnumValueName name, String newEnumValueDisplayName) { + RenameTagTemplateFieldEnumValueRequest request = + RenameTagTemplateFieldEnumValueRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setNewEnumValueDisplayName(newEnumValueDisplayName) + .build(); + return renameTagTemplateFieldEnumValue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Renames an enum value in a tag template. The enum values have to be unique within one enum + * field. + * + *

    Sample code: + * + *

    {@code
    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    +   *   String name =
    +   *       TagTemplateFieldEnumValueName.of(
    +   *               "[PROJECT]",
    +   *               "[LOCATION]",
    +   *               "[TAG_TEMPLATE]",
    +   *               "[TAG_TEMPLATE_FIELD_ID]",
    +   *               "[ENUM_VALUE_DISPLAY_NAME]")
    +   *           .toString();
    +   *   String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027";
    +   *   TagTemplateField response =
    +   *       dataCatalogClient.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName);
    +   * }
    +   * }
    + * + * @param name Required. The name of the enum field value. Example: + * + * + * @param newEnumValueDisplayName Required. The new display name of the enum value. For example, + * `my_new_enum_value`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField renameTagTemplateFieldEnumValue( + String name, String newEnumValueDisplayName) { + RenameTagTemplateFieldEnumValueRequest request = + RenameTagTemplateFieldEnumValueRequest.newBuilder() + .setName(name) + .setNewEnumValueDisplayName(newEnumValueDisplayName) + .build(); + return renameTagTemplateFieldEnumValue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Renames an enum value in a tag template. The enum values have to be unique within one enum + * field. + * + *

    Sample code: + * + *

    {@code
    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    +   *   RenameTagTemplateFieldEnumValueRequest request =
    +   *       RenameTagTemplateFieldEnumValueRequest.newBuilder()
    +   *           .setName(
    +   *               TagTemplateFieldEnumValueName.of(
    +   *                       "[PROJECT]",
    +   *                       "[LOCATION]",
    +   *                       "[TAG_TEMPLATE]",
    +   *                       "[TAG_TEMPLATE_FIELD_ID]",
    +   *                       "[ENUM_VALUE_DISPLAY_NAME]")
    +   *                   .toString())
    +   *           .setNewEnumValueDisplayName("newEnumValueDisplayName-1119629027")
    +   *           .build();
    +   *   TagTemplateField response = dataCatalogClient.renameTagTemplateFieldEnumValue(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagTemplateField renameTagTemplateFieldEnumValue( + RenameTagTemplateFieldEnumValueRequest request) { + return renameTagTemplateFieldEnumValueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Renames an enum value in a tag template. The enum values have to be unique within one enum + * field. + * + *

    Sample code: + * + *

    {@code
    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    +   *   RenameTagTemplateFieldEnumValueRequest request =
    +   *       RenameTagTemplateFieldEnumValueRequest.newBuilder()
    +   *           .setName(
    +   *               TagTemplateFieldEnumValueName.of(
    +   *                       "[PROJECT]",
    +   *                       "[LOCATION]",
    +   *                       "[TAG_TEMPLATE]",
    +   *                       "[TAG_TEMPLATE_FIELD_ID]",
    +   *                       "[ENUM_VALUE_DISPLAY_NAME]")
    +   *                   .toString())
    +   *           .setNewEnumValueDisplayName("newEnumValueDisplayName-1119629027")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       dataCatalogClient.renameTagTemplateFieldEnumValueCallable().futureCall(request);
    +   *   // Do something.
    +   *   TagTemplateField response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + renameTagTemplateFieldEnumValueCallable() { + return stub.renameTagTemplateFieldEnumValueCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a field in a tag template and all uses of that field. Users should enable the Data @@ -2812,12 +2982,10 @@ public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request) * } * * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to - * Entries. Example: - * - *

    Note that this Tag and its child resources may not actually be stored in the location in - * this name. + * entries. An entry can have up to 1000 attached tags. Example: + *

    `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}` + *

    Note: The tag and its child resources might not be stored in the location specified in + * its name. * @param tag Required. The tag to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2851,12 +3019,10 @@ public final Tag createTag(TagName parent, Tag tag) { * } * * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to - * Entries. Example: - *

    - *

    Note that this Tag and its child resources may not actually be stored in the location in - * this name. + * entries. An entry can have up to 1000 attached tags. Example: + *

    `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}` + *

    Note: The tag and its child resources might not be stored in the location specified in + * its name. * @param tag Required. The tag to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2962,8 +3128,10 @@ public final Tag updateTag(Tag tag) { * } * * @param tag Required. The updated tag. The "name" field must be set. - * @param updateMask The fields to update on the Tag. If absent or empty, all modifiable fields - * are updated. Currently the only modifiable field is the field `fields`. + * @param updateMask Names of fields whose values to overwrite on a tag. Currently, a tag has the + * only modifiable field with the name `fields`. + *

    In general, if this parameter is absent or empty, all modifiable fields are overwritten. + * If such fields are non-required and omitted in the request body, their values are emptied. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Tag updateTag(Tag tag, FieldMask updateMask) { @@ -3291,7 +3459,7 @@ public final UnaryCallable listTagsCallable() * *

    {@code
        * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    -   *   ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
    +   *   ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
        *   Policy policy = Policy.newBuilder().build();
        *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
        * }
    @@ -3328,7 +3496,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
        *
        * 
    {@code
        * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    -   *   String resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
    +   *   String resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
        *   Policy policy = Policy.newBuilder().build();
        *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
        * }
    @@ -3364,8 +3532,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
        * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
        *   SetIamPolicyRequest request =
        *       SetIamPolicyRequest.newBuilder()
    -   *           .setResource(
    -   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
        *           .setPolicy(Policy.newBuilder().build())
        *           .build();
        *   Policy response = dataCatalogClient.setIamPolicy(request);
    @@ -3396,8 +3563,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
        * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
        *   SetIamPolicyRequest request =
        *       SetIamPolicyRequest.newBuilder()
    -   *           .setResource(
    -   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
        *           .setPolicy(Policy.newBuilder().build())
        *           .build();
        *   ApiFuture future = dataCatalogClient.setIamPolicyCallable().futureCall(request);
    @@ -3428,7 +3594,7 @@ public final UnaryCallable setIamPolicyCallable() {
        *
        * 
    {@code
        * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    -   *   ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
    +   *   ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
        *   Policy response = dataCatalogClient.getIamPolicy(resource);
        * }
        * }
    @@ -3463,7 +3629,7 @@ public final Policy getIamPolicy(ResourceName resource) { * *
    {@code
        * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    -   *   String resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
    +   *   String resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
        *   Policy response = dataCatalogClient.getIamPolicy(resource);
        * }
        * }
    @@ -3497,8 +3663,7 @@ public final Policy getIamPolicy(String resource) { * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource( - * TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString()) + * .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = dataCatalogClient.getIamPolicy(request); @@ -3532,8 +3697,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() - * .setResource( - * TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString()) + * .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = dataCatalogClient.getIamPolicyCallable().futureCall(request); @@ -3563,8 +3727,7 @@ public final UnaryCallable getIamPolicyCallable() { * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource( - * TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString()) + * .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = dataCatalogClient.testIamPermissions(request); @@ -3595,8 +3758,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) { * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() - * .setResource( - * TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString()) + * .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java index c368ade1..46c7af68 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java @@ -179,6 +179,12 @@ public UnaryCallSettings deleteTagTemplateSetti return ((DataCatalogStubSettings) getStubSettings()).renameTagTemplateFieldSettings(); } + /** Returns the object with the settings used for calls to renameTagTemplateFieldEnumValue. */ + public UnaryCallSettings + renameTagTemplateFieldEnumValueSettings() { + return ((DataCatalogStubSettings) getStubSettings()).renameTagTemplateFieldEnumValueSettings(); + } + /** Returns the object with the settings used for calls to deleteTagTemplateField. */ public UnaryCallSettings deleteTagTemplateFieldSettings() { return ((DataCatalogStubSettings) getStubSettings()).deleteTagTemplateFieldSettings(); @@ -426,6 +432,12 @@ public UnaryCallSettings.Builder deleteTagTempl return getStubSettingsBuilder().renameTagTemplateFieldSettings(); } + /** Returns the builder for the settings used for calls to renameTagTemplateFieldEnumValue. */ + public UnaryCallSettings.Builder + renameTagTemplateFieldEnumValueSettings() { + return getStubSettingsBuilder().renameTagTemplateFieldEnumValueSettings(); + } + /** Returns the builder for the settings used for calls to deleteTagTemplateField. */ public UnaryCallSettings.Builder deleteTagTemplateFieldSettings() { diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClient.java new file mode 100644 index 00000000..f487b5b6 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClient.java @@ -0,0 +1,1525 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.stub.PolicyTagManagerStub; +import com.google.cloud.datacatalog.v1.stub.PolicyTagManagerStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Policy Tag Manager API service allows clients to manage their policy tags + * and taxonomies. + * + *

    Policy tags are used to tag BigQuery columns and apply additional access control policies. A + * taxonomy is a hierarchical grouping of policy tags that classify data along a common axis. + * + *

    This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

    {@code
    + * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    + *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
    + *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
    + * }
    + * }
    + * + *

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

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

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

    See the individual methods for example code. + * + *

    Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

    This class can be customized by passing in a custom instance of PolicyTagManagerSettings to + * create(). For example: + * + *

    To customize credentials: + * + *

    {@code
    + * PolicyTagManagerSettings policyTagManagerSettings =
    + *     PolicyTagManagerSettings.newBuilder()
    + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
    + *         .build();
    + * PolicyTagManagerClient policyTagManagerClient =
    + *     PolicyTagManagerClient.create(policyTagManagerSettings);
    + * }
    + * + *

    To customize the endpoint: + * + *

    {@code
    + * PolicyTagManagerSettings policyTagManagerSettings =
    + *     PolicyTagManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
    + * PolicyTagManagerClient policyTagManagerClient =
    + *     PolicyTagManagerClient.create(policyTagManagerSettings);
    + * }
    + * + *

    Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PolicyTagManagerClient implements BackgroundResource { + private final PolicyTagManagerSettings settings; + private final PolicyTagManagerStub stub; + + /** Constructs an instance of PolicyTagManagerClient with default settings. */ + public static final PolicyTagManagerClient create() throws IOException { + return create(PolicyTagManagerSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PolicyTagManagerClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PolicyTagManagerClient create(PolicyTagManagerSettings settings) + throws IOException { + return new PolicyTagManagerClient(settings); + } + + /** + * Constructs an instance of PolicyTagManagerClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(PolicyTagManagerSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final PolicyTagManagerClient create(PolicyTagManagerStub stub) { + return new PolicyTagManagerClient(stub); + } + + /** + * Constructs an instance of PolicyTagManagerClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected PolicyTagManagerClient(PolicyTagManagerSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PolicyTagManagerStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected PolicyTagManagerClient(PolicyTagManagerStub stub) { + this.settings = null; + this.stub = stub; + } + + public final PolicyTagManagerSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PolicyTagManagerStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a taxonomy in a specified project. The taxonomy is initially empty, i.e., does not + * contain policy tags. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    +   *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
    +   *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the project that the taxonomy will belong to. + * @param taxonomy The taxonomy to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy createTaxonomy(LocationName parent, Taxonomy taxonomy) { + CreateTaxonomyRequest request = + CreateTaxonomyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTaxonomy(taxonomy) + .build(); + return createTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a taxonomy in a specified project. The taxonomy is initially empty, i.e., does not + * contain policy tags. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
    +   *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
    +   *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the project that the taxonomy will belong to. + * @param taxonomy The taxonomy to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy createTaxonomy(String parent, Taxonomy taxonomy) { + CreateTaxonomyRequest request = + CreateTaxonomyRequest.newBuilder().setParent(parent).setTaxonomy(taxonomy).build(); + return createTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a taxonomy in a specified project. The taxonomy is initially empty, i.e., does not + * contain policy tags. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   CreateTaxonomyRequest request =
    +   *       CreateTaxonomyRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setTaxonomy(Taxonomy.newBuilder().build())
    +   *           .build();
    +   *   Taxonomy response = policyTagManagerClient.createTaxonomy(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy createTaxonomy(CreateTaxonomyRequest request) { + return createTaxonomyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a taxonomy in a specified project. The taxonomy is initially empty, i.e., does not + * contain policy tags. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   CreateTaxonomyRequest request =
    +   *       CreateTaxonomyRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setTaxonomy(Taxonomy.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.createTaxonomyCallable().futureCall(request);
    +   *   // Do something.
    +   *   Taxonomy response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable createTaxonomyCallable() { + return stub.createTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a taxonomy. This method will also delete all policy tags in this taxonomy, their + * associated policies, and the policy tags references from BigQuery columns. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
    +   *   policyTagManagerClient.deleteTaxonomy(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the taxonomy to be deleted. All policy tags in this + * taxonomy will also be deleted. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTaxonomy(TaxonomyName name) { + DeleteTaxonomyRequest request = + DeleteTaxonomyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a taxonomy. This method will also delete all policy tags in this taxonomy, their + * associated policies, and the policy tags references from BigQuery columns. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
    +   *   policyTagManagerClient.deleteTaxonomy(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the taxonomy to be deleted. All policy tags in this + * taxonomy will also be deleted. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTaxonomy(String name) { + DeleteTaxonomyRequest request = DeleteTaxonomyRequest.newBuilder().setName(name).build(); + deleteTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a taxonomy. This method will also delete all policy tags in this taxonomy, their + * associated policies, and the policy tags references from BigQuery columns. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   DeleteTaxonomyRequest request =
    +   *       DeleteTaxonomyRequest.newBuilder()
    +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .build();
    +   *   policyTagManagerClient.deleteTaxonomy(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTaxonomy(DeleteTaxonomyRequest request) { + deleteTaxonomyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a taxonomy. This method will also delete all policy tags in this taxonomy, their + * associated policies, and the policy tags references from BigQuery columns. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   DeleteTaxonomyRequest request =
    +   *       DeleteTaxonomyRequest.newBuilder()
    +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .build();
    +   *   ApiFuture future = policyTagManagerClient.deleteTaxonomyCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable deleteTaxonomyCallable() { + return stub.deleteTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a taxonomy. This method can update the taxonomy's display name, description, and + * activated policy types. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
    +   *   Taxonomy response = policyTagManagerClient.updateTaxonomy(taxonomy);
    +   * }
    +   * }
    + * + * @param taxonomy The taxonomy to update. Only description, display_name, and activated policy + * types can be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy updateTaxonomy(Taxonomy taxonomy) { + UpdateTaxonomyRequest request = + UpdateTaxonomyRequest.newBuilder().setTaxonomy(taxonomy).build(); + return updateTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a taxonomy. This method can update the taxonomy's display name, description, and + * activated policy types. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   UpdateTaxonomyRequest request =
    +   *       UpdateTaxonomyRequest.newBuilder()
    +   *           .setTaxonomy(Taxonomy.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   Taxonomy response = policyTagManagerClient.updateTaxonomy(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy updateTaxonomy(UpdateTaxonomyRequest request) { + return updateTaxonomyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a taxonomy. This method can update the taxonomy's display name, description, and + * activated policy types. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   UpdateTaxonomyRequest request =
    +   *       UpdateTaxonomyRequest.newBuilder()
    +   *           .setTaxonomy(Taxonomy.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.updateTaxonomyCallable().futureCall(request);
    +   *   // Do something.
    +   *   Taxonomy response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable updateTaxonomyCallable() { + return stub.updateTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all taxonomies in a project in a particular location that the caller has permission to + * view. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    +   *   for (Taxonomy element : policyTagManagerClient.listTaxonomies(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the project to list the taxonomies of. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTaxonomiesPagedResponse listTaxonomies(LocationName parent) { + ListTaxonomiesRequest request = + ListTaxonomiesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTaxonomies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all taxonomies in a project in a particular location that the caller has permission to + * view. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
    +   *   for (Taxonomy element : policyTagManagerClient.listTaxonomies(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the project to list the taxonomies of. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTaxonomiesPagedResponse listTaxonomies(String parent) { + ListTaxonomiesRequest request = ListTaxonomiesRequest.newBuilder().setParent(parent).build(); + return listTaxonomies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all taxonomies in a project in a particular location that the caller has permission to + * view. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   ListTaxonomiesRequest request =
    +   *       ListTaxonomiesRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (Taxonomy element : policyTagManagerClient.listTaxonomies(request).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTaxonomiesPagedResponse listTaxonomies(ListTaxonomiesRequest request) { + return listTaxonomiesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all taxonomies in a project in a particular location that the caller has permission to + * view. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   ListTaxonomiesRequest request =
    +   *       ListTaxonomiesRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.listTaxonomiesPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (Taxonomy element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listTaxonomiesPagedCallable() { + return stub.listTaxonomiesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all taxonomies in a project in a particular location that the caller has permission to + * view. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   ListTaxonomiesRequest request =
    +   *       ListTaxonomiesRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListTaxonomiesResponse response =
    +   *         policyTagManagerClient.listTaxonomiesCallable().call(request);
    +   *     for (Taxonomy element : response.getResponsesList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listTaxonomiesCallable() { + return stub.listTaxonomiesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
    +   *   Taxonomy response = policyTagManagerClient.getTaxonomy(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the requested taxonomy. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy getTaxonomy(TaxonomyName name) { + GetTaxonomyRequest request = + GetTaxonomyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
    +   *   Taxonomy response = policyTagManagerClient.getTaxonomy(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the requested taxonomy. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy getTaxonomy(String name) { + GetTaxonomyRequest request = GetTaxonomyRequest.newBuilder().setName(name).build(); + return getTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   GetTaxonomyRequest request =
    +   *       GetTaxonomyRequest.newBuilder()
    +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .build();
    +   *   Taxonomy response = policyTagManagerClient.getTaxonomy(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Taxonomy getTaxonomy(GetTaxonomyRequest request) { + return getTaxonomyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   GetTaxonomyRequest request =
    +   *       GetTaxonomyRequest.newBuilder()
    +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .build();
    +   *   ApiFuture future = policyTagManagerClient.getTaxonomyCallable().futureCall(request);
    +   *   // Do something.
    +   *   Taxonomy response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getTaxonomyCallable() { + return stub.getTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy tag in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
    +   *   PolicyTag policyTag = PolicyTag.newBuilder().build();
    +   *   PolicyTag response = policyTagManagerClient.createPolicyTag(parent, policyTag);
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the taxonomy that the policy tag will belong to. + * @param policyTag The policy tag to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag createPolicyTag(TaxonomyName parent, PolicyTag policyTag) { + CreatePolicyTagRequest request = + CreatePolicyTagRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyTag(policyTag) + .build(); + return createPolicyTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy tag in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String parent =
    +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
    +   *   PolicyTag policyTag = PolicyTag.newBuilder().build();
    +   *   PolicyTag response = policyTagManagerClient.createPolicyTag(parent, policyTag);
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the taxonomy that the policy tag will belong to. + * @param policyTag The policy tag to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag createPolicyTag(String parent, PolicyTag policyTag) { + CreatePolicyTagRequest request = + CreatePolicyTagRequest.newBuilder().setParent(parent).setPolicyTag(policyTag).build(); + return createPolicyTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy tag in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   CreatePolicyTagRequest request =
    +   *       CreatePolicyTagRequest.newBuilder()
    +   *           .setParent(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .setPolicyTag(PolicyTag.newBuilder().build())
    +   *           .build();
    +   *   PolicyTag response = policyTagManagerClient.createPolicyTag(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag createPolicyTag(CreatePolicyTagRequest request) { + return createPolicyTagCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a policy tag in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   CreatePolicyTagRequest request =
    +   *       CreatePolicyTagRequest.newBuilder()
    +   *           .setParent(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .setPolicyTag(PolicyTag.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.createPolicyTagCallable().futureCall(request);
    +   *   // Do something.
    +   *   PolicyTag response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable createPolicyTagCallable() { + return stub.createPolicyTagCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy tag. This method also deletes - all of its descendant policy tags, if any, - + * the policies associated with the policy tag and its descendants, and - references from BigQuery + * table schema of the policy tag and its descendants. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   PolicyTagName name =
    +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
    +   *   policyTagManagerClient.deletePolicyTag(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the policy tag to be deleted. All of its descendant + * policy tags will also be deleted. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePolicyTag(PolicyTagName name) { + DeletePolicyTagRequest request = + DeletePolicyTagRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deletePolicyTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy tag. This method also deletes - all of its descendant policy tags, if any, - + * the policies associated with the policy tag and its descendants, and - references from BigQuery + * table schema of the policy tag and its descendants. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String name =
    +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
    +   *   policyTagManagerClient.deletePolicyTag(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the policy tag to be deleted. All of its descendant + * policy tags will also be deleted. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePolicyTag(String name) { + DeletePolicyTagRequest request = DeletePolicyTagRequest.newBuilder().setName(name).build(); + deletePolicyTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy tag. This method also deletes - all of its descendant policy tags, if any, - + * the policies associated with the policy tag and its descendants, and - references from BigQuery + * table schema of the policy tag and its descendants. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   DeletePolicyTagRequest request =
    +   *       DeletePolicyTagRequest.newBuilder()
    +   *           .setName(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .build();
    +   *   policyTagManagerClient.deletePolicyTag(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePolicyTag(DeletePolicyTagRequest request) { + deletePolicyTagCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a policy tag. This method also deletes - all of its descendant policy tags, if any, - + * the policies associated with the policy tag and its descendants, and - references from BigQuery + * table schema of the policy tag and its descendants. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   DeletePolicyTagRequest request =
    +   *       DeletePolicyTagRequest.newBuilder()
    +   *           .setName(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.deletePolicyTagCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable deletePolicyTagCallable() { + return stub.deletePolicyTagCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy tag. This method can update the policy tag's display name, description, and + * parent policy tag. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   PolicyTag policyTag = PolicyTag.newBuilder().build();
    +   *   PolicyTag response = policyTagManagerClient.updatePolicyTag(policyTag);
    +   * }
    +   * }
    + * + * @param policyTag The policy tag to update. Only the description, display_name, and + * parent_policy_tag fields can be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag updatePolicyTag(PolicyTag policyTag) { + UpdatePolicyTagRequest request = + UpdatePolicyTagRequest.newBuilder().setPolicyTag(policyTag).build(); + return updatePolicyTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy tag. This method can update the policy tag's display name, description, and + * parent policy tag. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   UpdatePolicyTagRequest request =
    +   *       UpdatePolicyTagRequest.newBuilder()
    +   *           .setPolicyTag(PolicyTag.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   PolicyTag response = policyTagManagerClient.updatePolicyTag(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag updatePolicyTag(UpdatePolicyTagRequest request) { + return updatePolicyTagCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a policy tag. This method can update the policy tag's display name, description, and + * parent policy tag. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   UpdatePolicyTagRequest request =
    +   *       UpdatePolicyTagRequest.newBuilder()
    +   *           .setPolicyTag(PolicyTag.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.updatePolicyTagCallable().futureCall(request);
    +   *   // Do something.
    +   *   PolicyTag response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable updatePolicyTagCallable() { + return stub.updatePolicyTagCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all policy tags in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
    +   *   for (PolicyTag element : policyTagManagerClient.listPolicyTags(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the taxonomy to list the policy tags of. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyTagsPagedResponse listPolicyTags(TaxonomyName parent) { + ListPolicyTagsRequest request = + ListPolicyTagsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyTags(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all policy tags in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String parent =
    +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
    +   *   for (PolicyTag element : policyTagManagerClient.listPolicyTags(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. Resource name of the taxonomy to list the policy tags of. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyTagsPagedResponse listPolicyTags(String parent) { + ListPolicyTagsRequest request = ListPolicyTagsRequest.newBuilder().setParent(parent).build(); + return listPolicyTags(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all policy tags in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   ListPolicyTagsRequest request =
    +   *       ListPolicyTagsRequest.newBuilder()
    +   *           .setParent(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (PolicyTag element : policyTagManagerClient.listPolicyTags(request).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyTagsPagedResponse listPolicyTags(ListPolicyTagsRequest request) { + return listPolicyTagsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all policy tags in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   ListPolicyTagsRequest request =
    +   *       ListPolicyTagsRequest.newBuilder()
    +   *           .setParent(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.listPolicyTagsPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (PolicyTag element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listPolicyTagsPagedCallable() { + return stub.listPolicyTagsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all policy tags in a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   ListPolicyTagsRequest request =
    +   *       ListPolicyTagsRequest.newBuilder()
    +   *           .setParent(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListPolicyTagsResponse response =
    +   *         policyTagManagerClient.listPolicyTagsCallable().call(request);
    +   *     for (PolicyTag element : response.getResponsesList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listPolicyTagsCallable() { + return stub.listPolicyTagsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy tag. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   PolicyTagName name =
    +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
    +   *   PolicyTag response = policyTagManagerClient.getPolicyTag(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the requested policy tag. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag getPolicyTag(PolicyTagName name) { + GetPolicyTagRequest request = + GetPolicyTagRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPolicyTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy tag. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   String name =
    +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
    +   *   PolicyTag response = policyTagManagerClient.getPolicyTag(name);
    +   * }
    +   * }
    + * + * @param name Required. Resource name of the requested policy tag. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag getPolicyTag(String name) { + GetPolicyTagRequest request = GetPolicyTagRequest.newBuilder().setName(name).build(); + return getPolicyTag(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy tag. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   GetPolicyTagRequest request =
    +   *       GetPolicyTagRequest.newBuilder()
    +   *           .setName(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .build();
    +   *   PolicyTag response = policyTagManagerClient.getPolicyTag(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PolicyTag getPolicyTag(GetPolicyTagRequest request) { + return getPolicyTagCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a policy tag. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   GetPolicyTagRequest request =
    +   *       GetPolicyTagRequest.newBuilder()
    +   *           .setName(
    +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.getPolicyTagCallable().futureCall(request);
    +   *   // Do something.
    +   *   PolicyTag response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getPolicyTagCallable() { + return stub.getPolicyTagCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM policy for a policy tag or a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   GetIamPolicyRequest request =
    +   *       GetIamPolicyRequest.newBuilder()
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setOptions(GetPolicyOptions.newBuilder().build())
    +   *           .build();
    +   *   Policy response = policyTagManagerClient.getIamPolicy(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM policy for a policy tag or a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   GetIamPolicyRequest request =
    +   *       GetIamPolicyRequest.newBuilder()
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setOptions(GetPolicyOptions.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future = policyTagManagerClient.getIamPolicyCallable().futureCall(request);
    +   *   // Do something.
    +   *   Policy response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM policy for a policy tag or a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   SetIamPolicyRequest request =
    +   *       SetIamPolicyRequest.newBuilder()
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setPolicy(Policy.newBuilder().build())
    +   *           .build();
    +   *   Policy response = policyTagManagerClient.setIamPolicy(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM policy for a policy tag or a taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   SetIamPolicyRequest request =
    +   *       SetIamPolicyRequest.newBuilder()
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .setPolicy(Policy.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future = policyTagManagerClient.setIamPolicyCallable().futureCall(request);
    +   *   // Do something.
    +   *   Policy response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the permissions that a caller has on a specified policy tag or taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   TestIamPermissionsRequest request =
    +   *       TestIamPermissionsRequest.newBuilder()
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .addAllPermissions(new ArrayList())
    +   *           .build();
    +   *   TestIamPermissionsResponse response = policyTagManagerClient.testIamPermissions(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the permissions that a caller has on a specified policy tag or taxonomy. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    +   *   TestIamPermissionsRequest request =
    +   *       TestIamPermissionsRequest.newBuilder()
    +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .addAllPermissions(new ArrayList())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerClient.testIamPermissionsCallable().futureCall(request);
    +   *   // Do something.
    +   *   TestIamPermissionsResponse response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTaxonomiesPagedResponse + extends AbstractPagedListResponse< + ListTaxonomiesRequest, + ListTaxonomiesResponse, + Taxonomy, + ListTaxonomiesPage, + ListTaxonomiesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTaxonomiesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTaxonomiesPagedResponse apply(ListTaxonomiesPage input) { + return new ListTaxonomiesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTaxonomiesPagedResponse(ListTaxonomiesPage page) { + super(page, ListTaxonomiesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTaxonomiesPage + extends AbstractPage< + ListTaxonomiesRequest, ListTaxonomiesResponse, Taxonomy, ListTaxonomiesPage> { + + private ListTaxonomiesPage( + PageContext context, + ListTaxonomiesResponse response) { + super(context, response); + } + + private static ListTaxonomiesPage createEmptyPage() { + return new ListTaxonomiesPage(null, null); + } + + @Override + protected ListTaxonomiesPage createPage( + PageContext context, + ListTaxonomiesResponse response) { + return new ListTaxonomiesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTaxonomiesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTaxonomiesRequest, + ListTaxonomiesResponse, + Taxonomy, + ListTaxonomiesPage, + ListTaxonomiesFixedSizeCollection> { + + private ListTaxonomiesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTaxonomiesFixedSizeCollection createEmptyCollection() { + return new ListTaxonomiesFixedSizeCollection(null, 0); + } + + @Override + protected ListTaxonomiesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTaxonomiesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPolicyTagsPagedResponse + extends AbstractPagedListResponse< + ListPolicyTagsRequest, + ListPolicyTagsResponse, + PolicyTag, + ListPolicyTagsPage, + ListPolicyTagsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPolicyTagsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListPolicyTagsPagedResponse apply(ListPolicyTagsPage input) { + return new ListPolicyTagsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListPolicyTagsPagedResponse(ListPolicyTagsPage page) { + super(page, ListPolicyTagsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPolicyTagsPage + extends AbstractPage< + ListPolicyTagsRequest, ListPolicyTagsResponse, PolicyTag, ListPolicyTagsPage> { + + private ListPolicyTagsPage( + PageContext context, + ListPolicyTagsResponse response) { + super(context, response); + } + + private static ListPolicyTagsPage createEmptyPage() { + return new ListPolicyTagsPage(null, null); + } + + @Override + protected ListPolicyTagsPage createPage( + PageContext context, + ListPolicyTagsResponse response) { + return new ListPolicyTagsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPolicyTagsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPolicyTagsRequest, + ListPolicyTagsResponse, + PolicyTag, + ListPolicyTagsPage, + ListPolicyTagsFixedSizeCollection> { + + private ListPolicyTagsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPolicyTagsFixedSizeCollection createEmptyCollection() { + return new ListPolicyTagsFixedSizeCollection(null, 0); + } + + @Override + protected ListPolicyTagsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPolicyTagsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClient.java new file mode 100644 index 00000000..1b9bc685 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClient.java @@ -0,0 +1,308 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.stub.PolicyTagManagerSerializationStub; +import com.google.cloud.datacatalog.v1.stub.PolicyTagManagerSerializationStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Policy Tag Manager serialization API service allows clients to manipulate + * their policy tags and taxonomies in serialized format, where taxonomy is a hierarchical group of + * policy tags. + * + *

    This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

    {@code
    + * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    + *     PolicyTagManagerSerializationClient.create()) {
    + *   ImportTaxonomiesRequest request =
    + *       ImportTaxonomiesRequest.newBuilder()
    + *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    + *           .build();
    + *   ImportTaxonomiesResponse response =
    + *       policyTagManagerSerializationClient.importTaxonomies(request);
    + * }
    + * }
    + * + *

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

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

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

    See the individual methods for example code. + * + *

    Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

    This class can be customized by passing in a custom instance of + * PolicyTagManagerSerializationSettings to create(). For example: + * + *

    To customize credentials: + * + *

    {@code
    + * PolicyTagManagerSerializationSettings policyTagManagerSerializationSettings =
    + *     PolicyTagManagerSerializationSettings.newBuilder()
    + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
    + *         .build();
    + * PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    + *     PolicyTagManagerSerializationClient.create(policyTagManagerSerializationSettings);
    + * }
    + * + *

    To customize the endpoint: + * + *

    {@code
    + * PolicyTagManagerSerializationSettings policyTagManagerSerializationSettings =
    + *     PolicyTagManagerSerializationSettings.newBuilder().setEndpoint(myEndpoint).build();
    + * PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    + *     PolicyTagManagerSerializationClient.create(policyTagManagerSerializationSettings);
    + * }
    + * + *

    Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PolicyTagManagerSerializationClient implements BackgroundResource { + private final PolicyTagManagerSerializationSettings settings; + private final PolicyTagManagerSerializationStub stub; + + /** Constructs an instance of PolicyTagManagerSerializationClient with default settings. */ + public static final PolicyTagManagerSerializationClient create() throws IOException { + return create(PolicyTagManagerSerializationSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PolicyTagManagerSerializationClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final PolicyTagManagerSerializationClient create( + PolicyTagManagerSerializationSettings settings) throws IOException { + return new PolicyTagManagerSerializationClient(settings); + } + + /** + * Constructs an instance of PolicyTagManagerSerializationClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(PolicyTagManagerSerializationSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final PolicyTagManagerSerializationClient create( + PolicyTagManagerSerializationStub stub) { + return new PolicyTagManagerSerializationClient(stub); + } + + /** + * Constructs an instance of PolicyTagManagerSerializationClient, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected PolicyTagManagerSerializationClient(PolicyTagManagerSerializationSettings settings) + throws IOException { + this.settings = settings; + this.stub = + ((PolicyTagManagerSerializationStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected PolicyTagManagerSerializationClient(PolicyTagManagerSerializationStub stub) { + this.settings = null; + this.stub = stub; + } + + public final PolicyTagManagerSerializationSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PolicyTagManagerSerializationStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new taxonomies (including their policy tags) by importing from inlined source or + * cross-regional source. New taxonomies will be created in a given parent project. + * + *

    If using the cross-regional source, a new taxonomy is created by copying from a source in + * another region. + * + *

    If using the inlined source, this method provides a way to bulk create taxonomies and policy + * tags using nested proto structure. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    +   *     PolicyTagManagerSerializationClient.create()) {
    +   *   ImportTaxonomiesRequest request =
    +   *       ImportTaxonomiesRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .build();
    +   *   ImportTaxonomiesResponse response =
    +   *       policyTagManagerSerializationClient.importTaxonomies(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ImportTaxonomiesResponse importTaxonomies(ImportTaxonomiesRequest request) { + return importTaxonomiesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new taxonomies (including their policy tags) by importing from inlined source or + * cross-regional source. New taxonomies will be created in a given parent project. + * + *

    If using the cross-regional source, a new taxonomy is created by copying from a source in + * another region. + * + *

    If using the inlined source, this method provides a way to bulk create taxonomies and policy + * tags using nested proto structure. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    +   *     PolicyTagManagerSerializationClient.create()) {
    +   *   ImportTaxonomiesRequest request =
    +   *       ImportTaxonomiesRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerSerializationClient.importTaxonomiesCallable().futureCall(request);
    +   *   // Do something.
    +   *   ImportTaxonomiesResponse response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + importTaxonomiesCallable() { + return stub.importTaxonomiesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports taxonomies as the requested type and returns the taxonomies including their policy + * tags. The requested taxonomies must belong to one project. + * + *

    SerializedTaxonomy protos with nested policy tags that are generated by this method can be + * used as input for future ImportTaxonomies calls. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    +   *     PolicyTagManagerSerializationClient.create()) {
    +   *   ExportTaxonomiesRequest request =
    +   *       ExportTaxonomiesRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .addAllTaxonomies(new ArrayList())
    +   *           .build();
    +   *   ExportTaxonomiesResponse response =
    +   *       policyTagManagerSerializationClient.exportTaxonomies(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExportTaxonomiesResponse exportTaxonomies(ExportTaxonomiesRequest request) { + return exportTaxonomiesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports taxonomies as the requested type and returns the taxonomies including their policy + * tags. The requested taxonomies must belong to one project. + * + *

    SerializedTaxonomy protos with nested policy tags that are generated by this method can be + * used as input for future ImportTaxonomies calls. + * + *

    Sample code: + * + *

    {@code
    +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    +   *     PolicyTagManagerSerializationClient.create()) {
    +   *   ExportTaxonomiesRequest request =
    +   *       ExportTaxonomiesRequest.newBuilder()
    +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    +   *           .addAllTaxonomies(new ArrayList())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       policyTagManagerSerializationClient.exportTaxonomiesCallable().futureCall(request);
    +   *   // Do something.
    +   *   ExportTaxonomiesResponse response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable + exportTaxonomiesCallable() { + return stub.exportTaxonomiesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationSettings.java new file mode 100644 index 00000000..883e1a6c --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationSettings.java @@ -0,0 +1,201 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datacatalog.v1.stub.PolicyTagManagerSerializationStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyTagManagerSerializationClient}. + * + *

    The default instance has everything set to sensible defaults: + * + *

      + *
    • The default service address (datacatalog.googleapis.com) and default port (443) are used. + *
    • Credentials are acquired automatically through Application Default Credentials. + *
    • Retries are configured for idempotent methods but not for non-idempotent methods. + *
    + * + *

    The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

    For example, to set the total timeout of importTaxonomies to 30 seconds: + * + *

    {@code
    + * PolicyTagManagerSerializationSettings.Builder policyTagManagerSerializationSettingsBuilder =
    + *     PolicyTagManagerSerializationSettings.newBuilder();
    + * policyTagManagerSerializationSettingsBuilder
    + *     .importTaxonomiesSettings()
    + *     .setRetrySettings(
    + *         policyTagManagerSerializationSettingsBuilder
    + *             .importTaxonomiesSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .build());
    + * PolicyTagManagerSerializationSettings policyTagManagerSerializationSettings =
    + *     policyTagManagerSerializationSettingsBuilder.build();
    + * }
    + */ +@Generated("by gapic-generator-java") +public class PolicyTagManagerSerializationSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to importTaxonomies. */ + public UnaryCallSettings + importTaxonomiesSettings() { + return ((PolicyTagManagerSerializationStubSettings) getStubSettings()) + .importTaxonomiesSettings(); + } + + /** Returns the object with the settings used for calls to exportTaxonomies. */ + public UnaryCallSettings + exportTaxonomiesSettings() { + return ((PolicyTagManagerSerializationStubSettings) getStubSettings()) + .exportTaxonomiesSettings(); + } + + public static final PolicyTagManagerSerializationSettings create( + PolicyTagManagerSerializationStubSettings stub) throws IOException { + return new PolicyTagManagerSerializationSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PolicyTagManagerSerializationStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PolicyTagManagerSerializationStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PolicyTagManagerSerializationStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PolicyTagManagerSerializationStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PolicyTagManagerSerializationStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PolicyTagManagerSerializationStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PolicyTagManagerSerializationStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyTagManagerSerializationSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PolicyTagManagerSerializationSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PolicyTagManagerSerializationStubSettings.newBuilder(clientContext)); + } + + protected Builder(PolicyTagManagerSerializationSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PolicyTagManagerSerializationStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PolicyTagManagerSerializationStubSettings.newBuilder()); + } + + public PolicyTagManagerSerializationStubSettings.Builder getStubSettingsBuilder() { + return ((PolicyTagManagerSerializationStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to importTaxonomies. */ + public UnaryCallSettings.Builder + importTaxonomiesSettings() { + return getStubSettingsBuilder().importTaxonomiesSettings(); + } + + /** Returns the builder for the settings used for calls to exportTaxonomies. */ + public UnaryCallSettings.Builder + exportTaxonomiesSettings() { + return getStubSettingsBuilder().exportTaxonomiesSettings(); + } + + @Override + public PolicyTagManagerSerializationSettings build() throws IOException { + return new PolicyTagManagerSerializationSettings(this); + } + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSettings.java new file mode 100644 index 00000000..3df9d919 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSettings.java @@ -0,0 +1,322 @@ +/* + * 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.datacatalog.v1; + +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListPolicyTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListTaxonomiesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datacatalog.v1.stub.PolicyTagManagerStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyTagManagerClient}. + * + *

    The default instance has everything set to sensible defaults: + * + *

      + *
    • The default service address (datacatalog.googleapis.com) and default port (443) are used. + *
    • Credentials are acquired automatically through Application Default Credentials. + *
    • Retries are configured for idempotent methods but not for non-idempotent methods. + *
    + * + *

    The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

    For example, to set the total timeout of createTaxonomy to 30 seconds: + * + *

    {@code
    + * PolicyTagManagerSettings.Builder policyTagManagerSettingsBuilder =
    + *     PolicyTagManagerSettings.newBuilder();
    + * policyTagManagerSettingsBuilder
    + *     .createTaxonomySettings()
    + *     .setRetrySettings(
    + *         policyTagManagerSettingsBuilder
    + *             .createTaxonomySettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .build());
    + * PolicyTagManagerSettings policyTagManagerSettings = policyTagManagerSettingsBuilder.build();
    + * }
    + */ +@Generated("by gapic-generator-java") +public class PolicyTagManagerSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTaxonomy. */ + public UnaryCallSettings createTaxonomySettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).createTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to deleteTaxonomy. */ + public UnaryCallSettings deleteTaxonomySettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).deleteTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to updateTaxonomy. */ + public UnaryCallSettings updateTaxonomySettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).updateTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to listTaxonomies. */ + public PagedCallSettings< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse> + listTaxonomiesSettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).listTaxonomiesSettings(); + } + + /** Returns the object with the settings used for calls to getTaxonomy. */ + public UnaryCallSettings getTaxonomySettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).getTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to createPolicyTag. */ + public UnaryCallSettings createPolicyTagSettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).createPolicyTagSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicyTag. */ + public UnaryCallSettings deletePolicyTagSettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).deletePolicyTagSettings(); + } + + /** Returns the object with the settings used for calls to updatePolicyTag. */ + public UnaryCallSettings updatePolicyTagSettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).updatePolicyTagSettings(); + } + + /** Returns the object with the settings used for calls to listPolicyTags. */ + public PagedCallSettings< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse> + listPolicyTagsSettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).listPolicyTagsSettings(); + } + + /** Returns the object with the settings used for calls to getPolicyTag. */ + public UnaryCallSettings getPolicyTagSettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).getPolicyTagSettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((PolicyTagManagerStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final PolicyTagManagerSettings create(PolicyTagManagerStubSettings stub) + throws IOException { + return new PolicyTagManagerSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PolicyTagManagerStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PolicyTagManagerStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PolicyTagManagerStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PolicyTagManagerStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PolicyTagManagerStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PolicyTagManagerStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PolicyTagManagerStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyTagManagerSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PolicyTagManagerSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PolicyTagManagerStubSettings.newBuilder(clientContext)); + } + + protected Builder(PolicyTagManagerSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PolicyTagManagerStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PolicyTagManagerStubSettings.newBuilder()); + } + + public PolicyTagManagerStubSettings.Builder getStubSettingsBuilder() { + return ((PolicyTagManagerStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTaxonomy. */ + public UnaryCallSettings.Builder createTaxonomySettings() { + return getStubSettingsBuilder().createTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to deleteTaxonomy. */ + public UnaryCallSettings.Builder deleteTaxonomySettings() { + return getStubSettingsBuilder().deleteTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to updateTaxonomy. */ + public UnaryCallSettings.Builder updateTaxonomySettings() { + return getStubSettingsBuilder().updateTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to listTaxonomies. */ + public PagedCallSettings.Builder< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse> + listTaxonomiesSettings() { + return getStubSettingsBuilder().listTaxonomiesSettings(); + } + + /** Returns the builder for the settings used for calls to getTaxonomy. */ + public UnaryCallSettings.Builder getTaxonomySettings() { + return getStubSettingsBuilder().getTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to createPolicyTag. */ + public UnaryCallSettings.Builder createPolicyTagSettings() { + return getStubSettingsBuilder().createPolicyTagSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicyTag. */ + public UnaryCallSettings.Builder deletePolicyTagSettings() { + return getStubSettingsBuilder().deletePolicyTagSettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicyTag. */ + public UnaryCallSettings.Builder updatePolicyTagSettings() { + return getStubSettingsBuilder().updatePolicyTagSettings(); + } + + /** Returns the builder for the settings used for calls to listPolicyTags. */ + public PagedCallSettings.Builder< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse> + listPolicyTagsSettings() { + return getStubSettingsBuilder().listPolicyTagsSettings(); + } + + /** Returns the builder for the settings used for calls to getPolicyTag. */ + public UnaryCallSettings.Builder getPolicyTagSettings() { + return getStubSettingsBuilder().getPolicyTagSettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public PolicyTagManagerSettings build() throws IOException { + return new PolicyTagManagerSettings(this); + } + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/gapic_metadata.json b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/gapic_metadata.json index 99aef0e1..284286cf 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/gapic_metadata.json +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/gapic_metadata.json @@ -67,6 +67,9 @@ "RenameTagTemplateField": { "methods": ["renameTagTemplateField", "renameTagTemplateField", "renameTagTemplateField", "renameTagTemplateFieldCallable"] }, + "RenameTagTemplateFieldEnumValue": { + "methods": ["renameTagTemplateFieldEnumValue", "renameTagTemplateFieldEnumValue", "renameTagTemplateFieldEnumValue", "renameTagTemplateFieldEnumValueCallable"] + }, "SearchCatalog": { "methods": ["searchCatalog", "searchCatalog", "searchCatalogPagedCallable", "searchCatalogCallable"] }, @@ -94,6 +97,69 @@ } } } + }, + "PolicyTagManager": { + "clients": { + "grpc": { + "libraryClient": "PolicyTagManagerClient", + "rpcs": { + "CreatePolicyTag": { + "methods": ["createPolicyTag", "createPolicyTag", "createPolicyTag", "createPolicyTagCallable"] + }, + "CreateTaxonomy": { + "methods": ["createTaxonomy", "createTaxonomy", "createTaxonomy", "createTaxonomyCallable"] + }, + "DeletePolicyTag": { + "methods": ["deletePolicyTag", "deletePolicyTag", "deletePolicyTag", "deletePolicyTagCallable"] + }, + "DeleteTaxonomy": { + "methods": ["deleteTaxonomy", "deleteTaxonomy", "deleteTaxonomy", "deleteTaxonomyCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetPolicyTag": { + "methods": ["getPolicyTag", "getPolicyTag", "getPolicyTag", "getPolicyTagCallable"] + }, + "GetTaxonomy": { + "methods": ["getTaxonomy", "getTaxonomy", "getTaxonomy", "getTaxonomyCallable"] + }, + "ListPolicyTags": { + "methods": ["listPolicyTags", "listPolicyTags", "listPolicyTags", "listPolicyTagsPagedCallable", "listPolicyTagsCallable"] + }, + "ListTaxonomies": { + "methods": ["listTaxonomies", "listTaxonomies", "listTaxonomies", "listTaxonomiesPagedCallable", "listTaxonomiesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdatePolicyTag": { + "methods": ["updatePolicyTag", "updatePolicyTag", "updatePolicyTagCallable"] + }, + "UpdateTaxonomy": { + "methods": ["updateTaxonomy", "updateTaxonomy", "updateTaxonomyCallable"] + } + } + } + } + }, + "PolicyTagManagerSerialization": { + "clients": { + "grpc": { + "libraryClient": "PolicyTagManagerSerializationClient", + "rpcs": { + "ExportTaxonomies": { + "methods": ["exportTaxonomies", "exportTaxonomiesCallable"] + }, + "ImportTaxonomies": { + "methods": ["importTaxonomies", "importTaxonomiesCallable"] + } + } + } + } } } } \ No newline at end of file diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java index 9af1f8d7..c658dbf4 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java @@ -32,6 +32,44 @@ * EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup); * } * }

    + * + *

    ======================= PolicyTagManagerClient ======================= + * + *

    Service Description: Policy Tag Manager API service allows clients to manage their policy tags + * and taxonomies. + * + *

    Policy tags are used to tag BigQuery columns and apply additional access control policies. A + * taxonomy is a hierarchical grouping of policy tags that classify data along a common axis. + * + *

    Sample for PolicyTagManagerClient: + * + *

    {@code
    + * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
    + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    + *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
    + *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
    + * }
    + * }
    + * + *

    ======================= PolicyTagManagerSerializationClient ======================= + * + *

    Service Description: Policy Tag Manager serialization API service allows clients to manipulate + * their policy tags and taxonomies in serialized format, where taxonomy is a hierarchical group of + * policy tags. + * + *

    Sample for PolicyTagManagerSerializationClient: + * + *

    {@code
    + * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
    + *     PolicyTagManagerSerializationClient.create()) {
    + *   ImportTaxonomiesRequest request =
    + *       ImportTaxonomiesRequest.newBuilder()
    + *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
    + *           .build();
    + *   ImportTaxonomiesResponse response =
    + *       policyTagManagerSerializationClient.importTaxonomies(request);
    + * }
    + * }
    */ @Generated("by gapic-generator-java") package com.google.cloud.datacatalog.v1; diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java index fa31267e..d24ff7b2 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java @@ -45,6 +45,7 @@ import com.google.cloud.datacatalog.v1.ListTagsRequest; import com.google.cloud.datacatalog.v1.ListTagsResponse; import com.google.cloud.datacatalog.v1.LookupEntryRequest; +import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest; import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; import com.google.cloud.datacatalog.v1.SearchCatalogRequest; import com.google.cloud.datacatalog.v1.SearchCatalogResponse; @@ -166,6 +167,12 @@ public UnaryCallable deleteTagTemplateCallable( throw new UnsupportedOperationException("Not implemented: renameTagTemplateFieldCallable()"); } + public UnaryCallable + renameTagTemplateFieldEnumValueCallable() { + throw new UnsupportedOperationException( + "Not implemented: renameTagTemplateFieldEnumValueCallable()"); + } + public UnaryCallable deleteTagTemplateFieldCallable() { throw new UnsupportedOperationException("Not implemented: deleteTagTemplateFieldCallable()"); } diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java index 8a2d5df7..901d6e6d 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java @@ -65,6 +65,7 @@ import com.google.cloud.datacatalog.v1.ListTagsRequest; import com.google.cloud.datacatalog.v1.ListTagsResponse; import com.google.cloud.datacatalog.v1.LookupEntryRequest; +import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest; import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; import com.google.cloud.datacatalog.v1.SearchCatalogRequest; import com.google.cloud.datacatalog.v1.SearchCatalogResponse; @@ -157,6 +158,8 @@ public class DataCatalogStubSettings extends StubSettings renameTagTemplateFieldSettings; + private final UnaryCallSettings + renameTagTemplateFieldEnumValueSettings; private final UnaryCallSettings deleteTagTemplateFieldSettings; private final UnaryCallSettings createTagSettings; @@ -488,6 +491,12 @@ public UnaryCallSettings deleteTagTemplateSetti return renameTagTemplateFieldSettings; } + /** Returns the object with the settings used for calls to renameTagTemplateFieldEnumValue. */ + public UnaryCallSettings + renameTagTemplateFieldEnumValueSettings() { + return renameTagTemplateFieldEnumValueSettings; + } + /** Returns the object with the settings used for calls to deleteTagTemplateField. */ public UnaryCallSettings deleteTagTemplateFieldSettings() { return deleteTagTemplateFieldSettings; @@ -618,6 +627,8 @@ protected DataCatalogStubSettings(Builder settingsBuilder) throws IOException { createTagTemplateFieldSettings = settingsBuilder.createTagTemplateFieldSettings().build(); updateTagTemplateFieldSettings = settingsBuilder.updateTagTemplateFieldSettings().build(); renameTagTemplateFieldSettings = settingsBuilder.renameTagTemplateFieldSettings().build(); + renameTagTemplateFieldEnumValueSettings = + settingsBuilder.renameTagTemplateFieldEnumValueSettings().build(); deleteTagTemplateFieldSettings = settingsBuilder.deleteTagTemplateFieldSettings().build(); createTagSettings = settingsBuilder.createTagSettings().build(); updateTagSettings = settingsBuilder.updateTagSettings().build(); @@ -666,6 +677,9 @@ public static class Builder extends StubSettings.Builder renameTagTemplateFieldSettings; + private final UnaryCallSettings.Builder< + RenameTagTemplateFieldEnumValueRequest, TagTemplateField> + renameTagTemplateFieldEnumValueSettings; private final UnaryCallSettings.Builder deleteTagTemplateFieldSettings; private final UnaryCallSettings.Builder createTagSettings; @@ -685,7 +699,7 @@ public static class Builder extends StubSettings.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_1_codes", + "retry_policy_3_codes", ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); definitions.put( "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); @@ -707,7 +721,7 @@ public static class Builder extends StubSettings.Builder deleteTagTempl return renameTagTemplateFieldSettings; } + /** Returns the builder for the settings used for calls to renameTagTemplateFieldEnumValue. */ + public UnaryCallSettings.Builder + renameTagTemplateFieldEnumValueSettings() { + return renameTagTemplateFieldEnumValueSettings; + } + /** Returns the builder for the settings used for calls to deleteTagTemplateField. */ public UnaryCallSettings.Builder deleteTagTemplateFieldSettings() { diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java index 98e1b5b1..453383d2 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java @@ -50,6 +50,7 @@ import com.google.cloud.datacatalog.v1.ListTagsRequest; import com.google.cloud.datacatalog.v1.ListTagsResponse; import com.google.cloud.datacatalog.v1.LookupEntryRequest; +import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest; import com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; import com.google.cloud.datacatalog.v1.SearchCatalogRequest; import com.google.cloud.datacatalog.v1.SearchCatalogResponse; @@ -266,6 +267,18 @@ public class GrpcDataCatalogStub extends DataCatalogStub { .setResponseMarshaller(ProtoUtils.marshaller(TagTemplateField.getDefaultInstance())) .build(); + private static final MethodDescriptor + renameTagTemplateFieldEnumValueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datacatalog.v1.DataCatalog/RenameTagTemplateFieldEnumValue") + .setRequestMarshaller( + ProtoUtils.marshaller( + RenameTagTemplateFieldEnumValueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagTemplateField.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteTagTemplateFieldMethodDescriptor = MethodDescriptor.newBuilder() @@ -365,6 +378,8 @@ public class GrpcDataCatalogStub extends DataCatalogStub { updateTagTemplateFieldCallable; private final UnaryCallable renameTagTemplateFieldCallable; + private final UnaryCallable + renameTagTemplateFieldEnumValueCallable; private final UnaryCallable deleteTagTemplateFieldCallable; private final UnaryCallable createTagCallable; private final UnaryCallable updateTagCallable; @@ -653,6 +668,21 @@ public Map extract(RenameTagTemplateFieldRequest request) { } }) .build(); + GrpcCallSettings + renameTagTemplateFieldEnumValueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(renameTagTemplateFieldEnumValueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + RenameTagTemplateFieldEnumValueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); GrpcCallSettings deleteTagTemplateFieldTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteTagTemplateFieldMethodDescriptor) @@ -837,6 +867,11 @@ public Map extract(TestIamPermissionsRequest request) { renameTagTemplateFieldTransportSettings, settings.renameTagTemplateFieldSettings(), clientContext); + this.renameTagTemplateFieldEnumValueCallable = + callableFactory.createUnaryCallable( + renameTagTemplateFieldEnumValueTransportSettings, + settings.renameTagTemplateFieldEnumValueSettings(), + clientContext); this.deleteTagTemplateFieldCallable = callableFactory.createUnaryCallable( deleteTagTemplateFieldTransportSettings, @@ -992,6 +1027,12 @@ public UnaryCallable deleteTagTemplateCallable( return renameTagTemplateFieldCallable; } + @Override + public UnaryCallable + renameTagTemplateFieldEnumValueCallable() { + return renameTagTemplateFieldEnumValueCallable; + } + @Override public UnaryCallable deleteTagTemplateFieldCallable() { return deleteTagTemplateFieldCallable; diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerCallableFactory.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerCallableFactory.java new file mode 100644 index 00000000..99551c40 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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.datacatalog.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PolicyTagManager service API. + * + *

    This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPolicyTagManagerCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationCallableFactory.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationCallableFactory.java new file mode 100644 index 00000000..68453ded --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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.datacatalog.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PolicyTagManagerSerialization service API. + * + *

    This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPolicyTagManagerSerializationCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationStub.java new file mode 100644 index 00000000..ddc130f4 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationStub.java @@ -0,0 +1,208 @@ +/* + * 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.datacatalog.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse; +import com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PolicyTagManagerSerialization service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPolicyTagManagerSerializationStub extends PolicyTagManagerSerializationStub { + private static final MethodDescriptor + importTaxonomiesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ImportTaxonomies") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportTaxonomiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ImportTaxonomiesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportTaxonomiesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datacatalog.v1.PolicyTagManagerSerialization/ExportTaxonomies") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportTaxonomiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ExportTaxonomiesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + importTaxonomiesCallable; + private final UnaryCallable + exportTaxonomiesCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPolicyTagManagerSerializationStub create( + PolicyTagManagerSerializationStubSettings settings) throws IOException { + return new GrpcPolicyTagManagerSerializationStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPolicyTagManagerSerializationStub create(ClientContext clientContext) + throws IOException { + return new GrpcPolicyTagManagerSerializationStub( + PolicyTagManagerSerializationStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPolicyTagManagerSerializationStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPolicyTagManagerSerializationStub( + PolicyTagManagerSerializationStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcPolicyTagManagerSerializationStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPolicyTagManagerSerializationStub( + PolicyTagManagerSerializationStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPolicyTagManagerSerializationCallableFactory()); + } + + /** + * Constructs an instance of GrpcPolicyTagManagerSerializationStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcPolicyTagManagerSerializationStub( + PolicyTagManagerSerializationStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + importTaxonomiesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importTaxonomiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportTaxonomiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + exportTaxonomiesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportTaxonomiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportTaxonomiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.importTaxonomiesCallable = + callableFactory.createUnaryCallable( + importTaxonomiesTransportSettings, settings.importTaxonomiesSettings(), clientContext); + this.exportTaxonomiesCallable = + callableFactory.createUnaryCallable( + exportTaxonomiesTransportSettings, settings.exportTaxonomiesSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + importTaxonomiesCallable() { + return importTaxonomiesCallable; + } + + @Override + public UnaryCallable + exportTaxonomiesCallable() { + return exportTaxonomiesCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerStub.java new file mode 100644 index 00000000..5ce77a94 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerStub.java @@ -0,0 +1,591 @@ +/* + * 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.datacatalog.v1.stub; + +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListPolicyTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListTaxonomiesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.CreatePolicyTagRequest; +import com.google.cloud.datacatalog.v1.CreateTaxonomyRequest; +import com.google.cloud.datacatalog.v1.DeletePolicyTagRequest; +import com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest; +import com.google.cloud.datacatalog.v1.GetPolicyTagRequest; +import com.google.cloud.datacatalog.v1.GetTaxonomyRequest; +import com.google.cloud.datacatalog.v1.ListPolicyTagsRequest; +import com.google.cloud.datacatalog.v1.ListPolicyTagsResponse; +import com.google.cloud.datacatalog.v1.ListTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ListTaxonomiesResponse; +import com.google.cloud.datacatalog.v1.PolicyTag; +import com.google.cloud.datacatalog.v1.Taxonomy; +import com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest; +import com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the PolicyTagManager service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPolicyTagManagerStub extends PolicyTagManagerStub { + private static final MethodDescriptor + createTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/CreateTaxonomy") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Taxonomy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/DeleteTaxonomy") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/UpdateTaxonomy") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Taxonomy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTaxonomiesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/ListTaxonomies") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTaxonomiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTaxonomiesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/GetTaxonomy") + .setRequestMarshaller(ProtoUtils.marshaller(GetTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Taxonomy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createPolicyTagMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/CreatePolicyTag") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePolicyTagRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PolicyTag.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deletePolicyTagMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/DeletePolicyTag") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePolicyTagRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updatePolicyTagMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/UpdatePolicyTag") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePolicyTagRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PolicyTag.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPolicyTagsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/ListPolicyTags") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPolicyTagsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPolicyTagsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getPolicyTagMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/GetPolicyTag") + .setRequestMarshaller(ProtoUtils.marshaller(GetPolicyTagRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PolicyTag.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datacatalog.v1.PolicyTagManager/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createTaxonomyCallable; + private final UnaryCallable deleteTaxonomyCallable; + private final UnaryCallable updateTaxonomyCallable; + private final UnaryCallable listTaxonomiesCallable; + private final UnaryCallable + listTaxonomiesPagedCallable; + private final UnaryCallable getTaxonomyCallable; + private final UnaryCallable createPolicyTagCallable; + private final UnaryCallable deletePolicyTagCallable; + private final UnaryCallable updatePolicyTagCallable; + private final UnaryCallable listPolicyTagsCallable; + private final UnaryCallable + listPolicyTagsPagedCallable; + private final UnaryCallable getPolicyTagCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPolicyTagManagerStub create(PolicyTagManagerStubSettings settings) + throws IOException { + return new GrpcPolicyTagManagerStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPolicyTagManagerStub create(ClientContext clientContext) + throws IOException { + return new GrpcPolicyTagManagerStub( + PolicyTagManagerStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPolicyTagManagerStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPolicyTagManagerStub( + PolicyTagManagerStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPolicyTagManagerStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPolicyTagManagerStub( + PolicyTagManagerStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcPolicyTagManagerCallableFactory()); + } + + /** + * Constructs an instance of GrpcPolicyTagManagerStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcPolicyTagManagerStub( + PolicyTagManagerStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTaxonomyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTaxonomyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTaxonomyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTaxonomyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTaxonomyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTaxonomyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("taxonomy.name", String.valueOf(request.getTaxonomy().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTaxonomiesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTaxonomiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTaxonomiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTaxonomyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTaxonomyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createPolicyTagTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPolicyTagMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreatePolicyTagRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deletePolicyTagTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyTagMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeletePolicyTagRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updatePolicyTagTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyTagMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdatePolicyTagRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("policy_tag.name", String.valueOf(request.getPolicyTag().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listPolicyTagsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPolicyTagsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListPolicyTagsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getPolicyTagTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPolicyTagMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetPolicyTagRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TestIamPermissionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + + this.createTaxonomyCallable = + callableFactory.createUnaryCallable( + createTaxonomyTransportSettings, settings.createTaxonomySettings(), clientContext); + this.deleteTaxonomyCallable = + callableFactory.createUnaryCallable( + deleteTaxonomyTransportSettings, settings.deleteTaxonomySettings(), clientContext); + this.updateTaxonomyCallable = + callableFactory.createUnaryCallable( + updateTaxonomyTransportSettings, settings.updateTaxonomySettings(), clientContext); + this.listTaxonomiesCallable = + callableFactory.createUnaryCallable( + listTaxonomiesTransportSettings, settings.listTaxonomiesSettings(), clientContext); + this.listTaxonomiesPagedCallable = + callableFactory.createPagedCallable( + listTaxonomiesTransportSettings, settings.listTaxonomiesSettings(), clientContext); + this.getTaxonomyCallable = + callableFactory.createUnaryCallable( + getTaxonomyTransportSettings, settings.getTaxonomySettings(), clientContext); + this.createPolicyTagCallable = + callableFactory.createUnaryCallable( + createPolicyTagTransportSettings, settings.createPolicyTagSettings(), clientContext); + this.deletePolicyTagCallable = + callableFactory.createUnaryCallable( + deletePolicyTagTransportSettings, settings.deletePolicyTagSettings(), clientContext); + this.updatePolicyTagCallable = + callableFactory.createUnaryCallable( + updatePolicyTagTransportSettings, settings.updatePolicyTagSettings(), clientContext); + this.listPolicyTagsCallable = + callableFactory.createUnaryCallable( + listPolicyTagsTransportSettings, settings.listPolicyTagsSettings(), clientContext); + this.listPolicyTagsPagedCallable = + callableFactory.createPagedCallable( + listPolicyTagsTransportSettings, settings.listPolicyTagsSettings(), clientContext); + this.getPolicyTagCallable = + callableFactory.createUnaryCallable( + getPolicyTagTransportSettings, settings.getPolicyTagSettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createTaxonomyCallable() { + return createTaxonomyCallable; + } + + @Override + public UnaryCallable deleteTaxonomyCallable() { + return deleteTaxonomyCallable; + } + + @Override + public UnaryCallable updateTaxonomyCallable() { + return updateTaxonomyCallable; + } + + @Override + public UnaryCallable listTaxonomiesCallable() { + return listTaxonomiesCallable; + } + + @Override + public UnaryCallable + listTaxonomiesPagedCallable() { + return listTaxonomiesPagedCallable; + } + + @Override + public UnaryCallable getTaxonomyCallable() { + return getTaxonomyCallable; + } + + @Override + public UnaryCallable createPolicyTagCallable() { + return createPolicyTagCallable; + } + + @Override + public UnaryCallable deletePolicyTagCallable() { + return deletePolicyTagCallable; + } + + @Override + public UnaryCallable updatePolicyTagCallable() { + return updatePolicyTagCallable; + } + + @Override + public UnaryCallable listPolicyTagsCallable() { + return listPolicyTagsCallable; + } + + @Override + public UnaryCallable + listPolicyTagsPagedCallable() { + return listPolicyTagsPagedCallable; + } + + @Override + public UnaryCallable getPolicyTagCallable() { + return getPolicyTagCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStub.java new file mode 100644 index 00000000..9092c8a4 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStub.java @@ -0,0 +1,48 @@ +/* + * 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.datacatalog.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse; +import com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PolicyTagManagerSerialization service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PolicyTagManagerSerializationStub implements BackgroundResource { + + public UnaryCallable + importTaxonomiesCallable() { + throw new UnsupportedOperationException("Not implemented: importTaxonomiesCallable()"); + } + + public UnaryCallable + exportTaxonomiesCallable() { + throw new UnsupportedOperationException("Not implemented: exportTaxonomiesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStubSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStubSettings.java new file mode 100644 index 00000000..8e466cd0 --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStubSettings.java @@ -0,0 +1,298 @@ +/* + * 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.datacatalog.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse; +import com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyTagManagerSerializationStub}. + * + *

    The default instance has everything set to sensible defaults: + * + *

      + *
    • The default service address (datacatalog.googleapis.com) and default port (443) are used. + *
    • Credentials are acquired automatically through Application Default Credentials. + *
    • Retries are configured for idempotent methods but not for non-idempotent methods. + *
    + * + *

    The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

    For example, to set the total timeout of importTaxonomies to 30 seconds: + * + *

    {@code
    + * PolicyTagManagerSerializationStubSettings.Builder policyTagManagerSerializationSettingsBuilder =
    + *     PolicyTagManagerSerializationStubSettings.newBuilder();
    + * policyTagManagerSerializationSettingsBuilder
    + *     .importTaxonomiesSettings()
    + *     .setRetrySettings(
    + *         policyTagManagerSerializationSettingsBuilder
    + *             .importTaxonomiesSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .build());
    + * PolicyTagManagerSerializationStubSettings policyTagManagerSerializationSettings =
    + *     policyTagManagerSerializationSettingsBuilder.build();
    + * }
    + */ +@Generated("by gapic-generator-java") +public class PolicyTagManagerSerializationStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + importTaxonomiesSettings; + private final UnaryCallSettings + exportTaxonomiesSettings; + + /** Returns the object with the settings used for calls to importTaxonomies. */ + public UnaryCallSettings + importTaxonomiesSettings() { + return importTaxonomiesSettings; + } + + /** Returns the object with the settings used for calls to exportTaxonomies. */ + public UnaryCallSettings + exportTaxonomiesSettings() { + return exportTaxonomiesSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PolicyTagManagerSerializationStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPolicyTagManagerSerializationStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "datacatalog.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(PolicyTagManagerSerializationStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyTagManagerSerializationStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + importTaxonomiesSettings = settingsBuilder.importTaxonomiesSettings().build(); + exportTaxonomiesSettings = settingsBuilder.exportTaxonomiesSettings().build(); + } + + /** Builder for PolicyTagManagerSerializationStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + importTaxonomiesSettings; + private final UnaryCallSettings.Builder + exportTaxonomiesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_2_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + importTaxonomiesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportTaxonomiesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + importTaxonomiesSettings, exportTaxonomiesSettings); + initDefaults(this); + } + + protected Builder(PolicyTagManagerSerializationStubSettings settings) { + super(settings); + + importTaxonomiesSettings = settings.importTaxonomiesSettings.toBuilder(); + exportTaxonomiesSettings = settings.exportTaxonomiesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + importTaxonomiesSettings, exportTaxonomiesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .importTaxonomiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .exportTaxonomiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to importTaxonomies. */ + public UnaryCallSettings.Builder + importTaxonomiesSettings() { + return importTaxonomiesSettings; + } + + /** Returns the builder for the settings used for calls to exportTaxonomies. */ + public UnaryCallSettings.Builder + exportTaxonomiesSettings() { + return exportTaxonomiesSettings; + } + + @Override + public PolicyTagManagerSerializationStubSettings build() throws IOException { + return new PolicyTagManagerSerializationStubSettings(this); + } + } +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStub.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStub.java new file mode 100644 index 00000000..a8c31e7b --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStub.java @@ -0,0 +1,120 @@ +/* + * 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.datacatalog.v1.stub; + +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListPolicyTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListTaxonomiesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.CreatePolicyTagRequest; +import com.google.cloud.datacatalog.v1.CreateTaxonomyRequest; +import com.google.cloud.datacatalog.v1.DeletePolicyTagRequest; +import com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest; +import com.google.cloud.datacatalog.v1.GetPolicyTagRequest; +import com.google.cloud.datacatalog.v1.GetTaxonomyRequest; +import com.google.cloud.datacatalog.v1.ListPolicyTagsRequest; +import com.google.cloud.datacatalog.v1.ListPolicyTagsResponse; +import com.google.cloud.datacatalog.v1.ListTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ListTaxonomiesResponse; +import com.google.cloud.datacatalog.v1.PolicyTag; +import com.google.cloud.datacatalog.v1.Taxonomy; +import com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest; +import com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the PolicyTagManager service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PolicyTagManagerStub implements BackgroundResource { + + public UnaryCallable createTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: createTaxonomyCallable()"); + } + + public UnaryCallable deleteTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTaxonomyCallable()"); + } + + public UnaryCallable updateTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: updateTaxonomyCallable()"); + } + + public UnaryCallable + listTaxonomiesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTaxonomiesPagedCallable()"); + } + + public UnaryCallable listTaxonomiesCallable() { + throw new UnsupportedOperationException("Not implemented: listTaxonomiesCallable()"); + } + + public UnaryCallable getTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: getTaxonomyCallable()"); + } + + public UnaryCallable createPolicyTagCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyTagCallable()"); + } + + public UnaryCallable deletePolicyTagCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyTagCallable()"); + } + + public UnaryCallable updatePolicyTagCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyTagCallable()"); + } + + public UnaryCallable + listPolicyTagsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPolicyTagsPagedCallable()"); + } + + public UnaryCallable listPolicyTagsCallable() { + throw new UnsupportedOperationException("Not implemented: listPolicyTagsCallable()"); + } + + public UnaryCallable getPolicyTagCallable() { + throw new UnsupportedOperationException("Not implemented: getPolicyTagCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStubSettings.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStubSettings.java new file mode 100644 index 00000000..749d210c --- /dev/null +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStubSettings.java @@ -0,0 +1,686 @@ +/* + * 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.datacatalog.v1.stub; + +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListPolicyTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListTaxonomiesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datacatalog.v1.CreatePolicyTagRequest; +import com.google.cloud.datacatalog.v1.CreateTaxonomyRequest; +import com.google.cloud.datacatalog.v1.DeletePolicyTagRequest; +import com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest; +import com.google.cloud.datacatalog.v1.GetPolicyTagRequest; +import com.google.cloud.datacatalog.v1.GetTaxonomyRequest; +import com.google.cloud.datacatalog.v1.ListPolicyTagsRequest; +import com.google.cloud.datacatalog.v1.ListPolicyTagsResponse; +import com.google.cloud.datacatalog.v1.ListTaxonomiesRequest; +import com.google.cloud.datacatalog.v1.ListTaxonomiesResponse; +import com.google.cloud.datacatalog.v1.PolicyTag; +import com.google.cloud.datacatalog.v1.Taxonomy; +import com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest; +import com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyTagManagerStub}. + * + *

    The default instance has everything set to sensible defaults: + * + *

      + *
    • The default service address (datacatalog.googleapis.com) and default port (443) are used. + *
    • Credentials are acquired automatically through Application Default Credentials. + *
    • Retries are configured for idempotent methods but not for non-idempotent methods. + *
    + * + *

    The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

    For example, to set the total timeout of createTaxonomy to 30 seconds: + * + *

    {@code
    + * PolicyTagManagerStubSettings.Builder policyTagManagerSettingsBuilder =
    + *     PolicyTagManagerStubSettings.newBuilder();
    + * policyTagManagerSettingsBuilder
    + *     .createTaxonomySettings()
    + *     .setRetrySettings(
    + *         policyTagManagerSettingsBuilder
    + *             .createTaxonomySettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .build());
    + * PolicyTagManagerStubSettings policyTagManagerSettings = policyTagManagerSettingsBuilder.build();
    + * }
    + */ +@Generated("by gapic-generator-java") +public class PolicyTagManagerStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createTaxonomySettings; + private final UnaryCallSettings deleteTaxonomySettings; + private final UnaryCallSettings updateTaxonomySettings; + private final PagedCallSettings< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse> + listTaxonomiesSettings; + private final UnaryCallSettings getTaxonomySettings; + private final UnaryCallSettings createPolicyTagSettings; + private final UnaryCallSettings deletePolicyTagSettings; + private final UnaryCallSettings updatePolicyTagSettings; + private final PagedCallSettings< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse> + listPolicyTagsSettings; + private final UnaryCallSettings getPolicyTagSettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_TAXONOMIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTaxonomiesRequest injectToken(ListTaxonomiesRequest payload, String token) { + return ListTaxonomiesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTaxonomiesRequest injectPageSize( + ListTaxonomiesRequest payload, int pageSize) { + return ListTaxonomiesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTaxonomiesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTaxonomiesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTaxonomiesResponse payload) { + return payload.getTaxonomiesList() == null + ? ImmutableList.of() + : payload.getTaxonomiesList(); + } + }; + + private static final PagedListDescriptor + LIST_POLICY_TAGS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPolicyTagsRequest injectToken(ListPolicyTagsRequest payload, String token) { + return ListPolicyTagsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPolicyTagsRequest injectPageSize( + ListPolicyTagsRequest payload, int pageSize) { + return ListPolicyTagsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPolicyTagsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPolicyTagsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPolicyTagsResponse payload) { + return payload.getPolicyTagsList() == null + ? ImmutableList.of() + : payload.getPolicyTagsList(); + } + }; + + private static final PagedListResponseFactory< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse> + LIST_TAXONOMIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTaxonomiesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TAXONOMIES_PAGE_STR_DESC, request, context); + return ListTaxonomiesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse> + LIST_POLICY_TAGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPolicyTagsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_POLICY_TAGS_PAGE_STR_DESC, request, context); + return ListPolicyTagsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createTaxonomy. */ + public UnaryCallSettings createTaxonomySettings() { + return createTaxonomySettings; + } + + /** Returns the object with the settings used for calls to deleteTaxonomy. */ + public UnaryCallSettings deleteTaxonomySettings() { + return deleteTaxonomySettings; + } + + /** Returns the object with the settings used for calls to updateTaxonomy. */ + public UnaryCallSettings updateTaxonomySettings() { + return updateTaxonomySettings; + } + + /** Returns the object with the settings used for calls to listTaxonomies. */ + public PagedCallSettings< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse> + listTaxonomiesSettings() { + return listTaxonomiesSettings; + } + + /** Returns the object with the settings used for calls to getTaxonomy. */ + public UnaryCallSettings getTaxonomySettings() { + return getTaxonomySettings; + } + + /** Returns the object with the settings used for calls to createPolicyTag. */ + public UnaryCallSettings createPolicyTagSettings() { + return createPolicyTagSettings; + } + + /** Returns the object with the settings used for calls to deletePolicyTag. */ + public UnaryCallSettings deletePolicyTagSettings() { + return deletePolicyTagSettings; + } + + /** Returns the object with the settings used for calls to updatePolicyTag. */ + public UnaryCallSettings updatePolicyTagSettings() { + return updatePolicyTagSettings; + } + + /** Returns the object with the settings used for calls to listPolicyTags. */ + public PagedCallSettings< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse> + listPolicyTagsSettings() { + return listPolicyTagsSettings; + } + + /** Returns the object with the settings used for calls to getPolicyTag. */ + public UnaryCallSettings getPolicyTagSettings() { + return getPolicyTagSettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PolicyTagManagerStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPolicyTagManagerStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "datacatalog.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PolicyTagManagerStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PolicyTagManagerStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTaxonomySettings = settingsBuilder.createTaxonomySettings().build(); + deleteTaxonomySettings = settingsBuilder.deleteTaxonomySettings().build(); + updateTaxonomySettings = settingsBuilder.updateTaxonomySettings().build(); + listTaxonomiesSettings = settingsBuilder.listTaxonomiesSettings().build(); + getTaxonomySettings = settingsBuilder.getTaxonomySettings().build(); + createPolicyTagSettings = settingsBuilder.createPolicyTagSettings().build(); + deletePolicyTagSettings = settingsBuilder.deletePolicyTagSettings().build(); + updatePolicyTagSettings = settingsBuilder.updatePolicyTagSettings().build(); + listPolicyTagsSettings = settingsBuilder.listPolicyTagsSettings().build(); + getPolicyTagSettings = settingsBuilder.getPolicyTagSettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for PolicyTagManagerStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createTaxonomySettings; + private final UnaryCallSettings.Builder deleteTaxonomySettings; + private final UnaryCallSettings.Builder updateTaxonomySettings; + private final PagedCallSettings.Builder< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse> + listTaxonomiesSettings; + private final UnaryCallSettings.Builder getTaxonomySettings; + private final UnaryCallSettings.Builder + createPolicyTagSettings; + private final UnaryCallSettings.Builder deletePolicyTagSettings; + private final UnaryCallSettings.Builder + updatePolicyTagSettings; + private final PagedCallSettings.Builder< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse> + listPolicyTagsSettings; + private final UnaryCallSettings.Builder getPolicyTagSettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTaxonomiesSettings = PagedCallSettings.newBuilder(LIST_TAXONOMIES_PAGE_STR_FACT); + getTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicyTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePolicyTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicyTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPolicyTagsSettings = PagedCallSettings.newBuilder(LIST_POLICY_TAGS_PAGE_STR_FACT); + getPolicyTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTaxonomySettings, + deleteTaxonomySettings, + updateTaxonomySettings, + listTaxonomiesSettings, + getTaxonomySettings, + createPolicyTagSettings, + deletePolicyTagSettings, + updatePolicyTagSettings, + listPolicyTagsSettings, + getPolicyTagSettings, + getIamPolicySettings, + setIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(PolicyTagManagerStubSettings settings) { + super(settings); + + createTaxonomySettings = settings.createTaxonomySettings.toBuilder(); + deleteTaxonomySettings = settings.deleteTaxonomySettings.toBuilder(); + updateTaxonomySettings = settings.updateTaxonomySettings.toBuilder(); + listTaxonomiesSettings = settings.listTaxonomiesSettings.toBuilder(); + getTaxonomySettings = settings.getTaxonomySettings.toBuilder(); + createPolicyTagSettings = settings.createPolicyTagSettings.toBuilder(); + deletePolicyTagSettings = settings.deletePolicyTagSettings.toBuilder(); + updatePolicyTagSettings = settings.updatePolicyTagSettings.toBuilder(); + listPolicyTagsSettings = settings.listPolicyTagsSettings.toBuilder(); + getPolicyTagSettings = settings.getPolicyTagSettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTaxonomySettings, + deleteTaxonomySettings, + updateTaxonomySettings, + listTaxonomiesSettings, + getTaxonomySettings, + createPolicyTagSettings, + deletePolicyTagSettings, + updatePolicyTagSettings, + listPolicyTagsSettings, + getPolicyTagSettings, + getIamPolicySettings, + setIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listTaxonomiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createPolicyTagSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deletePolicyTagSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updatePolicyTagSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listPolicyTagsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getPolicyTagSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

    Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTaxonomy. */ + public UnaryCallSettings.Builder createTaxonomySettings() { + return createTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to deleteTaxonomy. */ + public UnaryCallSettings.Builder deleteTaxonomySettings() { + return deleteTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to updateTaxonomy. */ + public UnaryCallSettings.Builder updateTaxonomySettings() { + return updateTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to listTaxonomies. */ + public PagedCallSettings.Builder< + ListTaxonomiesRequest, ListTaxonomiesResponse, ListTaxonomiesPagedResponse> + listTaxonomiesSettings() { + return listTaxonomiesSettings; + } + + /** Returns the builder for the settings used for calls to getTaxonomy. */ + public UnaryCallSettings.Builder getTaxonomySettings() { + return getTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to createPolicyTag. */ + public UnaryCallSettings.Builder createPolicyTagSettings() { + return createPolicyTagSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicyTag. */ + public UnaryCallSettings.Builder deletePolicyTagSettings() { + return deletePolicyTagSettings; + } + + /** Returns the builder for the settings used for calls to updatePolicyTag. */ + public UnaryCallSettings.Builder updatePolicyTagSettings() { + return updatePolicyTagSettings; + } + + /** Returns the builder for the settings used for calls to listPolicyTags. */ + public PagedCallSettings.Builder< + ListPolicyTagsRequest, ListPolicyTagsResponse, ListPolicyTagsPagedResponse> + listPolicyTagsSettings() { + return listPolicyTagsSettings; + } + + /** Returns the builder for the settings used for calls to getPolicyTag. */ + public UnaryCallSettings.Builder getPolicyTagSettings() { + return getPolicyTagSettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public PolicyTagManagerStubSettings build() throws IOException { + return new PolicyTagManagerStubSettings(this); + } + } +} diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java index bc1dcea5..bc269aa2 100644 --- a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java @@ -651,10 +651,12 @@ public void createEntryTest() throws Exception { Entry.newBuilder() .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString()) .setLinkedResource("linkedResource-495606457") + .setFullyQualifiedName("fullyQualifiedName288467357") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setSchema(Schema.newBuilder().build()) .setSourceSystemTimestamps(SystemTimestamps.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -700,10 +702,12 @@ public void createEntryTest2() throws Exception { Entry.newBuilder() .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString()) .setLinkedResource("linkedResource-495606457") + .setFullyQualifiedName("fullyQualifiedName288467357") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setSchema(Schema.newBuilder().build()) .setSourceSystemTimestamps(SystemTimestamps.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -749,10 +753,12 @@ public void updateEntryTest() throws Exception { Entry.newBuilder() .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString()) .setLinkedResource("linkedResource-495606457") + .setFullyQualifiedName("fullyQualifiedName288467357") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setSchema(Schema.newBuilder().build()) .setSourceSystemTimestamps(SystemTimestamps.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -792,10 +798,12 @@ public void updateEntryTest2() throws Exception { Entry.newBuilder() .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString()) .setLinkedResource("linkedResource-495606457") + .setFullyQualifiedName("fullyQualifiedName288467357") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setSchema(Schema.newBuilder().build()) .setSourceSystemTimestamps(SystemTimestamps.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -906,10 +914,12 @@ public void getEntryTest() throws Exception { Entry.newBuilder() .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString()) .setLinkedResource("linkedResource-495606457") + .setFullyQualifiedName("fullyQualifiedName288467357") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setSchema(Schema.newBuilder().build()) .setSourceSystemTimestamps(SystemTimestamps.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -949,10 +959,12 @@ public void getEntryTest2() throws Exception { Entry.newBuilder() .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString()) .setLinkedResource("linkedResource-495606457") + .setFullyQualifiedName("fullyQualifiedName288467357") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setSchema(Schema.newBuilder().build()) .setSourceSystemTimestamps(SystemTimestamps.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -992,10 +1004,12 @@ public void lookupEntryTest() throws Exception { Entry.newBuilder() .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString()) .setLinkedResource("linkedResource-495606457") + .setFullyQualifiedName("fullyQualifiedName288467357") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") .setSchema(Schema.newBuilder().build()) .setSourceSystemTimestamps(SystemTimestamps.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1010,6 +1024,7 @@ public void lookupEntryTest() throws Exception { Assert.assertEquals(request.getLinkedResource(), actualRequest.getLinkedResource()); Assert.assertEquals(request.getSqlResource(), actualRequest.getSqlResource()); + Assert.assertEquals(request.getFullyQualifiedName(), actualRequest.getFullyQualifiedName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1457,6 +1472,7 @@ public void createTagTemplateFieldTest() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1509,6 +1525,7 @@ public void createTagTemplateFieldTest2() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1561,6 +1578,7 @@ public void updateTagTemplateFieldTest() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1611,6 +1629,7 @@ public void updateTagTemplateFieldTest2() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1659,6 +1678,7 @@ public void updateTagTemplateFieldTest3() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1713,6 +1733,7 @@ public void updateTagTemplateFieldTest4() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1765,6 +1786,7 @@ public void renameTagTemplateFieldTest() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1815,6 +1837,7 @@ public void renameTagTemplateFieldTest2() throws Exception { .setDisplayName("displayName1714148973") .setType(FieldType.newBuilder().build()) .setIsRequired(true) + .setDescription("description-1724546052") .setOrder(106006350) .build(); mockDataCatalog.addResponse(expectedResponse); @@ -1853,6 +1876,118 @@ public void renameTagTemplateFieldExceptionTest2() throws Exception { } } + @Test + public void renameTagTemplateFieldEnumValueTest() throws Exception { + TagTemplateField expectedResponse = + TagTemplateField.newBuilder() + .setName( + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]") + .toString()) + .setDisplayName("displayName1714148973") + .setType(FieldType.newBuilder().build()) + .setIsRequired(true) + .setDescription("description-1724546052") + .setOrder(106006350) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + TagTemplateFieldEnumValueName name = + TagTemplateFieldEnumValueName.of( + "[PROJECT]", + "[LOCATION]", + "[TAG_TEMPLATE]", + "[TAG_TEMPLATE_FIELD_ID]", + "[ENUM_VALUE_DISPLAY_NAME]"); + String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027"; + + TagTemplateField actualResponse = + client.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RenameTagTemplateFieldEnumValueRequest actualRequest = + ((RenameTagTemplateFieldEnumValueRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(newEnumValueDisplayName, actualRequest.getNewEnumValueDisplayName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void renameTagTemplateFieldEnumValueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + TagTemplateFieldEnumValueName name = + TagTemplateFieldEnumValueName.of( + "[PROJECT]", + "[LOCATION]", + "[TAG_TEMPLATE]", + "[TAG_TEMPLATE_FIELD_ID]", + "[ENUM_VALUE_DISPLAY_NAME]"); + String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027"; + client.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void renameTagTemplateFieldEnumValueTest2() throws Exception { + TagTemplateField expectedResponse = + TagTemplateField.newBuilder() + .setName( + TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]") + .toString()) + .setDisplayName("displayName1714148973") + .setType(FieldType.newBuilder().build()) + .setIsRequired(true) + .setDescription("description-1724546052") + .setOrder(106006350) + .build(); + mockDataCatalog.addResponse(expectedResponse); + + String name = "name3373707"; + String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027"; + + TagTemplateField actualResponse = + client.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataCatalog.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RenameTagTemplateFieldEnumValueRequest actualRequest = + ((RenameTagTemplateFieldEnumValueRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(newEnumValueDisplayName, actualRequest.getNewEnumValueDisplayName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void renameTagTemplateFieldEnumValueExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataCatalog.addException(exception); + + try { + String name = "name3373707"; + String newEnumValueDisplayName = "newEnumValueDisplayName-1119629027"; + client.renameTagTemplateFieldEnumValue(name, newEnumValueDisplayName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void deleteTagTemplateFieldTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); @@ -2278,7 +2413,7 @@ public void setIamPolicyTest() throws Exception { .build(); mockDataCatalog.addResponse(expectedResponse); - ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -2302,7 +2437,7 @@ public void setIamPolicyExceptionTest() throws Exception { mockDataCatalog.addException(exception); try { - ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -2364,7 +2499,7 @@ public void getIamPolicyTest() throws Exception { .build(); mockDataCatalog.addResponse(expectedResponse); - ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -2386,7 +2521,7 @@ public void getIamPolicyExceptionTest() throws Exception { mockDataCatalog.addException(exception); try { - ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]"); + ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -2442,7 +2577,7 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() - .setResource(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString()) + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) .addAllPermissions(new ArrayList()) .build(); @@ -2469,8 +2604,7 @@ public void testIamPermissionsExceptionTest() throws Exception { try { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() - .setResource( - TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString()) + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) .addAllPermissions(new ArrayList()) .build(); client.testIamPermissions(request); diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java index 5c030b8a..1c23b34d 100644 --- a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java @@ -458,6 +458,28 @@ public void renameTagTemplateField( } } + @Override + public void renameTagTemplateFieldEnumValue( + RenameTagTemplateFieldEnumValueRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TagTemplateField) { + requests.add(request); + responseObserver.onNext(((TagTemplateField) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RenameTagTemplateFieldEnumValue, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TagTemplateField.class.getName(), + Exception.class.getName()))); + } + } + @Override public void deleteTagTemplateField( DeleteTagTemplateFieldRequest request, StreamObserver responseObserver) { diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManager.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManager.java new file mode 100644 index 00000000..5ae79be1 --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManager.java @@ -0,0 +1,59 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyTagManager implements MockGrpcService { + private final MockPolicyTagManagerImpl serviceImpl; + + public MockPolicyTagManager() { + serviceImpl = new MockPolicyTagManagerImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerImpl.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerImpl.java new file mode 100644 index 00000000..d7a8f9c7 --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerImpl.java @@ -0,0 +1,337 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datacatalog.v1.PolicyTagManagerGrpc.PolicyTagManagerImplBase; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyTagManagerImpl extends PolicyTagManagerImplBase { + private List requests; + private Queue responses; + + public MockPolicyTagManagerImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTaxonomy( + CreateTaxonomyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Taxonomy) { + requests.add(request); + responseObserver.onNext(((Taxonomy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Taxonomy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteTaxonomy( + DeleteTaxonomyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTaxonomy( + UpdateTaxonomyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Taxonomy) { + requests.add(request); + responseObserver.onNext(((Taxonomy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Taxonomy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTaxonomies( + ListTaxonomiesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTaxonomiesResponse) { + requests.add(request); + responseObserver.onNext(((ListTaxonomiesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTaxonomies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTaxonomiesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTaxonomy(GetTaxonomyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Taxonomy) { + requests.add(request); + responseObserver.onNext(((Taxonomy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Taxonomy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPolicyTag( + CreatePolicyTagRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PolicyTag) { + requests.add(request); + responseObserver.onNext(((PolicyTag) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePolicyTag, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PolicyTag.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePolicyTag( + DeletePolicyTagRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePolicyTag, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePolicyTag( + UpdatePolicyTagRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PolicyTag) { + requests.add(request); + responseObserver.onNext(((PolicyTag) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePolicyTag, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PolicyTag.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPolicyTags( + ListPolicyTagsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPolicyTagsResponse) { + requests.add(request); + responseObserver.onNext(((ListPolicyTagsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPolicyTags, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPolicyTagsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPolicyTag( + GetPolicyTagRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PolicyTag) { + requests.add(request); + responseObserver.onNext(((PolicyTag) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPolicyTag, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PolicyTag.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerialization.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerialization.java new file mode 100644 index 00000000..654a2ef6 --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerialization.java @@ -0,0 +1,59 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyTagManagerSerialization implements MockGrpcService { + private final MockPolicyTagManagerSerializationImpl serviceImpl; + + public MockPolicyTagManagerSerialization() { + serviceImpl = new MockPolicyTagManagerSerializationImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerializationImpl.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerializationImpl.java new file mode 100644 index 00000000..27197a3d --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerializationImpl.java @@ -0,0 +1,102 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationGrpc.PolicyTagManagerSerializationImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyTagManagerSerializationImpl extends PolicyTagManagerSerializationImplBase { + private List requests; + private Queue responses; + + public MockPolicyTagManagerSerializationImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void importTaxonomies( + ImportTaxonomiesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ImportTaxonomiesResponse) { + requests.add(request); + responseObserver.onNext(((ImportTaxonomiesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportTaxonomies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ImportTaxonomiesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportTaxonomies( + ExportTaxonomiesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ExportTaxonomiesResponse) { + requests.add(request); + responseObserver.onNext(((ExportTaxonomiesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportTaxonomies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ExportTaxonomiesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClientTest.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClientTest.java new file mode 100644 index 00000000..25cb4059 --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClientTest.java @@ -0,0 +1,995 @@ +/* + * 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.datacatalog.v1; + +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListPolicyTagsPagedResponse; +import static com.google.cloud.datacatalog.v1.PolicyTagManagerClient.ListTaxonomiesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PolicyTagManagerClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockPolicyTagManager mockPolicyTagManager; + private PolicyTagManagerClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockPolicyTagManager = new MockPolicyTagManager(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockPolicyTagManager)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PolicyTagManagerSettings settings = + PolicyTagManagerSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PolicyTagManagerClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createTaxonomyTest() throws Exception { + Taxonomy expectedResponse = + Taxonomy.newBuilder() + .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPolicyTagCount(1074340189) + .setTaxonomyTimestamps(SystemTimestamps.newBuilder().build()) + .addAllActivatedPolicyTypes(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Taxonomy taxonomy = Taxonomy.newBuilder().build(); + + Taxonomy actualResponse = client.createTaxonomy(parent, taxonomy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTaxonomyRequest actualRequest = ((CreateTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(taxonomy, actualRequest.getTaxonomy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Taxonomy taxonomy = Taxonomy.newBuilder().build(); + client.createTaxonomy(parent, taxonomy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTaxonomyTest2() throws Exception { + Taxonomy expectedResponse = + Taxonomy.newBuilder() + .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPolicyTagCount(1074340189) + .setTaxonomyTimestamps(SystemTimestamps.newBuilder().build()) + .addAllActivatedPolicyTypes(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Taxonomy taxonomy = Taxonomy.newBuilder().build(); + + Taxonomy actualResponse = client.createTaxonomy(parent, taxonomy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTaxonomyRequest actualRequest = ((CreateTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(taxonomy, actualRequest.getTaxonomy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTaxonomyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String parent = "parent-995424086"; + Taxonomy taxonomy = Taxonomy.newBuilder().build(); + client.createTaxonomy(parent, taxonomy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteTaxonomyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPolicyTagManager.addResponse(expectedResponse); + + TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + + client.deleteTaxonomy(name); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTaxonomyRequest actualRequest = ((DeleteTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + client.deleteTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteTaxonomyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteTaxonomy(name); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTaxonomyRequest actualRequest = ((DeleteTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTaxonomyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String name = "name3373707"; + client.deleteTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTaxonomyTest() throws Exception { + Taxonomy expectedResponse = + Taxonomy.newBuilder() + .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPolicyTagCount(1074340189) + .setTaxonomyTimestamps(SystemTimestamps.newBuilder().build()) + .addAllActivatedPolicyTypes(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + Taxonomy taxonomy = Taxonomy.newBuilder().build(); + + Taxonomy actualResponse = client.updateTaxonomy(taxonomy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTaxonomyRequest actualRequest = ((UpdateTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(taxonomy, actualRequest.getTaxonomy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + Taxonomy taxonomy = Taxonomy.newBuilder().build(); + client.updateTaxonomy(taxonomy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTaxonomiesTest() throws Exception { + Taxonomy responsesElement = Taxonomy.newBuilder().build(); + ListTaxonomiesResponse expectedResponse = + ListTaxonomiesResponse.newBuilder() + .setNextPageToken("") + .addAllTaxonomies(Arrays.asList(responsesElement)) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListTaxonomiesPagedResponse pagedListResponse = client.listTaxonomies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTaxonomiesList().get(0), resources.get(0)); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTaxonomiesRequest actualRequest = ((ListTaxonomiesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTaxonomiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTaxonomies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTaxonomiesTest2() throws Exception { + Taxonomy responsesElement = Taxonomy.newBuilder().build(); + ListTaxonomiesResponse expectedResponse = + ListTaxonomiesResponse.newBuilder() + .setNextPageToken("") + .addAllTaxonomies(Arrays.asList(responsesElement)) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTaxonomiesPagedResponse pagedListResponse = client.listTaxonomies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTaxonomiesList().get(0), resources.get(0)); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTaxonomiesRequest actualRequest = ((ListTaxonomiesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTaxonomiesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTaxonomies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaxonomyTest() throws Exception { + Taxonomy expectedResponse = + Taxonomy.newBuilder() + .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPolicyTagCount(1074340189) + .setTaxonomyTimestamps(SystemTimestamps.newBuilder().build()) + .addAllActivatedPolicyTypes(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + + Taxonomy actualResponse = client.getTaxonomy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTaxonomyRequest actualRequest = ((GetTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + client.getTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTaxonomyTest2() throws Exception { + Taxonomy expectedResponse = + Taxonomy.newBuilder() + .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPolicyTagCount(1074340189) + .setTaxonomyTimestamps(SystemTimestamps.newBuilder().build()) + .addAllActivatedPolicyTypes(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String name = "name3373707"; + + Taxonomy actualResponse = client.getTaxonomy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTaxonomyRequest actualRequest = ((GetTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTaxonomyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String name = "name3373707"; + client.getTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPolicyTagTest() throws Exception { + PolicyTag expectedResponse = + PolicyTag.newBuilder() + .setName( + PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setParentPolicyTag("parentPolicyTag973173630") + .addAllChildPolicyTags(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + PolicyTag policyTag = PolicyTag.newBuilder().build(); + + PolicyTag actualResponse = client.createPolicyTag(parent, policyTag); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyTagRequest actualRequest = ((CreatePolicyTagRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyTag, actualRequest.getPolicyTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyTagExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + PolicyTag policyTag = PolicyTag.newBuilder().build(); + client.createPolicyTag(parent, policyTag); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPolicyTagTest2() throws Exception { + PolicyTag expectedResponse = + PolicyTag.newBuilder() + .setName( + PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setParentPolicyTag("parentPolicyTag973173630") + .addAllChildPolicyTags(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + PolicyTag policyTag = PolicyTag.newBuilder().build(); + + PolicyTag actualResponse = client.createPolicyTag(parent, policyTag); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyTagRequest actualRequest = ((CreatePolicyTagRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(policyTag, actualRequest.getPolicyTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyTagExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String parent = "parent-995424086"; + PolicyTag policyTag = PolicyTag.newBuilder().build(); + client.createPolicyTag(parent, policyTag); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePolicyTagTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPolicyTagManager.addResponse(expectedResponse); + + PolicyTagName name = PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"); + + client.deletePolicyTag(name); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyTagRequest actualRequest = ((DeletePolicyTagRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyTagExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + PolicyTagName name = + PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"); + client.deletePolicyTag(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePolicyTagTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deletePolicyTag(name); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyTagRequest actualRequest = ((DeletePolicyTagRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyTagExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String name = "name3373707"; + client.deletePolicyTag(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyTagTest() throws Exception { + PolicyTag expectedResponse = + PolicyTag.newBuilder() + .setName( + PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setParentPolicyTag("parentPolicyTag973173630") + .addAllChildPolicyTags(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + PolicyTag policyTag = PolicyTag.newBuilder().build(); + + PolicyTag actualResponse = client.updatePolicyTag(policyTag); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePolicyTagRequest actualRequest = ((UpdatePolicyTagRequest) actualRequests.get(0)); + + Assert.assertEquals(policyTag, actualRequest.getPolicyTag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePolicyTagExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + PolicyTag policyTag = PolicyTag.newBuilder().build(); + client.updatePolicyTag(policyTag); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyTagsTest() throws Exception { + PolicyTag responsesElement = PolicyTag.newBuilder().build(); + ListPolicyTagsResponse expectedResponse = + ListPolicyTagsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyTags(Arrays.asList(responsesElement)) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + + ListPolicyTagsPagedResponse pagedListResponse = client.listPolicyTags(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyTagsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyTagsRequest actualRequest = ((ListPolicyTagsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyTagsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]"); + client.listPolicyTags(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyTagsTest2() throws Exception { + PolicyTag responsesElement = PolicyTag.newBuilder().build(); + ListPolicyTagsResponse expectedResponse = + ListPolicyTagsResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyTags(Arrays.asList(responsesElement)) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPolicyTagsPagedResponse pagedListResponse = client.listPolicyTags(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyTagsList().get(0), resources.get(0)); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyTagsRequest actualRequest = ((ListPolicyTagsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyTagsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPolicyTags(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTagTest() throws Exception { + PolicyTag expectedResponse = + PolicyTag.newBuilder() + .setName( + PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setParentPolicyTag("parentPolicyTag973173630") + .addAllChildPolicyTags(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + PolicyTagName name = PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"); + + PolicyTag actualResponse = client.getPolicyTag(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyTagRequest actualRequest = ((GetPolicyTagRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyTagExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + PolicyTagName name = + PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]"); + client.getPolicyTag(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTagTest2() throws Exception { + PolicyTag expectedResponse = + PolicyTag.newBuilder() + .setName( + PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setParentPolicyTag("parentPolicyTag973173630") + .addAllChildPolicyTags(new ArrayList()) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + String name = "name3373707"; + + PolicyTag actualResponse = client.getPolicyTag(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyTagRequest actualRequest = ((GetPolicyTagRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyTagExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + String name = "name3373707"; + client.getPolicyTag(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockPolicyTagManager.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setPolicy(Policy.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .setPolicy(Policy.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockPolicyTagManager.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManager.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClientTest.java b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClientTest.java new file mode 100644 index 00000000..49d9080c --- /dev/null +++ b/google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClientTest.java @@ -0,0 +1,171 @@ +/* + * 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.datacatalog.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PolicyTagManagerSerializationClientTest { + private static MockServiceHelper mockServiceHelper; + private PolicyTagManagerSerializationClient client; + private static MockPolicyTagManagerSerialization mockPolicyTagManagerSerialization; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockPolicyTagManagerSerialization = new MockPolicyTagManagerSerialization(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockPolicyTagManagerSerialization)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PolicyTagManagerSerializationSettings settings = + PolicyTagManagerSerializationSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PolicyTagManagerSerializationClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void importTaxonomiesTest() throws Exception { + ImportTaxonomiesResponse expectedResponse = + ImportTaxonomiesResponse.newBuilder().addAllTaxonomies(new ArrayList()).build(); + mockPolicyTagManagerSerialization.addResponse(expectedResponse); + + ImportTaxonomiesRequest request = + ImportTaxonomiesRequest.newBuilder() + .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .build(); + + ImportTaxonomiesResponse actualResponse = client.importTaxonomies(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManagerSerialization.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportTaxonomiesRequest actualRequest = ((ImportTaxonomiesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getInlineSource(), actualRequest.getInlineSource()); + Assert.assertEquals(request.getCrossRegionalSource(), actualRequest.getCrossRegionalSource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importTaxonomiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManagerSerialization.addException(exception); + + try { + ImportTaxonomiesRequest request = + ImportTaxonomiesRequest.newBuilder() + .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .build(); + client.importTaxonomies(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportTaxonomiesTest() throws Exception { + ExportTaxonomiesResponse expectedResponse = + ExportTaxonomiesResponse.newBuilder() + .addAllTaxonomies(new ArrayList()) + .build(); + mockPolicyTagManagerSerialization.addResponse(expectedResponse); + + ExportTaxonomiesRequest request = + ExportTaxonomiesRequest.newBuilder() + .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .addAllTaxonomies(new ArrayList()) + .build(); + + ExportTaxonomiesResponse actualResponse = client.exportTaxonomies(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyTagManagerSerialization.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportTaxonomiesRequest actualRequest = ((ExportTaxonomiesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getTaxonomiesList(), actualRequest.getTaxonomiesList()); + Assert.assertEquals(request.getSerializedTaxonomies(), actualRequest.getSerializedTaxonomies()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportTaxonomiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyTagManagerSerialization.addException(exception); + + try { + ExportTaxonomiesRequest request = + ExportTaxonomiesRequest.newBuilder() + .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString()) + .addAllTaxonomies(new ArrayList()) + .build(); + client.exportTaxonomies(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java index 59a2a063..bdbe4968 100644 --- a/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java +++ b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java @@ -897,6 +897,59 @@ private DataCatalogGrpc() {} return getRenameTagTemplateFieldMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getRenameTagTemplateFieldEnumValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RenameTagTemplateFieldEnumValue", + requestType = com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.class, + responseType = com.google.cloud.datacatalog.v1.TagTemplateField.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getRenameTagTemplateFieldEnumValueMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest, + com.google.cloud.datacatalog.v1.TagTemplateField> + getRenameTagTemplateFieldEnumValueMethod; + if ((getRenameTagTemplateFieldEnumValueMethod = + DataCatalogGrpc.getRenameTagTemplateFieldEnumValueMethod) + == null) { + synchronized (DataCatalogGrpc.class) { + if ((getRenameTagTemplateFieldEnumValueMethod = + DataCatalogGrpc.getRenameTagTemplateFieldEnumValueMethod) + == null) { + DataCatalogGrpc.getRenameTagTemplateFieldEnumValueMethod = + getRenameTagTemplateFieldEnumValueMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RenameTagTemplateFieldEnumValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.TagTemplateField + .getDefaultInstance())) + .setSchemaDescriptor( + new DataCatalogMethodDescriptorSupplier( + "RenameTagTemplateFieldEnumValue")) + .build(); + } + } + } + return getRenameTagTemplateFieldEnumValueMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest, com.google.protobuf.Empty> getDeleteTagTemplateFieldMethod; @@ -1292,7 +1345,7 @@ public abstract static class DataCatalogImplBase implements io.grpc.BindableServ * This is a custom method * (https://cloud.google.com/apis/design/custom_methods) and does not return * the complete resource, only the resource identifier and high level - * fields. Clients can subsequentally call `Get` methods. + * fields. Clients can subsequently call `Get` methods. * Note that Data Catalog search queries do not guarantee full recall. Query * results that match your query may not be returned, even in subsequent * result pages. Also note that results returned (and not returned) can vary @@ -1407,8 +1460,8 @@ public void listEntryGroups( * * *
    -     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
    -     * be created.
    +     * Creates an entry. Only entries of types 'FILESET', 'CLUSTER', 'DATA_STREAM'
    +     * or with a user-specified type can be created.
          * Users should enable the Data Catalog API in the project identified by
          * the `parent` parameter (see [Data Catalog Resource Project]
          * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
    @@ -1632,6 +1685,22 @@ public void renameTagTemplateField(
               getRenameTagTemplateFieldMethod(), responseObserver);
         }
     
    +    /**
    +     *
    +     *
    +     * 
    +     * Renames an enum value in a tag template. The enum values have to be unique
    +     * within one enum field.
    +     * 
    + */ + public void renameTagTemplateFieldEnumValue( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRenameTagTemplateFieldEnumValueMethod(), responseObserver); + } + /** * * @@ -1915,6 +1984,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest, com.google.cloud.datacatalog.v1.TagTemplateField>( this, METHODID_RENAME_TAG_TEMPLATE_FIELD))) + .addMethod( + getRenameTagTemplateFieldEnumValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest, + com.google.cloud.datacatalog.v1.TagTemplateField>( + this, METHODID_RENAME_TAG_TEMPLATE_FIELD_ENUM_VALUE))) .addMethod( getDeleteTagTemplateFieldMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1996,7 +2072,7 @@ protected DataCatalogStub build(io.grpc.Channel channel, io.grpc.CallOptions cal * This is a custom method * (https://cloud.google.com/apis/design/custom_methods) and does not return * the complete resource, only the resource identifier and high level - * fields. Clients can subsequentally call `Get` methods. + * fields. Clients can subsequently call `Get` methods. * Note that Data Catalog search queries do not guarantee full recall. Query * results that match your query may not be returned, even in subsequent * result pages. Also note that results returned (and not returned) can vary @@ -2123,8 +2199,8 @@ public void listEntryGroups( * * *
    -     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
    -     * be created.
    +     * Creates an entry. Only entries of types 'FILESET', 'CLUSTER', 'DATA_STREAM'
    +     * or with a user-specified type can be created.
          * Users should enable the Data Catalog API in the project identified by
          * the `parent` parameter (see [Data Catalog Resource Project]
          * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
    @@ -2373,6 +2449,24 @@ public void renameTagTemplateField(
               responseObserver);
         }
     
    +    /**
    +     *
    +     *
    +     * 
    +     * Renames an enum value in a tag template. The enum values have to be unique
    +     * within one enum field.
    +     * 
    + */ + public void renameTagTemplateFieldEnumValue( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRenameTagTemplateFieldEnumValueMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2570,7 +2664,7 @@ protected DataCatalogBlockingStub build( * This is a custom method * (https://cloud.google.com/apis/design/custom_methods) and does not return * the complete resource, only the resource identifier and high level - * fields. Clients can subsequentally call `Get` methods. + * fields. Clients can subsequently call `Get` methods. * Note that Data Catalog search queries do not guarantee full recall. Query * results that match your query may not be returned, even in subsequent * result pages. Also note that results returned (and not returned) can vary @@ -2677,8 +2771,8 @@ public com.google.cloud.datacatalog.v1.ListEntryGroupsResponse listEntryGroups( * * *
    -     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
    -     * be created.
    +     * Creates an entry. Only entries of types 'FILESET', 'CLUSTER', 'DATA_STREAM'
    +     * or with a user-specified type can be created.
          * Users should enable the Data Catalog API in the project identified by
          * the `parent` parameter (see [Data Catalog Resource Project]
          * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
    @@ -2886,6 +2980,20 @@ public com.google.cloud.datacatalog.v1.TagTemplateField renameTagTemplateField(
               getChannel(), getRenameTagTemplateFieldMethod(), getCallOptions(), request);
         }
     
    +    /**
    +     *
    +     *
    +     * 
    +     * Renames an enum value in a tag template. The enum values have to be unique
    +     * within one enum field.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.TagTemplateField renameTagTemplateFieldEnumValue( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRenameTagTemplateFieldEnumValueMethod(), getCallOptions(), request); + } + /** * * @@ -3063,7 +3171,7 @@ protected DataCatalogFutureStub build( * This is a custom method * (https://cloud.google.com/apis/design/custom_methods) and does not return * the complete resource, only the resource identifier and high level - * fields. Clients can subsequentally call `Get` methods. + * fields. Clients can subsequently call `Get` methods. * Note that Data Catalog search queries do not guarantee full recall. Query * results that match your query may not be returned, even in subsequent * result pages. Also note that results returned (and not returned) can vary @@ -3175,8 +3283,8 @@ protected DataCatalogFutureStub build( * * *
    -     * Creates an entry. Only entries of 'FILESET' type or user-specified type can
    -     * be created.
    +     * Creates an entry. Only entries of types 'FILESET', 'CLUSTER', 'DATA_STREAM'
    +     * or with a user-specified type can be created.
          * Users should enable the Data Catalog API in the project identified by
          * the `parent` parameter (see [Data Catalog Resource Project]
          * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for
    @@ -3394,6 +3502,23 @@ protected DataCatalogFutureStub build(
               getChannel().newCall(getRenameTagTemplateFieldMethod(), getCallOptions()), request);
         }
     
    +    /**
    +     *
    +     *
    +     * 
    +     * Renames an enum value in a tag template. The enum values have to be unique
    +     * within one enum field.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.TagTemplateField> + renameTagTemplateFieldEnumValue( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRenameTagTemplateFieldEnumValueMethod(), getCallOptions()), + request); + } + /** * * @@ -3566,14 +3691,15 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3703,6 +3829,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_RENAME_TAG_TEMPLATE_FIELD_ENUM_VALUE: + serviceImpl.renameTagTemplateFieldEnumValue( + (com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_DELETE_TAG_TEMPLATE_FIELD: serviceImpl.deleteTagTemplateField( (com.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) request, @@ -3828,6 +3960,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateTagTemplateFieldMethod()) .addMethod(getUpdateTagTemplateFieldMethod()) .addMethod(getRenameTagTemplateFieldMethod()) + .addMethod(getRenameTagTemplateFieldEnumValueMethod()) .addMethod(getDeleteTagTemplateFieldMethod()) .addMethod(getCreateTagMethod()) .addMethod(getUpdateTagMethod()) diff --git a/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerGrpc.java b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerGrpc.java new file mode 100644 index 00000000..6b179377 --- /dev/null +++ b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerGrpc.java @@ -0,0 +1,1805 @@ +/* + * Copyright 2020 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.datacatalog.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
    + * Policy Tag Manager API service allows clients to manage their policy tags and
    + * taxonomies.
    + * Policy tags are used to tag BigQuery columns and apply additional access
    + * control policies. A taxonomy is a hierarchical grouping of policy tags that
    + * classify data along a common axis.
    + * 
    + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/datacatalog/v1/policytagmanager.proto") +public final class PolicyTagManagerGrpc { + + private PolicyTagManagerGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.datacatalog.v1.PolicyTagManager"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getCreateTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTaxonomy", + requestType = com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.class, + responseType = com.google.cloud.datacatalog.v1.Taxonomy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getCreateTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getCreateTaxonomyMethod; + if ((getCreateTaxonomyMethod = PolicyTagManagerGrpc.getCreateTaxonomyMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getCreateTaxonomyMethod = PolicyTagManagerGrpc.getCreateTaxonomyMethod) == null) { + PolicyTagManagerGrpc.getCreateTaxonomyMethod = + getCreateTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("CreateTaxonomy")) + .build(); + } + } + } + return getCreateTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest, com.google.protobuf.Empty> + getDeleteTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTaxonomy", + requestType = com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest, com.google.protobuf.Empty> + getDeleteTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest, com.google.protobuf.Empty> + getDeleteTaxonomyMethod; + if ((getDeleteTaxonomyMethod = PolicyTagManagerGrpc.getDeleteTaxonomyMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getDeleteTaxonomyMethod = PolicyTagManagerGrpc.getDeleteTaxonomyMethod) == null) { + PolicyTagManagerGrpc.getDeleteTaxonomyMethod = + getDeleteTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("DeleteTaxonomy")) + .build(); + } + } + } + return getDeleteTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getUpdateTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTaxonomy", + requestType = com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.class, + responseType = com.google.cloud.datacatalog.v1.Taxonomy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getUpdateTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getUpdateTaxonomyMethod; + if ((getUpdateTaxonomyMethod = PolicyTagManagerGrpc.getUpdateTaxonomyMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getUpdateTaxonomyMethod = PolicyTagManagerGrpc.getUpdateTaxonomyMethod) == null) { + PolicyTagManagerGrpc.getUpdateTaxonomyMethod = + getUpdateTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("UpdateTaxonomy")) + .build(); + } + } + } + return getUpdateTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse> + getListTaxonomiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTaxonomies", + requestType = com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.class, + responseType = com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse> + getListTaxonomiesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse> + getListTaxonomiesMethod; + if ((getListTaxonomiesMethod = PolicyTagManagerGrpc.getListTaxonomiesMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getListTaxonomiesMethod = PolicyTagManagerGrpc.getListTaxonomiesMethod) == null) { + PolicyTagManagerGrpc.getListTaxonomiesMethod = + getListTaxonomiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTaxonomies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("ListTaxonomies")) + .build(); + } + } + } + return getListTaxonomiesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getGetTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTaxonomy", + requestType = com.google.cloud.datacatalog.v1.GetTaxonomyRequest.class, + responseType = com.google.cloud.datacatalog.v1.Taxonomy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getGetTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy> + getGetTaxonomyMethod; + if ((getGetTaxonomyMethod = PolicyTagManagerGrpc.getGetTaxonomyMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getGetTaxonomyMethod = PolicyTagManagerGrpc.getGetTaxonomyMethod) == null) { + PolicyTagManagerGrpc.getGetTaxonomyMethod = + getGetTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.GetTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("GetTaxonomy")) + .build(); + } + } + } + return getGetTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getCreatePolicyTagMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePolicyTag", + requestType = com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.class, + responseType = com.google.cloud.datacatalog.v1.PolicyTag.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getCreatePolicyTagMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getCreatePolicyTagMethod; + if ((getCreatePolicyTagMethod = PolicyTagManagerGrpc.getCreatePolicyTagMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getCreatePolicyTagMethod = PolicyTagManagerGrpc.getCreatePolicyTagMethod) == null) { + PolicyTagManagerGrpc.getCreatePolicyTagMethod = + getCreatePolicyTagMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreatePolicyTag")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("CreatePolicyTag")) + .build(); + } + } + } + return getCreatePolicyTagMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest, com.google.protobuf.Empty> + getDeletePolicyTagMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePolicyTag", + requestType = com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest, com.google.protobuf.Empty> + getDeletePolicyTagMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest, com.google.protobuf.Empty> + getDeletePolicyTagMethod; + if ((getDeletePolicyTagMethod = PolicyTagManagerGrpc.getDeletePolicyTagMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getDeletePolicyTagMethod = PolicyTagManagerGrpc.getDeletePolicyTagMethod) == null) { + PolicyTagManagerGrpc.getDeletePolicyTagMethod = + getDeletePolicyTagMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeletePolicyTag")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("DeletePolicyTag")) + .build(); + } + } + } + return getDeletePolicyTagMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getUpdatePolicyTagMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePolicyTag", + requestType = com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.class, + responseType = com.google.cloud.datacatalog.v1.PolicyTag.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getUpdatePolicyTagMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getUpdatePolicyTagMethod; + if ((getUpdatePolicyTagMethod = PolicyTagManagerGrpc.getUpdatePolicyTagMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getUpdatePolicyTagMethod = PolicyTagManagerGrpc.getUpdatePolicyTagMethod) == null) { + PolicyTagManagerGrpc.getUpdatePolicyTagMethod = + getUpdatePolicyTagMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicyTag")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("UpdatePolicyTag")) + .build(); + } + } + } + return getUpdatePolicyTagMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest, + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse> + getListPolicyTagsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPolicyTags", + requestType = com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.class, + responseType = com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest, + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse> + getListPolicyTagsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest, + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse> + getListPolicyTagsMethod; + if ((getListPolicyTagsMethod = PolicyTagManagerGrpc.getListPolicyTagsMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getListPolicyTagsMethod = PolicyTagManagerGrpc.getListPolicyTagsMethod) == null) { + PolicyTagManagerGrpc.getListPolicyTagsMethod = + getListPolicyTagsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyTags")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("ListPolicyTags")) + .build(); + } + } + } + return getListPolicyTagsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetPolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getGetPolicyTagMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicyTag", + requestType = com.google.cloud.datacatalog.v1.GetPolicyTagRequest.class, + responseType = com.google.cloud.datacatalog.v1.PolicyTag.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetPolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getGetPolicyTagMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.GetPolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag> + getGetPolicyTagMethod; + if ((getGetPolicyTagMethod = PolicyTagManagerGrpc.getGetPolicyTagMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getGetPolicyTagMethod = PolicyTagManagerGrpc.getGetPolicyTagMethod) == null) { + PolicyTagManagerGrpc.getGetPolicyTagMethod = + getGetPolicyTagMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyTag")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.GetPolicyTagRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("GetPolicyTag")) + .build(); + } + } + } + return getGetPolicyTagMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", + requestType = com.google.iam.v1.GetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod() { + io.grpc.MethodDescriptor + getGetIamPolicyMethod; + if ((getGetIamPolicyMethod = PolicyTagManagerGrpc.getGetIamPolicyMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getGetIamPolicyMethod = PolicyTagManagerGrpc.getGetIamPolicyMethod) == null) { + PolicyTagManagerGrpc.getGetIamPolicyMethod = + getGetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("GetIamPolicy")) + .build(); + } + } + } + return getGetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", + requestType = com.google.iam.v1.SetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod() { + io.grpc.MethodDescriptor + getSetIamPolicyMethod; + if ((getSetIamPolicyMethod = PolicyTagManagerGrpc.getSetIamPolicyMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getSetIamPolicyMethod = PolicyTagManagerGrpc.getSetIamPolicyMethod) == null) { + PolicyTagManagerGrpc.getSetIamPolicyMethod = + getSetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("SetIamPolicy")) + .build(); + } + } + } + return getSetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TestIamPermissions", + requestType = com.google.iam.v1.TestIamPermissionsRequest.class, + responseType = com.google.iam.v1.TestIamPermissionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse> + getTestIamPermissionsMethod; + if ((getTestIamPermissionsMethod = PolicyTagManagerGrpc.getTestIamPermissionsMethod) == null) { + synchronized (PolicyTagManagerGrpc.class) { + if ((getTestIamPermissionsMethod = PolicyTagManagerGrpc.getTestIamPermissionsMethod) + == null) { + PolicyTagManagerGrpc.getTestIamPermissionsMethod = + getTestIamPermissionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TestIamPermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerMethodDescriptorSupplier("TestIamPermissions")) + .build(); + } + } + } + return getTestIamPermissionsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PolicyTagManagerStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyTagManagerStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerStub(channel, callOptions); + } + }; + return PolicyTagManagerStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PolicyTagManagerBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyTagManagerBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerBlockingStub(channel, callOptions); + } + }; + return PolicyTagManagerBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PolicyTagManagerFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyTagManagerFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerFutureStub(channel, callOptions); + } + }; + return PolicyTagManagerFutureStub.newStub(factory, channel); + } + + /** + * + * + *
    +   * Policy Tag Manager API service allows clients to manage their policy tags and
    +   * taxonomies.
    +   * Policy tags are used to tag BigQuery columns and apply additional access
    +   * control policies. A taxonomy is a hierarchical grouping of policy tags that
    +   * classify data along a common axis.
    +   * 
    + */ + public abstract static class PolicyTagManagerImplBase implements io.grpc.BindableService { + + /** + * + * + *
    +     * Creates a taxonomy in a specified project. The taxonomy is initially empty,
    +     * i.e., does not contain policy tags.
    +     * 
    + */ + public void createTaxonomy( + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
    +     * Deletes a taxonomy. This method will also delete all policy tags in this
    +     * taxonomy, their associated policies, and the policy tags references from
    +     * BigQuery columns.
    +     * 
    + */ + public void deleteTaxonomy( + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
    +     * Updates a taxonomy. This method can update the taxonomy's display name,
    +     * description, and activated policy types.
    +     * 
    + */ + public void updateTaxonomy( + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
    +     * Lists all taxonomies in a project in a particular location that the caller
    +     * has permission to view.
    +     * 
    + */ + public void listTaxonomies( + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTaxonomiesMethod(), responseObserver); + } + + /** + * + * + *
    +     * Gets a taxonomy.
    +     * 
    + */ + public void getTaxonomy( + com.google.cloud.datacatalog.v1.GetTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
    +     * Creates a policy tag in a taxonomy.
    +     * 
    + */ + public void createPolicyTag( + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePolicyTagMethod(), responseObserver); + } + + /** + * + * + *
    +     * Deletes a policy tag. This method also deletes
    +     *   - all of its descendant policy tags, if any,
    +     *   - the policies associated with the policy tag and its descendants, and
    +     *   - references from BigQuery table schema of the policy tag and its
    +     *     descendants.
    +     * 
    + */ + public void deletePolicyTag( + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePolicyTagMethod(), responseObserver); + } + + /** + * + * + *
    +     * Updates a policy tag. This method can update the policy tag's display
    +     * name, description, and parent policy tag.
    +     * 
    + */ + public void updatePolicyTag( + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePolicyTagMethod(), responseObserver); + } + + /** + * + * + *
    +     * Lists all policy tags in a taxonomy.
    +     * 
    + */ + public void listPolicyTags( + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPolicyTagsMethod(), responseObserver); + } + + /** + * + * + *
    +     * Gets a policy tag.
    +     * 
    + */ + public void getPolicyTag( + com.google.cloud.datacatalog.v1.GetPolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPolicyTagMethod(), responseObserver); + } + + /** + * + * + *
    +     * Gets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
    +     * Sets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
    +     * Returns the permissions that a caller has on a specified policy tag or
    +     * taxonomy.
    +     * 
    + */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getTestIamPermissionsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy>(this, METHODID_CREATE_TAXONOMY))) + .addMethod( + getDeleteTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_TAXONOMY))) + .addMethod( + getUpdateTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy>(this, METHODID_UPDATE_TAXONOMY))) + .addMethod( + getListTaxonomiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse>( + this, METHODID_LIST_TAXONOMIES))) + .addMethod( + getGetTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.GetTaxonomyRequest, + com.google.cloud.datacatalog.v1.Taxonomy>(this, METHODID_GET_TAXONOMY))) + .addMethod( + getCreatePolicyTagMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag>(this, METHODID_CREATE_POLICY_TAG))) + .addMethod( + getDeletePolicyTagMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_POLICY_TAG))) + .addMethod( + getUpdatePolicyTagMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag>(this, METHODID_UPDATE_POLICY_TAG))) + .addMethod( + getListPolicyTagsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest, + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse>( + this, METHODID_LIST_POLICY_TAGS))) + .addMethod( + getGetPolicyTagMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.GetPolicyTagRequest, + com.google.cloud.datacatalog.v1.PolicyTag>(this, METHODID_GET_POLICY_TAG))) + .addMethod( + getGetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy>( + this, METHODID_GET_IAM_POLICY))) + .addMethod( + getSetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy>( + this, METHODID_SET_IAM_POLICY))) + .addMethod( + getTestIamPermissionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse>( + this, METHODID_TEST_IAM_PERMISSIONS))) + .build(); + } + } + + /** + * + * + *
    +   * Policy Tag Manager API service allows clients to manage their policy tags and
    +   * taxonomies.
    +   * Policy tags are used to tag BigQuery columns and apply additional access
    +   * control policies. A taxonomy is a hierarchical grouping of policy tags that
    +   * classify data along a common axis.
    +   * 
    + */ + public static final class PolicyTagManagerStub + extends io.grpc.stub.AbstractAsyncStub { + private PolicyTagManagerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyTagManagerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a taxonomy in a specified project. The taxonomy is initially empty,
    +     * i.e., does not contain policy tags.
    +     * 
    + */ + public void createTaxonomy( + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Deletes a taxonomy. This method will also delete all policy tags in this
    +     * taxonomy, their associated policies, and the policy tags references from
    +     * BigQuery columns.
    +     * 
    + */ + public void deleteTaxonomy( + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Updates a taxonomy. This method can update the taxonomy's display name,
    +     * description, and activated policy types.
    +     * 
    + */ + public void updateTaxonomy( + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Lists all taxonomies in a project in a particular location that the caller
    +     * has permission to view.
    +     * 
    + */ + public void listTaxonomies( + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTaxonomiesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Gets a taxonomy.
    +     * 
    + */ + public void getTaxonomy( + com.google.cloud.datacatalog.v1.GetTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Creates a policy tag in a taxonomy.
    +     * 
    + */ + public void createPolicyTag( + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePolicyTagMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Deletes a policy tag. This method also deletes
    +     *   - all of its descendant policy tags, if any,
    +     *   - the policies associated with the policy tag and its descendants, and
    +     *   - references from BigQuery table schema of the policy tag and its
    +     *     descendants.
    +     * 
    + */ + public void deletePolicyTag( + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePolicyTagMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Updates a policy tag. This method can update the policy tag's display
    +     * name, description, and parent policy tag.
    +     * 
    + */ + public void updatePolicyTag( + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePolicyTagMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Lists all policy tags in a taxonomy.
    +     * 
    + */ + public void listPolicyTags( + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPolicyTagsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Gets a policy tag.
    +     * 
    + */ + public void getPolicyTag( + com.google.cloud.datacatalog.v1.GetPolicyTagRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyTagMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Gets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Sets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Returns the permissions that a caller has on a specified policy tag or
    +     * taxonomy.
    +     * 
    + */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
    +   * Policy Tag Manager API service allows clients to manage their policy tags and
    +   * taxonomies.
    +   * Policy tags are used to tag BigQuery columns and apply additional access
    +   * control policies. A taxonomy is a hierarchical grouping of policy tags that
    +   * classify data along a common axis.
    +   * 
    + */ + public static final class PolicyTagManagerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyTagManagerBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyTagManagerBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerBlockingStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a taxonomy in a specified project. The taxonomy is initially empty,
    +     * i.e., does not contain policy tags.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.Taxonomy createTaxonomy( + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes a taxonomy. This method will also delete all policy tags in this
    +     * taxonomy, their associated policies, and the policy tags references from
    +     * BigQuery columns.
    +     * 
    + */ + public com.google.protobuf.Empty deleteTaxonomy( + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates a taxonomy. This method can update the taxonomy's display name,
    +     * description, and activated policy types.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.Taxonomy updateTaxonomy( + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists all taxonomies in a project in a particular location that the caller
    +     * has permission to view.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.ListTaxonomiesResponse listTaxonomies( + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTaxonomiesMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets a taxonomy.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomy( + com.google.cloud.datacatalog.v1.GetTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Creates a policy tag in a taxonomy.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.PolicyTag createPolicyTag( + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyTagMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Deletes a policy tag. This method also deletes
    +     *   - all of its descendant policy tags, if any,
    +     *   - the policies associated with the policy tag and its descendants, and
    +     *   - references from BigQuery table schema of the policy tag and its
    +     *     descendants.
    +     * 
    + */ + public com.google.protobuf.Empty deletePolicyTag( + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyTagMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Updates a policy tag. This method can update the policy tag's display
    +     * name, description, and parent policy tag.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.PolicyTag updatePolicyTag( + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyTagMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Lists all policy tags in a taxonomy.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.ListPolicyTagsResponse listPolicyTags( + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPolicyTagsMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets a policy tag.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.PolicyTag getPolicyTag( + com.google.cloud.datacatalog.v1.GetPolicyTagRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyTagMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Gets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Sets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Returns the permissions that a caller has on a specified policy tag or
    +     * taxonomy.
    +     * 
    + */ + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
    +   * Policy Tag Manager API service allows clients to manage their policy tags and
    +   * taxonomies.
    +   * Policy tags are used to tag BigQuery columns and apply additional access
    +   * control policies. A taxonomy is a hierarchical grouping of policy tags that
    +   * classify data along a common axis.
    +   * 
    + */ + public static final class PolicyTagManagerFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PolicyTagManagerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyTagManagerFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerFutureStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates a taxonomy in a specified project. The taxonomy is initially empty,
    +     * i.e., does not contain policy tags.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.Taxonomy> + createTaxonomy(com.google.cloud.datacatalog.v1.CreateTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Deletes a taxonomy. This method will also delete all policy tags in this
    +     * taxonomy, their associated policies, and the policy tags references from
    +     * BigQuery columns.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + deleteTaxonomy(com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Updates a taxonomy. This method can update the taxonomy's display name,
    +     * description, and activated policy types.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.Taxonomy> + updateTaxonomy(com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Lists all taxonomies in a project in a particular location that the caller
    +     * has permission to view.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse> + listTaxonomies(com.google.cloud.datacatalog.v1.ListTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTaxonomiesMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Gets a taxonomy.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.Taxonomy> + getTaxonomy(com.google.cloud.datacatalog.v1.GetTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Creates a policy tag in a taxonomy.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.PolicyTag> + createPolicyTag(com.google.cloud.datacatalog.v1.CreatePolicyTagRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePolicyTagMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Deletes a policy tag. This method also deletes
    +     *   - all of its descendant policy tags, if any,
    +     *   - the policies associated with the policy tag and its descendants, and
    +     *   - references from BigQuery table schema of the policy tag and its
    +     *     descendants.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + deletePolicyTag(com.google.cloud.datacatalog.v1.DeletePolicyTagRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePolicyTagMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Updates a policy tag. This method can update the policy tag's display
    +     * name, description, and parent policy tag.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.PolicyTag> + updatePolicyTag(com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePolicyTagMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Lists all policy tags in a taxonomy.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse> + listPolicyTags(com.google.cloud.datacatalog.v1.ListPolicyTagsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPolicyTagsMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Gets a policy tag.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.PolicyTag> + getPolicyTag(com.google.cloud.datacatalog.v1.GetPolicyTagRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyTagMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Gets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Sets the IAM policy for a policy tag or a taxonomy.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Returns the permissions that a caller has on a specified policy tag or
    +     * taxonomy.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v1.TestIamPermissionsResponse> + testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TAXONOMY = 0; + private static final int METHODID_DELETE_TAXONOMY = 1; + private static final int METHODID_UPDATE_TAXONOMY = 2; + private static final int METHODID_LIST_TAXONOMIES = 3; + private static final int METHODID_GET_TAXONOMY = 4; + private static final int METHODID_CREATE_POLICY_TAG = 5; + private static final int METHODID_DELETE_POLICY_TAG = 6; + private static final int METHODID_UPDATE_POLICY_TAG = 7; + private static final int METHODID_LIST_POLICY_TAGS = 8; + private static final int METHODID_GET_POLICY_TAG = 9; + private static final int METHODID_GET_IAM_POLICY = 10; + private static final int METHODID_SET_IAM_POLICY = 11; + private static final int METHODID_TEST_IAM_PERMISSIONS = 12; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final PolicyTagManagerImplBase serviceImpl; + private final int methodId; + + MethodHandlers(PolicyTagManagerImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TAXONOMY: + serviceImpl.createTaxonomy( + (com.google.cloud.datacatalog.v1.CreateTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_TAXONOMY: + serviceImpl.deleteTaxonomy( + (com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_TAXONOMY: + serviceImpl.updateTaxonomy( + (com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TAXONOMIES: + serviceImpl.listTaxonomies( + (com.google.cloud.datacatalog.v1.ListTaxonomiesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TAXONOMY: + serviceImpl.getTaxonomy( + (com.google.cloud.datacatalog.v1.GetTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_POLICY_TAG: + serviceImpl.createPolicyTag( + (com.google.cloud.datacatalog.v1.CreatePolicyTagRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_POLICY_TAG: + serviceImpl.deletePolicyTag( + (com.google.cloud.datacatalog.v1.DeletePolicyTagRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_POLICY_TAG: + serviceImpl.updatePolicyTag( + (com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_POLICY_TAGS: + serviceImpl.listPolicyTags( + (com.google.cloud.datacatalog.v1.ListPolicyTagsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_POLICY_TAG: + serviceImpl.getPolicyTag( + (com.google.cloud.datacatalog.v1.GetPolicyTagRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_IAM_POLICY: + serviceImpl.getIamPolicy( + (com.google.iam.v1.GetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_IAM_POLICY: + serviceImpl.setIamPolicy( + (com.google.iam.v1.SetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TEST_IAM_PERMISSIONS: + serviceImpl.testIamPermissions( + (com.google.iam.v1.TestIamPermissionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class PolicyTagManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PolicyTagManagerBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PolicyTagManager"); + } + } + + private static final class PolicyTagManagerFileDescriptorSupplier + extends PolicyTagManagerBaseDescriptorSupplier { + PolicyTagManagerFileDescriptorSupplier() {} + } + + private static final class PolicyTagManagerMethodDescriptorSupplier + extends PolicyTagManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + PolicyTagManagerMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PolicyTagManagerGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PolicyTagManagerFileDescriptorSupplier()) + .addMethod(getCreateTaxonomyMethod()) + .addMethod(getDeleteTaxonomyMethod()) + .addMethod(getUpdateTaxonomyMethod()) + .addMethod(getListTaxonomiesMethod()) + .addMethod(getGetTaxonomyMethod()) + .addMethod(getCreatePolicyTagMethod()) + .addMethod(getDeletePolicyTagMethod()) + .addMethod(getUpdatePolicyTagMethod()) + .addMethod(getListPolicyTagsMethod()) + .addMethod(getGetPolicyTagMethod()) + .addMethod(getGetIamPolicyMethod()) + .addMethod(getSetIamPolicyMethod()) + .addMethod(getTestIamPermissionsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationGrpc.java b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationGrpc.java new file mode 100644 index 00000000..91effb63 --- /dev/null +++ b/grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationGrpc.java @@ -0,0 +1,550 @@ +/* + * Copyright 2020 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.datacatalog.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
    + * Policy Tag Manager serialization API service allows clients to manipulate
    + * their policy tags and taxonomies in serialized format, where taxonomy is a
    + * hierarchical group of policy tags.
    + * 
    + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto") +public final class PolicyTagManagerSerializationGrpc { + + private PolicyTagManagerSerializationGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.datacatalog.v1.PolicyTagManagerSerialization"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse> + getImportTaxonomiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportTaxonomies", + requestType = com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.class, + responseType = com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse> + getImportTaxonomiesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse> + getImportTaxonomiesMethod; + if ((getImportTaxonomiesMethod = PolicyTagManagerSerializationGrpc.getImportTaxonomiesMethod) + == null) { + synchronized (PolicyTagManagerSerializationGrpc.class) { + if ((getImportTaxonomiesMethod = + PolicyTagManagerSerializationGrpc.getImportTaxonomiesMethod) + == null) { + PolicyTagManagerSerializationGrpc.getImportTaxonomiesMethod = + getImportTaxonomiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportTaxonomies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerSerializationMethodDescriptorSupplier( + "ImportTaxonomies")) + .build(); + } + } + } + return getImportTaxonomiesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse> + getExportTaxonomiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportTaxonomies", + requestType = com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.class, + responseType = com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse> + getExportTaxonomiesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse> + getExportTaxonomiesMethod; + if ((getExportTaxonomiesMethod = PolicyTagManagerSerializationGrpc.getExportTaxonomiesMethod) + == null) { + synchronized (PolicyTagManagerSerializationGrpc.class) { + if ((getExportTaxonomiesMethod = + PolicyTagManagerSerializationGrpc.getExportTaxonomiesMethod) + == null) { + PolicyTagManagerSerializationGrpc.getExportTaxonomiesMethod = + getExportTaxonomiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportTaxonomies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyTagManagerSerializationMethodDescriptorSupplier( + "ExportTaxonomies")) + .build(); + } + } + } + return getExportTaxonomiesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PolicyTagManagerSerializationStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyTagManagerSerializationStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerSerializationStub(channel, callOptions); + } + }; + return PolicyTagManagerSerializationStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PolicyTagManagerSerializationBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyTagManagerSerializationBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerSerializationBlockingStub(channel, callOptions); + } + }; + return PolicyTagManagerSerializationBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PolicyTagManagerSerializationFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyTagManagerSerializationFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerSerializationFutureStub(channel, callOptions); + } + }; + return PolicyTagManagerSerializationFutureStub.newStub(factory, channel); + } + + /** + * + * + *
    +   * Policy Tag Manager serialization API service allows clients to manipulate
    +   * their policy tags and taxonomies in serialized format, where taxonomy is a
    +   * hierarchical group of policy tags.
    +   * 
    + */ + public abstract static class PolicyTagManagerSerializationImplBase + implements io.grpc.BindableService { + + /** + * + * + *
    +     * Creates new taxonomies (including their policy tags) by importing from
    +     * inlined source or cross-regional source. New taxonomies will be created in
    +     * a given parent project.
    +     * If using the cross-regional source, a new taxonomy is created by copying
    +     * from a source in another region.
    +     * If using the inlined source, this method provides a way to bulk create
    +     * taxonomies and policy tags using nested proto structure.
    +     * 
    + */ + public void importTaxonomies( + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportTaxonomiesMethod(), responseObserver); + } + + /** + * + * + *
    +     * Exports taxonomies as the requested type and returns the taxonomies
    +     * including their policy tags. The requested taxonomies must belong to one
    +     * project.
    +     * SerializedTaxonomy protos with nested policy tags that are generated by
    +     * this method can be used as input for future ImportTaxonomies calls.
    +     * 
    + */ + public void exportTaxonomies( + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportTaxonomiesMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getImportTaxonomiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse>( + this, METHODID_IMPORT_TAXONOMIES))) + .addMethod( + getExportTaxonomiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest, + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse>( + this, METHODID_EXPORT_TAXONOMIES))) + .build(); + } + } + + /** + * + * + *
    +   * Policy Tag Manager serialization API service allows clients to manipulate
    +   * their policy tags and taxonomies in serialized format, where taxonomy is a
    +   * hierarchical group of policy tags.
    +   * 
    + */ + public static final class PolicyTagManagerSerializationStub + extends io.grpc.stub.AbstractAsyncStub { + private PolicyTagManagerSerializationStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyTagManagerSerializationStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerSerializationStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates new taxonomies (including their policy tags) by importing from
    +     * inlined source or cross-regional source. New taxonomies will be created in
    +     * a given parent project.
    +     * If using the cross-regional source, a new taxonomy is created by copying
    +     * from a source in another region.
    +     * If using the inlined source, this method provides a way to bulk create
    +     * taxonomies and policy tags using nested proto structure.
    +     * 
    + */ + public void importTaxonomies( + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportTaxonomiesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
    +     * Exports taxonomies as the requested type and returns the taxonomies
    +     * including their policy tags. The requested taxonomies must belong to one
    +     * project.
    +     * SerializedTaxonomy protos with nested policy tags that are generated by
    +     * this method can be used as input for future ImportTaxonomies calls.
    +     * 
    + */ + public void exportTaxonomies( + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportTaxonomiesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
    +   * Policy Tag Manager serialization API service allows clients to manipulate
    +   * their policy tags and taxonomies in serialized format, where taxonomy is a
    +   * hierarchical group of policy tags.
    +   * 
    + */ + public static final class PolicyTagManagerSerializationBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyTagManagerSerializationBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyTagManagerSerializationBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerSerializationBlockingStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates new taxonomies (including their policy tags) by importing from
    +     * inlined source or cross-regional source. New taxonomies will be created in
    +     * a given parent project.
    +     * If using the cross-regional source, a new taxonomy is created by copying
    +     * from a source in another region.
    +     * If using the inlined source, this method provides a way to bulk create
    +     * taxonomies and policy tags using nested proto structure.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse importTaxonomies( + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportTaxonomiesMethod(), getCallOptions(), request); + } + + /** + * + * + *
    +     * Exports taxonomies as the requested type and returns the taxonomies
    +     * including their policy tags. The requested taxonomies must belong to one
    +     * project.
    +     * SerializedTaxonomy protos with nested policy tags that are generated by
    +     * this method can be used as input for future ImportTaxonomies calls.
    +     * 
    + */ + public com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse exportTaxonomies( + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportTaxonomiesMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
    +   * Policy Tag Manager serialization API service allows clients to manipulate
    +   * their policy tags and taxonomies in serialized format, where taxonomy is a
    +   * hierarchical group of policy tags.
    +   * 
    + */ + public static final class PolicyTagManagerSerializationFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PolicyTagManagerSerializationFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyTagManagerSerializationFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyTagManagerSerializationFutureStub(channel, callOptions); + } + + /** + * + * + *
    +     * Creates new taxonomies (including their policy tags) by importing from
    +     * inlined source or cross-regional source. New taxonomies will be created in
    +     * a given parent project.
    +     * If using the cross-regional source, a new taxonomy is created by copying
    +     * from a source in another region.
    +     * If using the inlined source, this method provides a way to bulk create
    +     * taxonomies and policy tags using nested proto structure.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse> + importTaxonomies(com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportTaxonomiesMethod(), getCallOptions()), request); + } + + /** + * + * + *
    +     * Exports taxonomies as the requested type and returns the taxonomies
    +     * including their policy tags. The requested taxonomies must belong to one
    +     * project.
    +     * SerializedTaxonomy protos with nested policy tags that are generated by
    +     * this method can be used as input for future ImportTaxonomies calls.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse> + exportTaxonomies(com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportTaxonomiesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_IMPORT_TAXONOMIES = 0; + private static final int METHODID_EXPORT_TAXONOMIES = 1; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final PolicyTagManagerSerializationImplBase serviceImpl; + private final int methodId; + + MethodHandlers(PolicyTagManagerSerializationImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_IMPORT_TAXONOMIES: + serviceImpl.importTaxonomies( + (com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse>) + responseObserver); + break; + case METHODID_EXPORT_TAXONOMIES: + serviceImpl.exportTaxonomies( + (com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class PolicyTagManagerSerializationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PolicyTagManagerSerializationBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PolicyTagManagerSerialization"); + } + } + + private static final class PolicyTagManagerSerializationFileDescriptorSupplier + extends PolicyTagManagerSerializationBaseDescriptorSupplier { + PolicyTagManagerSerializationFileDescriptorSupplier() {} + } + + private static final class PolicyTagManagerSerializationMethodDescriptorSupplier + extends PolicyTagManagerSerializationBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + PolicyTagManagerSerializationMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PolicyTagManagerSerializationGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new PolicyTagManagerSerializationFileDescriptorSupplier()) + .addMethod(getImportTaxonomiesMethod()) + .addMethod(getExportTaxonomiesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java index 44f169cb..e78bd882 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchema.java @@ -160,6 +160,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Required. Name of the column.
    +   * Must be a UTF-8 string without dots (.).
    +   * The maximum size is 64 bytes.
        * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -183,6 +185,8 @@ public java.lang.String getColumn() { * *
        * Required. Name of the column.
    +   * Must be a UTF-8 string without dots (.).
    +   * The maximum size is 64 bytes.
        * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -209,6 +213,7 @@ public com.google.protobuf.ByteString getColumnBytes() { * *
        * Required. Type of the column.
    +   * Must be a UTF-8 string with the maximum size of 128 bytes.
        * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -232,6 +237,7 @@ public java.lang.String getType() { * *
        * Required. Type of the column.
    +   * Must be a UTF-8 string with the maximum size of 128 bytes.
        * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -258,6 +264,8 @@ public com.google.protobuf.ByteString getTypeBytes() { * *
        * Optional. Description of the column. Default value is an empty string.
    +   * The description must be a UTF-8 string with the maximum size of 2000
    +   * bytes.
        * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -281,6 +289,8 @@ public java.lang.String getDescription() { * *
        * Optional. Description of the column. Default value is an empty string.
    +   * The description must be a UTF-8 string with the maximum size of 2000
    +   * bytes.
        * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -306,8 +316,9 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
    -   * Optional. A column's mode indicates whether the values in this column are required,
    -   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +   * Optional. A column's mode indicates if values in this column are required,
    +   * nullable, or repeated.
    +   * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
        * Default mode is `NULLABLE`.
        * 
    * @@ -331,8 +342,9 @@ public java.lang.String getMode() { * * *
    -   * Optional. A column's mode indicates whether the values in this column are required,
    -   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +   * Optional. A column's mode indicates if values in this column are required,
    +   * nullable, or repeated.
    +   * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
        * Default mode is `NULLABLE`.
        * 
    * @@ -861,6 +873,8 @@ public Builder mergeFrom( * *
          * Required. Name of the column.
    +     * Must be a UTF-8 string without dots (.).
    +     * The maximum size is 64 bytes.
          * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -883,6 +897,8 @@ public java.lang.String getColumn() { * *
          * Required. Name of the column.
    +     * Must be a UTF-8 string without dots (.).
    +     * The maximum size is 64 bytes.
          * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -905,6 +921,8 @@ public com.google.protobuf.ByteString getColumnBytes() { * *
          * Required. Name of the column.
    +     * Must be a UTF-8 string without dots (.).
    +     * The maximum size is 64 bytes.
          * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -926,6 +944,8 @@ public Builder setColumn(java.lang.String value) { * *
          * Required. Name of the column.
    +     * Must be a UTF-8 string without dots (.).
    +     * The maximum size is 64 bytes.
          * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -943,6 +963,8 @@ public Builder clearColumn() { * *
          * Required. Name of the column.
    +     * Must be a UTF-8 string without dots (.).
    +     * The maximum size is 64 bytes.
          * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -967,6 +989,7 @@ public Builder setColumnBytes(com.google.protobuf.ByteString value) { * *
          * Required. Type of the column.
    +     * Must be a UTF-8 string with the maximum size of 128 bytes.
          * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -989,6 +1012,7 @@ public java.lang.String getType() { * *
          * Required. Type of the column.
    +     * Must be a UTF-8 string with the maximum size of 128 bytes.
          * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1011,6 +1035,7 @@ public com.google.protobuf.ByteString getTypeBytes() { * *
          * Required. Type of the column.
    +     * Must be a UTF-8 string with the maximum size of 128 bytes.
          * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1032,6 +1057,7 @@ public Builder setType(java.lang.String value) { * *
          * Required. Type of the column.
    +     * Must be a UTF-8 string with the maximum size of 128 bytes.
          * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1049,6 +1075,7 @@ public Builder clearType() { * *
          * Required. Type of the column.
    +     * Must be a UTF-8 string with the maximum size of 128 bytes.
          * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1073,6 +1100,8 @@ public Builder setTypeBytes(com.google.protobuf.ByteString value) { * *
          * Optional. Description of the column. Default value is an empty string.
    +     * The description must be a UTF-8 string with the maximum size of 2000
    +     * bytes.
          * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1095,6 +1124,8 @@ public java.lang.String getDescription() { * *
          * Optional. Description of the column. Default value is an empty string.
    +     * The description must be a UTF-8 string with the maximum size of 2000
    +     * bytes.
          * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1117,6 +1148,8 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * *
          * Optional. Description of the column. Default value is an empty string.
    +     * The description must be a UTF-8 string with the maximum size of 2000
    +     * bytes.
          * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1138,6 +1171,8 @@ public Builder setDescription(java.lang.String value) { * *
          * Optional. Description of the column. Default value is an empty string.
    +     * The description must be a UTF-8 string with the maximum size of 2000
    +     * bytes.
          * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1155,6 +1190,8 @@ public Builder clearDescription() { * *
          * Optional. Description of the column. Default value is an empty string.
    +     * The description must be a UTF-8 string with the maximum size of 2000
    +     * bytes.
          * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1178,8 +1215,9 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
    -     * Optional. A column's mode indicates whether the values in this column are required,
    -     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +     * Optional. A column's mode indicates if values in this column are required,
    +     * nullable, or repeated.
    +     * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
          * Default mode is `NULLABLE`.
          * 
    * @@ -1202,8 +1240,9 @@ public java.lang.String getMode() { * * *
    -     * Optional. A column's mode indicates whether the values in this column are required,
    -     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +     * Optional. A column's mode indicates if values in this column are required,
    +     * nullable, or repeated.
    +     * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
          * Default mode is `NULLABLE`.
          * 
    * @@ -1226,8 +1265,9 @@ public com.google.protobuf.ByteString getModeBytes() { * * *
    -     * Optional. A column's mode indicates whether the values in this column are required,
    -     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +     * Optional. A column's mode indicates if values in this column are required,
    +     * nullable, or repeated.
    +     * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
          * Default mode is `NULLABLE`.
          * 
    * @@ -1249,8 +1289,9 @@ public Builder setMode(java.lang.String value) { * * *
    -     * Optional. A column's mode indicates whether the values in this column are required,
    -     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +     * Optional. A column's mode indicates if values in this column are required,
    +     * nullable, or repeated.
    +     * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
          * Default mode is `NULLABLE`.
          * 
    * @@ -1268,8 +1309,9 @@ public Builder clearMode() { * * *
    -     * Optional. A column's mode indicates whether the values in this column are required,
    -     * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +     * Optional. A column's mode indicates if values in this column are required,
    +     * nullable, or repeated.
    +     * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
          * Default mode is `NULLABLE`.
          * 
    * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java index b99c0470..f405cec5 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ColumnSchemaOrBuilder.java @@ -28,6 +28,8 @@ public interface ColumnSchemaOrBuilder * *
        * Required. Name of the column.
    +   * Must be a UTF-8 string without dots (.).
    +   * The maximum size is 64 bytes.
        * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -40,6 +42,8 @@ public interface ColumnSchemaOrBuilder * *
        * Required. Name of the column.
    +   * Must be a UTF-8 string without dots (.).
    +   * The maximum size is 64 bytes.
        * 
    * * string column = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -53,6 +57,7 @@ public interface ColumnSchemaOrBuilder * *
        * Required. Type of the column.
    +   * Must be a UTF-8 string with the maximum size of 128 bytes.
        * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -65,6 +70,7 @@ public interface ColumnSchemaOrBuilder * *
        * Required. Type of the column.
    +   * Must be a UTF-8 string with the maximum size of 128 bytes.
        * 
    * * string type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -78,6 +84,8 @@ public interface ColumnSchemaOrBuilder * *
        * Optional. Description of the column. Default value is an empty string.
    +   * The description must be a UTF-8 string with the maximum size of 2000
    +   * bytes.
        * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -90,6 +98,8 @@ public interface ColumnSchemaOrBuilder * *
        * Optional. Description of the column. Default value is an empty string.
    +   * The description must be a UTF-8 string with the maximum size of 2000
    +   * bytes.
        * 
    * * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -102,8 +112,9 @@ public interface ColumnSchemaOrBuilder * * *
    -   * Optional. A column's mode indicates whether the values in this column are required,
    -   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +   * Optional. A column's mode indicates if values in this column are required,
    +   * nullable, or repeated.
    +   * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
        * Default mode is `NULLABLE`.
        * 
    * @@ -116,8 +127,9 @@ public interface ColumnSchemaOrBuilder * * *
    -   * Optional. A column's mode indicates whether the values in this column are required,
    -   * nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported.
    +   * Optional. A column's mode indicates if values in this column are required,
    +   * nullable, or repeated.
    +   * Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported.
        * Default mode is `NULLABLE`.
        * 
    * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java index 489f3760..51ae9e3e 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Common.java @@ -36,15 +36,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n(google/cloud/datacatalog/v1/common.pro" - + "to\022\033google.cloud.datacatalog.v1*U\n\020Integ" + + "to\022\033google.cloud.datacatalog.v1*m\n\020Integ" + "ratedSystem\022!\n\035INTEGRATED_SYSTEM_UNSPECI" - + "FIED\020\000\022\014\n\010BIGQUERY\020\001\022\020\n\014CLOUD_PUBSUB\020\002B\313" - + "\001\n\037com.google.cloud.datacatalog.v1P\001ZFgo" - + "ogle.golang.org/genproto/googleapis/clou" - + "d/datacatalog/v1;datacatalog\370\001\001\252\002\033Google" - + ".Cloud.DataCatalog.V1\312\002\033Google\\Cloud\\Dat" - + "aCatalog\\V1\352\002\036Google::Cloud::DataCatalog" - + "::V1b\006proto3" + + "FIED\020\000\022\014\n\010BIGQUERY\020\001\022\020\n\014CLOUD_PUBSUB\020\002\022\026" + + "\n\022DATAPROC_METASTORE\020\003B\313\001\n\037com.google.cl" + + "oud.datacatalog.v1P\001ZFgoogle.golang.org/" + + "genproto/googleapis/cloud/datacatalog/v1" + + ";datacatalog\370\001\001\252\002\033Google.Cloud.DataCatal" + + "og.V1\312\002\033Google\\Cloud\\DataCatalog\\V1\352\002\036Go" + + "ogle::Cloud::DataCatalog::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java index 5eae2de8..4c313a22 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequest.java @@ -142,10 +142,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -   * Required. The name of the project this entry group is in. Example:
    -   * * projects/{project_id}/locations/{location}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * Required. The name of the project this entry group belongs to. Example:
    +   * `projects/{project_id}/locations/{location}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * @@ -170,10 +170,10 @@ public java.lang.String getParent() { * * *
    -   * Required. The name of the project this entry group is in. Example:
    -   * * projects/{project_id}/locations/{location}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * Required. The name of the project this entry group belongs to. Example:
    +   * `projects/{project_id}/locations/{location}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * @@ -201,9 +201,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
    -   * Required. The id of the entry group to create.
    -   * The id must begin with a letter or underscore, contain only English
    -   * letters, numbers and underscores, and be at most 64 characters.
    +   * Required. The ID of the entry group to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -226,9 +227,10 @@ public java.lang.String getEntryGroupId() { * * *
    -   * Required. The id of the entry group to create.
    -   * The id must begin with a letter or underscore, contain only English
    -   * letters, numbers and underscores, and be at most 64 characters.
    +   * Required. The ID of the entry group to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -665,10 +667,10 @@ public Builder mergeFrom( * * *
    -     * Required. The name of the project this entry group is in. Example:
    -     * * projects/{project_id}/locations/{location}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * Required. The name of the project this entry group belongs to. Example:
    +     * `projects/{project_id}/locations/{location}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * @@ -692,10 +694,10 @@ public java.lang.String getParent() { * * *
    -     * Required. The name of the project this entry group is in. Example:
    -     * * projects/{project_id}/locations/{location}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * Required. The name of the project this entry group belongs to. Example:
    +     * `projects/{project_id}/locations/{location}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * @@ -719,10 +721,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
    -     * Required. The name of the project this entry group is in. Example:
    -     * * projects/{project_id}/locations/{location}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * Required. The name of the project this entry group belongs to. Example:
    +     * `projects/{project_id}/locations/{location}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * @@ -745,10 +747,10 @@ public Builder setParent(java.lang.String value) { * * *
    -     * Required. The name of the project this entry group is in. Example:
    -     * * projects/{project_id}/locations/{location}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * Required. The name of the project this entry group belongs to. Example:
    +     * `projects/{project_id}/locations/{location}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * @@ -767,10 +769,10 @@ public Builder clearParent() { * * *
    -     * Required. The name of the project this entry group is in. Example:
    -     * * projects/{project_id}/locations/{location}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * Required. The name of the project this entry group belongs to. Example:
    +     * `projects/{project_id}/locations/{location}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * @@ -796,9 +798,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
    -     * Required. The id of the entry group to create.
    -     * The id must begin with a letter or underscore, contain only English
    -     * letters, numbers and underscores, and be at most 64 characters.
    +     * Required. The ID of the entry group to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -820,9 +823,10 @@ public java.lang.String getEntryGroupId() { * * *
    -     * Required. The id of the entry group to create.
    -     * The id must begin with a letter or underscore, contain only English
    -     * letters, numbers and underscores, and be at most 64 characters.
    +     * Required. The ID of the entry group to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -844,9 +848,10 @@ public com.google.protobuf.ByteString getEntryGroupIdBytes() { * * *
    -     * Required. The id of the entry group to create.
    -     * The id must begin with a letter or underscore, contain only English
    -     * letters, numbers and underscores, and be at most 64 characters.
    +     * Required. The ID of the entry group to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -867,9 +872,10 @@ public Builder setEntryGroupId(java.lang.String value) { * * *
    -     * Required. The id of the entry group to create.
    -     * The id must begin with a letter or underscore, contain only English
    -     * letters, numbers and underscores, and be at most 64 characters.
    +     * Required. The ID of the entry group to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -886,9 +892,10 @@ public Builder clearEntryGroupId() { * * *
    -     * Required. The id of the entry group to create.
    -     * The id must begin with a letter or underscore, contain only English
    -     * letters, numbers and underscores, and be at most 64 characters.
    +     * Required. The ID of the entry group to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java index 61c25b0f..08fdbe34 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java @@ -27,10 +27,10 @@ public interface CreateEntryGroupRequestOrBuilder * * *
    -   * Required. The name of the project this entry group is in. Example:
    -   * * projects/{project_id}/locations/{location}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * Required. The name of the project this entry group belongs to. Example:
    +   * `projects/{project_id}/locations/{location}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * @@ -44,10 +44,10 @@ public interface CreateEntryGroupRequestOrBuilder * * *
    -   * Required. The name of the project this entry group is in. Example:
    -   * * projects/{project_id}/locations/{location}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * Required. The name of the project this entry group belongs to. Example:
    +   * `projects/{project_id}/locations/{location}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * @@ -62,9 +62,10 @@ public interface CreateEntryGroupRequestOrBuilder * * *
    -   * Required. The id of the entry group to create.
    -   * The id must begin with a letter or underscore, contain only English
    -   * letters, numbers and underscores, and be at most 64 characters.
    +   * Required. The ID of the entry group to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -76,9 +77,10 @@ public interface CreateEntryGroupRequestOrBuilder * * *
    -   * Required. The id of the entry group to create.
    -   * The id must begin with a letter or underscore, contain only English
    -   * letters, numbers and underscores, and be at most 64 characters.
    +   * Required. The ID of the entry group to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java index 70c6c4ef..f4fde6f5 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java @@ -142,10 +142,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -   * Required. The name of the entry group this entry is in. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the entry group this entry belongs to. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry itself and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * @@ -170,10 +170,10 @@ public java.lang.String getParent() { * * *
    -   * Required. The name of the entry group this entry is in. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the entry group this entry belongs to. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry itself and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * @@ -201,7 +201,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
    -   * Required. The id of the entry to create.
    +   * Required. The ID of the entry to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * and underscores (_).
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -224,7 +227,10 @@ public java.lang.String getEntryId() { * * *
    -   * Required. The id of the entry to create.
    +   * Required. The ID of the entry to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * and underscores (_).
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -661,10 +667,10 @@ public Builder mergeFrom( * * *
    -     * Required. The name of the entry group this entry is in. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the entry group this entry belongs to. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry itself and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -688,10 +694,10 @@ public java.lang.String getParent() { * * *
    -     * Required. The name of the entry group this entry is in. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the entry group this entry belongs to. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry itself and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -715,10 +721,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
    -     * Required. The name of the entry group this entry is in. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the entry group this entry belongs to. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry itself and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -741,10 +747,10 @@ public Builder setParent(java.lang.String value) { * * *
    -     * Required. The name of the entry group this entry is in. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the entry group this entry belongs to. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry itself and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -763,10 +769,10 @@ public Builder clearParent() { * * *
    -     * Required. The name of the entry group this entry is in. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the entry group this entry belongs to. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry itself and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -792,7 +798,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
    -     * Required. The id of the entry to create.
    +     * Required. The ID of the entry to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * and underscores (_).
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -814,7 +823,10 @@ public java.lang.String getEntryId() { * * *
    -     * Required. The id of the entry to create.
    +     * Required. The ID of the entry to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * and underscores (_).
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -836,7 +848,10 @@ public com.google.protobuf.ByteString getEntryIdBytes() { * * *
    -     * Required. The id of the entry to create.
    +     * Required. The ID of the entry to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * and underscores (_).
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -857,7 +872,10 @@ public Builder setEntryId(java.lang.String value) { * * *
    -     * Required. The id of the entry to create.
    +     * Required. The ID of the entry to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * and underscores (_).
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -874,7 +892,10 @@ public Builder clearEntryId() { * * *
    -     * Required. The id of the entry to create.
    +     * Required. The ID of the entry to create.
    +     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +     * and underscores (_).
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java index 4fc0b37d..cd2b97ee 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java @@ -27,10 +27,10 @@ public interface CreateEntryRequestOrBuilder * * *
    -   * Required. The name of the entry group this entry is in. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the entry group this entry belongs to. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry itself and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * @@ -44,10 +44,10 @@ public interface CreateEntryRequestOrBuilder * * *
    -   * Required. The name of the entry group this entry is in. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the entry group this entry belongs to. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry itself and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * @@ -62,7 +62,10 @@ public interface CreateEntryRequestOrBuilder * * *
    -   * Required. The id of the entry to create.
    +   * Required. The ID of the entry to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * and underscores (_).
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -74,7 +77,10 @@ public interface CreateEntryRequestOrBuilder * * *
    -   * Required. The id of the entry to create.
    +   * Required. The ID of the entry to create.
    +   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
    +   * and underscores (_).
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string entry_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequest.java new file mode 100644 index 00000000..6a96399b --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequest.java @@ -0,0 +1,930 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [CreatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTag].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.CreatePolicyTagRequest} + */ +public final class CreatePolicyTagRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CreatePolicyTagRequest) + CreatePolicyTagRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePolicyTagRequest.newBuilder() to construct. + private CreatePolicyTagRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePolicyTagRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePolicyTagRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreatePolicyTagRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datacatalog.v1.PolicyTag.Builder subBuilder = null; + if (policyTag_ != null) { + subBuilder = policyTag_.toBuilder(); + } + policyTag_ = + input.readMessage( + com.google.cloud.datacatalog.v1.PolicyTag.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policyTag_); + policyTag_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.class, + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. Resource name of the taxonomy that the policy tag will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the taxonomy that the policy tag will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_TAG_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.PolicyTag policyTag_; + /** + * + * + *
    +   * The policy tag to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * + * @return Whether the policyTag field is set. + */ + @java.lang.Override + public boolean hasPolicyTag() { + return policyTag_ != null; + } + /** + * + * + *
    +   * The policy tag to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * + * @return The policyTag. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTag getPolicyTag() { + return policyTag_ == null + ? com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance() + : policyTag_; + } + /** + * + * + *
    +   * The policy tag to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagOrBuilder() { + return getPolicyTag(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (policyTag_ != null) { + output.writeMessage(2, getPolicyTag()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (policyTag_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicyTag()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CreatePolicyTagRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest other = + (com.google.cloud.datacatalog.v1.CreatePolicyTagRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPolicyTag() != other.hasPolicyTag()) return false; + if (hasPolicyTag()) { + if (!getPolicyTag().equals(other.getPolicyTag())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPolicyTag()) { + hash = (37 * hash) + POLICY_TAG_FIELD_NUMBER; + hash = (53 * hash) + getPolicyTag().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [CreatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTag].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.CreatePolicyTagRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CreatePolicyTagRequest) + com.google.cloud.datacatalog.v1.CreatePolicyTagRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.class, + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (policyTagBuilder_ == null) { + policyTag_ = null; + } else { + policyTag_ = null; + policyTagBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreatePolicyTagRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreatePolicyTagRequest build() { + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreatePolicyTagRequest buildPartial() { + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest result = + new com.google.cloud.datacatalog.v1.CreatePolicyTagRequest(this); + result.parent_ = parent_; + if (policyTagBuilder_ == null) { + result.policyTag_ = policyTag_; + } else { + result.policyTag_ = policyTagBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.CreatePolicyTagRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.CreatePolicyTagRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CreatePolicyTagRequest other) { + if (other == com.google.cloud.datacatalog.v1.CreatePolicyTagRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasPolicyTag()) { + mergePolicyTag(other.getPolicyTag()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CreatePolicyTagRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.CreatePolicyTagRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. Resource name of the taxonomy that the policy tag will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy that the policy tag will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy that the policy tag will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy that the policy tag will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy that the policy tag will belong to.
    +     * 
    + * + * + * 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. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.PolicyTag policyTag_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder> + policyTagBuilder_; + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * + * @return Whether the policyTag field is set. + */ + public boolean hasPolicyTag() { + return policyTagBuilder_ != null || policyTag_ != null; + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * + * @return The policyTag. + */ + public com.google.cloud.datacatalog.v1.PolicyTag getPolicyTag() { + if (policyTagBuilder_ == null) { + return policyTag_ == null + ? com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance() + : policyTag_; + } else { + return policyTagBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + public Builder setPolicyTag(com.google.cloud.datacatalog.v1.PolicyTag value) { + if (policyTagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyTag_ = value; + onChanged(); + } else { + policyTagBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + public Builder setPolicyTag(com.google.cloud.datacatalog.v1.PolicyTag.Builder builderForValue) { + if (policyTagBuilder_ == null) { + policyTag_ = builderForValue.build(); + onChanged(); + } else { + policyTagBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + public Builder mergePolicyTag(com.google.cloud.datacatalog.v1.PolicyTag value) { + if (policyTagBuilder_ == null) { + if (policyTag_ != null) { + policyTag_ = + com.google.cloud.datacatalog.v1.PolicyTag.newBuilder(policyTag_) + .mergeFrom(value) + .buildPartial(); + } else { + policyTag_ = value; + } + onChanged(); + } else { + policyTagBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + public Builder clearPolicyTag() { + if (policyTagBuilder_ == null) { + policyTag_ = null; + onChanged(); + } else { + policyTag_ = null; + policyTagBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + public com.google.cloud.datacatalog.v1.PolicyTag.Builder getPolicyTagBuilder() { + + onChanged(); + return getPolicyTagFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + public com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagOrBuilder() { + if (policyTagBuilder_ != null) { + return policyTagBuilder_.getMessageOrBuilder(); + } else { + return policyTag_ == null + ? com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance() + : policyTag_; + } + } + /** + * + * + *
    +     * The policy tag to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder> + getPolicyTagFieldBuilder() { + if (policyTagBuilder_ == null) { + policyTagBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder>( + getPolicyTag(), getParentForChildren(), isClean()); + policyTag_ = null; + } + return policyTagBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CreatePolicyTagRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CreatePolicyTagRequest) + private static final com.google.cloud.datacatalog.v1.CreatePolicyTagRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CreatePolicyTagRequest(); + } + + public static com.google.cloud.datacatalog.v1.CreatePolicyTagRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePolicyTagRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreatePolicyTagRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreatePolicyTagRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequestOrBuilder.java new file mode 100644 index 00000000..8e493598 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface CreatePolicyTagRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CreatePolicyTagRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the taxonomy that the policy tag will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. Resource name of the taxonomy that the policy tag will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * The policy tag to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * + * @return Whether the policyTag field is set. + */ + boolean hasPolicyTag(); + /** + * + * + *
    +   * The policy tag to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + * + * @return The policyTag. + */ + com.google.cloud.datacatalog.v1.PolicyTag getPolicyTag(); + /** + * + * + *
    +   * The policy tag to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 2; + */ + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java index 7d7b9b66..fea83b7a 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java @@ -134,11 +134,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -   * Required. The name of the resource to attach this tag to. Tags can be
    -   * attached to Entries. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Tag and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the resource to attach this tag to. Tags can be attached to
    +   * entries. An entry can have up to 1000 attached tags. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The tag and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * @@ -163,11 +163,11 @@ public java.lang.String getParent() { * * *
    -   * Required. The name of the resource to attach this tag to. Tags can be
    -   * attached to Entries. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Tag and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the resource to attach this tag to. Tags can be attached to
    +   * entries. An entry can have up to 1000 attached tags. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The tag and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * @@ -589,11 +589,11 @@ public Builder mergeFrom( * * *
    -     * Required. The name of the resource to attach this tag to. Tags can be
    -     * attached to Entries. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Tag and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the resource to attach this tag to. Tags can be attached to
    +     * entries. An entry can have up to 1000 attached tags. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The tag and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -617,11 +617,11 @@ public java.lang.String getParent() { * * *
    -     * Required. The name of the resource to attach this tag to. Tags can be
    -     * attached to Entries. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Tag and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the resource to attach this tag to. Tags can be attached to
    +     * entries. An entry can have up to 1000 attached tags. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The tag and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -645,11 +645,11 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
    -     * Required. The name of the resource to attach this tag to. Tags can be
    -     * attached to Entries. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Tag and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the resource to attach this tag to. Tags can be attached to
    +     * entries. An entry can have up to 1000 attached tags. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The tag and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -672,11 +672,11 @@ public Builder setParent(java.lang.String value) { * * *
    -     * Required. The name of the resource to attach this tag to. Tags can be
    -     * attached to Entries. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Tag and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the resource to attach this tag to. Tags can be attached to
    +     * entries. An entry can have up to 1000 attached tags. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The tag and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * @@ -695,11 +695,11 @@ public Builder clearParent() { * * *
    -     * Required. The name of the resource to attach this tag to. Tags can be
    -     * attached to Entries. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Tag and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Required. The name of the resource to attach this tag to. Tags can be attached to
    +     * entries. An entry can have up to 1000 attached tags. Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The tag and its child resources might not be stored in
    +     * the location specified in its name.
          * 
    * * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java index f4998599..21235de1 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java @@ -27,11 +27,11 @@ public interface CreateTagRequestOrBuilder * * *
    -   * Required. The name of the resource to attach this tag to. Tags can be
    -   * attached to Entries. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Tag and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the resource to attach this tag to. Tags can be attached to
    +   * entries. An entry can have up to 1000 attached tags. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The tag and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * @@ -45,11 +45,11 @@ public interface CreateTagRequestOrBuilder * * *
    -   * Required. The name of the resource to attach this tag to. Tags can be
    -   * attached to Entries. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Tag and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Required. The name of the resource to attach this tag to. Tags can be attached to
    +   * entries. An entry can have up to 1000 attached tags. Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The tag and its child resources might not be stored in
    +   * the location specified in its name.
        * 
    * * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java index aaa1c40f..0062f60c 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java @@ -202,7 +202,8 @@ public com.google.protobuf.ByteString getParentBytes() { * *
        * Required. The ID of the tag template field to create.
    -   * Field ids can contain letters (both uppercase and lowercase), numbers
    +   * Note: Adding a required field to an existing template is *not* allowed.
    +   * Field IDs can contain letters (both uppercase and lowercase), numbers
        * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
        * character long and at most 128 characters long. Field IDs must also be
        * unique within their template.
    @@ -229,7 +230,8 @@ public java.lang.String getTagTemplateFieldId() {
        *
        * 
        * Required. The ID of the tag template field to create.
    -   * Field ids can contain letters (both uppercase and lowercase), numbers
    +   * Note: Adding a required field to an existing template is *not* allowed.
    +   * Field IDs can contain letters (both uppercase and lowercase), numbers
        * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
        * character long and at most 128 characters long. Field IDs must also be
        * unique within their template.
    @@ -810,7 +812,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
          *
          * 
          * Required. The ID of the tag template field to create.
    -     * Field ids can contain letters (both uppercase and lowercase), numbers
    +     * Note: Adding a required field to an existing template is *not* allowed.
    +     * Field IDs can contain letters (both uppercase and lowercase), numbers
          * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
          * character long and at most 128 characters long. Field IDs must also be
          * unique within their template.
    @@ -836,7 +839,8 @@ public java.lang.String getTagTemplateFieldId() {
          *
          * 
          * Required. The ID of the tag template field to create.
    -     * Field ids can contain letters (both uppercase and lowercase), numbers
    +     * Note: Adding a required field to an existing template is *not* allowed.
    +     * Field IDs can contain letters (both uppercase and lowercase), numbers
          * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
          * character long and at most 128 characters long. Field IDs must also be
          * unique within their template.
    @@ -862,7 +866,8 @@ public com.google.protobuf.ByteString getTagTemplateFieldIdBytes() {
          *
          * 
          * Required. The ID of the tag template field to create.
    -     * Field ids can contain letters (both uppercase and lowercase), numbers
    +     * Note: Adding a required field to an existing template is *not* allowed.
    +     * Field IDs can contain letters (both uppercase and lowercase), numbers
          * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
          * character long and at most 128 characters long. Field IDs must also be
          * unique within their template.
    @@ -887,7 +892,8 @@ public Builder setTagTemplateFieldId(java.lang.String value) {
          *
          * 
          * Required. The ID of the tag template field to create.
    -     * Field ids can contain letters (both uppercase and lowercase), numbers
    +     * Note: Adding a required field to an existing template is *not* allowed.
    +     * Field IDs can contain letters (both uppercase and lowercase), numbers
          * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
          * character long and at most 128 characters long. Field IDs must also be
          * unique within their template.
    @@ -908,7 +914,8 @@ public Builder clearTagTemplateFieldId() {
          *
          * 
          * Required. The ID of the tag template field to create.
    -     * Field ids can contain letters (both uppercase and lowercase), numbers
    +     * Note: Adding a required field to an existing template is *not* allowed.
    +     * Field IDs can contain letters (both uppercase and lowercase), numbers
          * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
          * character long and at most 128 characters long. Field IDs must also be
          * unique within their template.
    diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java
    index 5fa2634b..d2bf3d1b 100644
    --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java
    +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java
    @@ -63,7 +63,8 @@ public interface CreateTagTemplateFieldRequestOrBuilder
        *
        * 
        * Required. The ID of the tag template field to create.
    -   * Field ids can contain letters (both uppercase and lowercase), numbers
    +   * Note: Adding a required field to an existing template is *not* allowed.
    +   * Field IDs can contain letters (both uppercase and lowercase), numbers
        * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
        * character long and at most 128 characters long. Field IDs must also be
        * unique within their template.
    @@ -79,7 +80,8 @@ public interface CreateTagTemplateFieldRequestOrBuilder
        *
        * 
        * Required. The ID of the tag template field to create.
    -   * Field ids can contain letters (both uppercase and lowercase), numbers
    +   * Note: Adding a required field to an existing template is *not* allowed.
    +   * Field IDs can contain letters (both uppercase and lowercase), numbers
        * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
        * character long and at most 128 characters long. Field IDs must also be
        * unique within their template.
    diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java
    index 32464411..2805db75 100644
    --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java
    +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java
    @@ -201,7 +201,10 @@ public com.google.protobuf.ByteString getParentBytes() {
        *
        *
        * 
    -   * Required. The id of the tag template to create.
    +   * Required. The ID of the tag template to create.
    +   * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -224,7 +227,10 @@ public java.lang.String getTagTemplateId() { * * *
    -   * Required. The id of the tag template to create.
    +   * Required. The ID of the tag template to create.
    +   * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -798,7 +804,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
    -     * Required. The id of the tag template to create.
    +     * Required. The ID of the tag template to create.
    +     * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -820,7 +829,10 @@ public java.lang.String getTagTemplateId() { * * *
    -     * Required. The id of the tag template to create.
    +     * Required. The ID of the tag template to create.
    +     * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -842,7 +854,10 @@ public com.google.protobuf.ByteString getTagTemplateIdBytes() { * * *
    -     * Required. The id of the tag template to create.
    +     * Required. The ID of the tag template to create.
    +     * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -863,7 +878,10 @@ public Builder setTagTemplateId(java.lang.String value) { * * *
    -     * Required. The id of the tag template to create.
    +     * Required. The ID of the tag template to create.
    +     * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -880,7 +898,10 @@ public Builder clearTagTemplateId() { * * *
    -     * Required. The id of the tag template to create.
    +     * Required. The ID of the tag template to create.
    +     * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum size is 64 bytes when encoded in UTF-8.
          * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java index 5806db0b..dd065e30 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java @@ -62,7 +62,10 @@ public interface CreateTagTemplateRequestOrBuilder * * *
    -   * Required. The id of the tag template to create.
    +   * Required. The ID of the tag template to create.
    +   * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -74,7 +77,10 @@ public interface CreateTagTemplateRequestOrBuilder * * *
    -   * Required. The id of the tag template to create.
    +   * Required. The ID of the tag template to create.
    +   * The ID must contain only lowercase letters (a-z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum size is 64 bytes when encoded in UTF-8.
        * 
    * * string tag_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequest.java new file mode 100644 index 00000000..b15246b9 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequest.java @@ -0,0 +1,930 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [CreateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomy].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTaxonomyRequest} + */ +public final class CreateTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CreateTaxonomyRequest) + CreateTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTaxonomyRequest.newBuilder() to construct. + private CreateTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTaxonomyRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTaxonomyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTaxonomyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datacatalog.v1.Taxonomy.Builder subBuilder = null; + if (taxonomy_ != null) { + subBuilder = taxonomy_.toBuilder(); + } + taxonomy_ = + input.readMessage( + com.google.cloud.datacatalog.v1.Taxonomy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(taxonomy_); + taxonomy_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. Resource name of the project that the taxonomy will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the project that the taxonomy will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAXONOMY_FIELD_NUMBER = 2; + private com.google.cloud.datacatalog.v1.Taxonomy taxonomy_; + /** + * + * + *
    +   * The taxonomy to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * + * @return Whether the taxonomy field is set. + */ + @java.lang.Override + public boolean hasTaxonomy() { + return taxonomy_ != null; + } + /** + * + * + *
    +   * The taxonomy to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * + * @return The taxonomy. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomy() { + return taxonomy_ == null + ? com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance() + : taxonomy_; + } + /** + * + * + *
    +   * The taxonomy to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomyOrBuilder() { + return getTaxonomy(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (taxonomy_ != null) { + output.writeMessage(2, getTaxonomy()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (taxonomy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTaxonomy()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CreateTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest other = + (com.google.cloud.datacatalog.v1.CreateTaxonomyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTaxonomy() != other.hasTaxonomy()) return false; + if (hasTaxonomy()) { + if (!getTaxonomy().equals(other.getTaxonomy())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTaxonomy()) { + hash = (37 * hash) + TAXONOMY_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomy().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [CreateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomy].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.CreateTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CreateTaxonomyRequest) + com.google.cloud.datacatalog.v1.CreateTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (taxonomyBuilder_ == null) { + taxonomy_ = null; + } else { + taxonomy_ = null; + taxonomyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTaxonomyRequest build() { + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTaxonomyRequest buildPartial() { + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest result = + new com.google.cloud.datacatalog.v1.CreateTaxonomyRequest(this); + result.parent_ = parent_; + if (taxonomyBuilder_ == null) { + result.taxonomy_ = taxonomy_; + } else { + result.taxonomy_ = taxonomyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.CreateTaxonomyRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.CreateTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CreateTaxonomyRequest other) { + if (other == com.google.cloud.datacatalog.v1.CreateTaxonomyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTaxonomy()) { + mergeTaxonomy(other.getTaxonomy()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CreateTaxonomyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.CreateTaxonomyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. Resource name of the project that the taxonomy will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the project that the taxonomy will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the project that the taxonomy will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the project that the taxonomy will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the project that the taxonomy will belong to.
    +     * 
    + * + * + * 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. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.Taxonomy taxonomy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + taxonomyBuilder_; + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * + * @return Whether the taxonomy field is set. + */ + public boolean hasTaxonomy() { + return taxonomyBuilder_ != null || taxonomy_ != null; + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * + * @return The taxonomy. + */ + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomy() { + if (taxonomyBuilder_ == null) { + return taxonomy_ == null + ? com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance() + : taxonomy_; + } else { + return taxonomyBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + public Builder setTaxonomy(com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taxonomy_ = value; + onChanged(); + } else { + taxonomyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + public Builder setTaxonomy(com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomyBuilder_ == null) { + taxonomy_ = builderForValue.build(); + onChanged(); + } else { + taxonomyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + public Builder mergeTaxonomy(com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomyBuilder_ == null) { + if (taxonomy_ != null) { + taxonomy_ = + com.google.cloud.datacatalog.v1.Taxonomy.newBuilder(taxonomy_) + .mergeFrom(value) + .buildPartial(); + } else { + taxonomy_ = value; + } + onChanged(); + } else { + taxonomyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + public Builder clearTaxonomy() { + if (taxonomyBuilder_ == null) { + taxonomy_ = null; + onChanged(); + } else { + taxonomy_ = null; + taxonomyBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder getTaxonomyBuilder() { + + onChanged(); + return getTaxonomyFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomyOrBuilder() { + if (taxonomyBuilder_ != null) { + return taxonomyBuilder_.getMessageOrBuilder(); + } else { + return taxonomy_ == null + ? com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance() + : taxonomy_; + } + } + /** + * + * + *
    +     * The taxonomy to be created.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + getTaxonomyFieldBuilder() { + if (taxonomyBuilder_ == null) { + taxonomyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder>( + getTaxonomy(), getParentForChildren(), isClean()); + taxonomy_ = null; + } + return taxonomyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CreateTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CreateTaxonomyRequest) + private static final com.google.cloud.datacatalog.v1.CreateTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CreateTaxonomyRequest(); + } + + public static com.google.cloud.datacatalog.v1.CreateTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTaxonomyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTaxonomyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CreateTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequestOrBuilder.java new file mode 100644 index 00000000..3f2dd045 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface CreateTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CreateTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the project that the taxonomy will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. Resource name of the project that the taxonomy will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * The taxonomy to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * + * @return Whether the taxonomy field is set. + */ + boolean hasTaxonomy(); + /** + * + * + *
    +   * The taxonomy to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + * + * @return The taxonomy. + */ + com.google.cloud.datacatalog.v1.Taxonomy getTaxonomy(); + /** + * + * + *
    +   * The taxonomy to be created.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 2; + */ + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomyOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSource.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSource.java new file mode 100644 index 00000000..2f9e9254 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSource.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Cross-regional source used to import an existing taxonomy into a different
    + * region.
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.CrossRegionalSource} + */ +public final class CrossRegionalSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.CrossRegionalSource) + CrossRegionalSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use CrossRegionalSource.newBuilder() to construct. + private CrossRegionalSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CrossRegionalSource() { + taxonomy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CrossRegionalSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CrossRegionalSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + taxonomy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CrossRegionalSource.class, + com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder.class); + } + + public static final int TAXONOMY_FIELD_NUMBER = 1; + private volatile java.lang.Object taxonomy_; + /** + * + * + *
    +   * Required. The resource name of the source taxonomy to be imported.
    +   * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The taxonomy. + */ + @java.lang.Override + public java.lang.String getTaxonomy() { + java.lang.Object ref = taxonomy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taxonomy_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The resource name of the source taxonomy to be imported.
    +   * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for taxonomy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTaxonomyBytes() { + java.lang.Object ref = taxonomy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taxonomy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTaxonomyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, taxonomy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTaxonomyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, taxonomy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.CrossRegionalSource)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.CrossRegionalSource other = + (com.google.cloud.datacatalog.v1.CrossRegionalSource) obj; + + if (!getTaxonomy().equals(other.getTaxonomy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TAXONOMY_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.CrossRegionalSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Cross-regional source used to import an existing taxonomy into a different
    +   * region.
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.CrossRegionalSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.CrossRegionalSource) + com.google.cloud.datacatalog.v1.CrossRegionalSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.CrossRegionalSource.class, + com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.CrossRegionalSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + taxonomy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSource getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSource build() { + com.google.cloud.datacatalog.v1.CrossRegionalSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSource buildPartial() { + com.google.cloud.datacatalog.v1.CrossRegionalSource result = + new com.google.cloud.datacatalog.v1.CrossRegionalSource(this); + result.taxonomy_ = taxonomy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.CrossRegionalSource) { + return mergeFrom((com.google.cloud.datacatalog.v1.CrossRegionalSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.CrossRegionalSource other) { + if (other == com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance()) + return this; + if (!other.getTaxonomy().isEmpty()) { + taxonomy_ = other.taxonomy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.CrossRegionalSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.CrossRegionalSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object taxonomy_ = ""; + /** + * + * + *
    +     * Required. The resource name of the source taxonomy to be imported.
    +     * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The taxonomy. + */ + public java.lang.String getTaxonomy() { + java.lang.Object ref = taxonomy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taxonomy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The resource name of the source taxonomy to be imported.
    +     * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for taxonomy. + */ + public com.google.protobuf.ByteString getTaxonomyBytes() { + java.lang.Object ref = taxonomy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taxonomy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The resource name of the source taxonomy to be imported.
    +     * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The taxonomy to set. + * @return This builder for chaining. + */ + public Builder setTaxonomy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + taxonomy_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The resource name of the source taxonomy to be imported.
    +     * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTaxonomy() { + + taxonomy_ = getDefaultInstance().getTaxonomy(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The resource name of the source taxonomy to be imported.
    +     * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for taxonomy to set. + * @return This builder for chaining. + */ + public Builder setTaxonomyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + taxonomy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.CrossRegionalSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.CrossRegionalSource) + private static final com.google.cloud.datacatalog.v1.CrossRegionalSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.CrossRegionalSource(); + } + + public static com.google.cloud.datacatalog.v1.CrossRegionalSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CrossRegionalSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CrossRegionalSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSourceOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSourceOrBuilder.java new file mode 100644 index 00000000..eed6435f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSourceOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface CrossRegionalSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.CrossRegionalSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The resource name of the source taxonomy to be imported.
    +   * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The taxonomy. + */ + java.lang.String getTaxonomy(); + /** + * + * + *
    +   * Required. The resource name of the source taxonomy to be imported.
    +   * 
    + * + * + * string taxonomy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for taxonomy. + */ + com.google.protobuf.ByteString getTaxonomyBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSource.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSource.java new file mode 100644 index 00000000..47b05860 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSource.java @@ -0,0 +1,954 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/data_source.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Describes the physical location of an entry.
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DataSource} + */ +public final class DataSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DataSource) + DataSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataSource.newBuilder() to construct. + private DataSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataSource() { + service_ = 0; + resource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + service_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.DataSourceProto + .internal_static_google_cloud_datacatalog_v1_DataSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.DataSourceProto + .internal_static_google_cloud_datacatalog_v1_DataSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DataSource.class, + com.google.cloud.datacatalog.v1.DataSource.Builder.class); + } + + /** + * + * + *
    +   * Service name where the data is stored.
    +   * 
    + * + * Protobuf enum {@code google.cloud.datacatalog.v1.DataSource.Service} + */ + public enum Service implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Default unknown service.
    +     * 
    + * + * SERVICE_UNSPECIFIED = 0; + */ + SERVICE_UNSPECIFIED(0), + /** + * + * + *
    +     * Google Cloud Storage service.
    +     * 
    + * + * CLOUD_STORAGE = 1; + */ + CLOUD_STORAGE(1), + /** + * + * + *
    +     * BigQuery service.
    +     * 
    + * + * BIGQUERY = 2; + */ + BIGQUERY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Default unknown service.
    +     * 
    + * + * SERVICE_UNSPECIFIED = 0; + */ + public static final int SERVICE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * Google Cloud Storage service.
    +     * 
    + * + * CLOUD_STORAGE = 1; + */ + public static final int CLOUD_STORAGE_VALUE = 1; + /** + * + * + *
    +     * BigQuery service.
    +     * 
    + * + * BIGQUERY = 2; + */ + public static final int BIGQUERY_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 Service 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 Service forNumber(int value) { + switch (value) { + case 0: + return SERVICE_UNSPECIFIED; + case 1: + return CLOUD_STORAGE; + case 2: + return BIGQUERY; + 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 Service findValueByNumber(int number) { + return Service.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.datacatalog.v1.DataSource.getDescriptor().getEnumTypes().get(0); + } + + private static final Service[] VALUES = values(); + + public static Service 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 Service(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.DataSource.Service) + } + + public static final int SERVICE_FIELD_NUMBER = 1; + private int service_; + /** + * + * + *
    +   * Service in which the data is physically stored.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @return The enum numeric value on the wire for service. + */ + @java.lang.Override + public int getServiceValue() { + return service_; + } + /** + * + * + *
    +   * Service in which the data is physically stored.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @return The service. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSource.Service getService() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.DataSource.Service result = + com.google.cloud.datacatalog.v1.DataSource.Service.valueOf(service_); + return result == null + ? com.google.cloud.datacatalog.v1.DataSource.Service.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private volatile java.lang.Object resource_; + /** + * + * + *
    +   * Full name of the resource as defined by the service, e.g.
    +   * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +   * 
    + * + * string resource = 2; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + * + * + *
    +   * Full name of the resource as defined by the service, e.g.
    +   * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +   * 
    + * + * string resource = 2; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (service_ + != com.google.cloud.datacatalog.v1.DataSource.Service.SERVICE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, service_); + } + if (!getResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resource_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (service_ + != com.google.cloud.datacatalog.v1.DataSource.Service.SERVICE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, service_); + } + if (!getResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resource_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.DataSource)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DataSource other = + (com.google.cloud.datacatalog.v1.DataSource) obj; + + if (service_ != other.service_) return false; + if (!getResource().equals(other.getResource())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + service_; + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DataSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.DataSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Describes the physical location of an entry.
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DataSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DataSource) + com.google.cloud.datacatalog.v1.DataSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.DataSourceProto + .internal_static_google_cloud_datacatalog_v1_DataSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.DataSourceProto + .internal_static_google_cloud_datacatalog_v1_DataSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DataSource.class, + com.google.cloud.datacatalog.v1.DataSource.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DataSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + service_ = 0; + + resource_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.DataSourceProto + .internal_static_google_cloud_datacatalog_v1_DataSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSource getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DataSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSource build() { + com.google.cloud.datacatalog.v1.DataSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSource buildPartial() { + com.google.cloud.datacatalog.v1.DataSource result = + new com.google.cloud.datacatalog.v1.DataSource(this); + result.service_ = service_; + result.resource_ = resource_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.DataSource) { + return mergeFrom((com.google.cloud.datacatalog.v1.DataSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DataSource other) { + if (other == com.google.cloud.datacatalog.v1.DataSource.getDefaultInstance()) return this; + if (other.service_ != 0) { + setServiceValue(other.getServiceValue()); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.DataSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.DataSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int service_ = 0; + /** + * + * + *
    +     * Service in which the data is physically stored.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @return The enum numeric value on the wire for service. + */ + @java.lang.Override + public int getServiceValue() { + return service_; + } + /** + * + * + *
    +     * Service in which the data is physically stored.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @param value The enum numeric value on the wire for service to set. + * @return This builder for chaining. + */ + public Builder setServiceValue(int value) { + + service_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Service in which the data is physically stored.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @return The service. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSource.Service getService() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.DataSource.Service result = + com.google.cloud.datacatalog.v1.DataSource.Service.valueOf(service_); + return result == null + ? com.google.cloud.datacatalog.v1.DataSource.Service.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * Service in which the data is physically stored.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(com.google.cloud.datacatalog.v1.DataSource.Service value) { + if (value == null) { + throw new NullPointerException(); + } + + service_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Service in which the data is physically stored.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @return This builder for chaining. + */ + public Builder clearService() { + + service_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * + *
    +     * Full name of the resource as defined by the service, e.g.
    +     * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +     * 
    + * + * string resource = 2; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Full name of the resource as defined by the service, e.g.
    +     * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +     * 
    + * + * string resource = 2; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Full name of the resource as defined by the service, e.g.
    +     * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +     * 
    + * + * string resource = 2; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Full name of the resource as defined by the service, e.g.
    +     * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +     * 
    + * + * string resource = 2; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Full name of the resource as defined by the service, e.g.
    +     * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +     * 
    + * + * string resource = 2; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.DataSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DataSource) + private static final com.google.cloud.datacatalog.v1.DataSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DataSource(); + } + + public static com.google.cloud.datacatalog.v1.DataSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceOrBuilder.java new file mode 100644 index 00000000..9621f41e --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/data_source.proto + +package com.google.cloud.datacatalog.v1; + +public interface DataSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DataSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Service in which the data is physically stored.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @return The enum numeric value on the wire for service. + */ + int getServiceValue(); + /** + * + * + *
    +   * Service in which the data is physically stored.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DataSource.Service service = 1; + * + * @return The service. + */ + com.google.cloud.datacatalog.v1.DataSource.Service getService(); + + /** + * + * + *
    +   * Full name of the resource as defined by the service, e.g.
    +   * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +   * 
    + * + * string resource = 2; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
    +   * Full name of the resource as defined by the service, e.g.
    +   * //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id}
    +   * 
    + * + * string resource = 2; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceProto.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceProto.java new file mode 100644 index 00000000..520fd2a8 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceProto.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/data_source.proto + +package com.google.cloud.datacatalog.v1; + +public final class DataSourceProto { + private DataSourceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DataSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DataSource_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/datacatalog/v1/data_sourc" + + "e.proto\022\033google.cloud.datacatalog.v1\032\037go" + + "ogle/api/field_behavior.proto\"\245\001\n\nDataSo" + + "urce\022@\n\007service\030\001 \001(\0162/.google.cloud.dat" + + "acatalog.v1.DataSource.Service\022\020\n\010resour" + + "ce\030\002 \001(\t\"C\n\007Service\022\027\n\023SERVICE_UNSPECIFI" + + "ED\020\000\022\021\n\rCLOUD_STORAGE\020\001\022\014\n\010BIGQUERY\020\002B\334\001" + + "\n\037com.google.cloud.datacatalog.v1B\017DataS" + + "ourceProtoP\001ZFgoogle.golang.org/genproto" + + "/googleapis/cloud/datacatalog/v1;datacat" + + "alog\370\001\001\252\002\033Google.Cloud.DataCatalog.V1\312\002\033" + + "Google\\Cloud\\DataCatalog\\V1\352\002\036Google::Cl" + + "oud::DataCatalog::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_DataSource_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_DataSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DataSource_descriptor, + new java.lang.String[] { + "Service", "Resource", + }); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpec.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpec.java new file mode 100644 index 00000000..9b1fe419 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpec.java @@ -0,0 +1,776 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Specification that applies to a table resource. Only valid
    + * for entries of `TABLE` type.
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DatabaseTableSpec} + */ +public final class DatabaseTableSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DatabaseTableSpec) + DatabaseTableSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseTableSpec.newBuilder() to construct. + private DatabaseTableSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseTableSpec() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseTableSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DatabaseTableSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DatabaseTableSpec.class, + com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder.class); + } + + /** + * + * + *
    +   * Type of the table.
    +   * 
    + * + * Protobuf enum {@code google.cloud.datacatalog.v1.DatabaseTableSpec.TableType} + */ + public enum TableType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Default unknown table type.
    +     * 
    + * + * TABLE_TYPE_UNSPECIFIED = 0; + */ + TABLE_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +     * Native table.
    +     * 
    + * + * NATIVE = 1; + */ + NATIVE(1), + /** + * + * + *
    +     * External table.
    +     * 
    + * + * EXTERNAL = 2; + */ + EXTERNAL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Default unknown table type.
    +     * 
    + * + * TABLE_TYPE_UNSPECIFIED = 0; + */ + public static final int TABLE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * Native table.
    +     * 
    + * + * NATIVE = 1; + */ + public static final int NATIVE_VALUE = 1; + /** + * + * + *
    +     * External table.
    +     * 
    + * + * EXTERNAL = 2; + */ + public static final int EXTERNAL_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 TableType 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 TableType forNumber(int value) { + switch (value) { + case 0: + return TABLE_TYPE_UNSPECIFIED; + case 1: + return NATIVE; + case 2: + return EXTERNAL; + 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 TableType findValueByNumber(int number) { + return TableType.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.datacatalog.v1.DatabaseTableSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TableType[] VALUES = values(); + + public static TableType 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 TableType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.DatabaseTableSpec.TableType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
    +   * Type of this table.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
    +   * Type of this table.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType result = + com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType.valueOf(type_); + return result == null + ? com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType.TABLE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType.TABLE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.DatabaseTableSpec)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DatabaseTableSpec other = + (com.google.cloud.datacatalog.v1.DatabaseTableSpec) obj; + + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.DatabaseTableSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Specification that applies to a table resource. Only valid
    +   * for entries of `TABLE` type.
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DatabaseTableSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DatabaseTableSpec) + com.google.cloud.datacatalog.v1.DatabaseTableSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DatabaseTableSpec.class, + com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DatabaseTableSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec build() { + com.google.cloud.datacatalog.v1.DatabaseTableSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec buildPartial() { + com.google.cloud.datacatalog.v1.DatabaseTableSpec result = + new com.google.cloud.datacatalog.v1.DatabaseTableSpec(this); + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.DatabaseTableSpec) { + return mergeFrom((com.google.cloud.datacatalog.v1.DatabaseTableSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DatabaseTableSpec other) { + if (other == com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.DatabaseTableSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.DatabaseTableSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
    +     * Type of this table.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
    +     * Type of this table.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @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 of this table.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType result = + com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType.valueOf(type_); + return result == null + ? com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * Type of this table.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Type of this table.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @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); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.DatabaseTableSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DatabaseTableSpec) + private static final com.google.cloud.datacatalog.v1.DatabaseTableSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DatabaseTableSpec(); + } + + public static com.google.cloud.datacatalog.v1.DatabaseTableSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseTableSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DatabaseTableSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpecOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpecOrBuilder.java new file mode 100644 index 00000000..f97dd192 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpecOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface DatabaseTableSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DatabaseTableSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Type of this table.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
    +   * Type of this table.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec.TableType type = 1; + * + * @return The type. + */ + com.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType getType(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java index 6a6aeece..6b4ce6a1 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java @@ -87,6 +87,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_datacatalog_v1_Entry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_datacatalog_v1_Entry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -131,6 +135,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -165,20 +173,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle/api/annotations.proto\032\027google/api/c" + "lient.proto\032\037google/api/field_behavior.p" + "roto\032\031google/api/resource.proto\032(google/" - + "cloud/datacatalog/v1/common.proto\0322googl" - + "e/cloud/datacatalog/v1/gcs_fileset_spec." - + "proto\032(google/cloud/datacatalog/v1/schem" - + "a.proto\032(google/cloud/datacatalog/v1/sea" - + "rch.proto\032,google/cloud/datacatalog/v1/t" - + "able_spec.proto\032&google/cloud/datacatalo" - + "g/v1/tags.proto\032,google/cloud/datacatalo" - + "g/v1/timestamps.proto\032\036google/iam/v1/iam" - + "_policy.proto\032\032google/iam/v1/policy.prot" - + "o\032\033google/protobuf/empty.proto\032 google/p" - + "rotobuf/field_mask.proto\"\275\002\n\024SearchCatal" + + "cloud/datacatalog/v1/common.proto\032-googl" + + "e/cloud/datacatalog/v1/data_source.proto" + + "\0322google/cloud/datacatalog/v1/gcs_filese" + + "t_spec.proto\032(google/cloud/datacatalog/v" + + "1/schema.proto\032(google/cloud/datacatalog" + + "/v1/search.proto\032,google/cloud/datacatal" + + "og/v1/table_spec.proto\032&google/cloud/dat" + + "acatalog/v1/tags.proto\032,google/cloud/dat" + + "acatalog/v1/timestamps.proto\032\036google/iam" + + "/v1/iam_policy.proto\032\032google/iam/v1/poli" + + "cy.proto\032\033google/protobuf/empty.proto\032 g" + + "oogle/protobuf/field_mask.proto\032\037google/" + + "protobuf/timestamp.proto\"\275\002\n\024SearchCatal" + "ogRequest\022K\n\005scope\030\006 \001(\01327.google.cloud." + "datacatalog.v1.SearchCatalogRequest.Scop" - + "eB\003\340A\002\022\022\n\005query\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030" + + "eB\003\340A\002\022\022\n\005query\030\001 \001(\tB\003\340A\001\022\021\n\tpage_size\030" + "\002 \001(\005\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\020\n\010order_" + "by\030\005 \001(\t\032\205\001\n\005Scope\022\027\n\017include_org_ids\030\002 " + "\003(\t\022\033\n\023include_project_ids\030\003 \003(\t\022#\n\033incl" @@ -218,248 +228,274 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "DeleteEntryRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"" + "\n datacatalog.googleapis.com/Entry\"I\n\017Ge" + "tEntryRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n dat" - + "acatalog.googleapis.com/Entry\"V\n\022LookupE" + + "acatalog.googleapis.com/Entry\"v\n\022LookupE" + "ntryRequest\022\031\n\017linked_resource\030\001 \001(\tH\000\022\026" - + "\n\014sql_resource\030\003 \001(\tH\000B\r\n\013target_name\"\347\006" - + "\n\005Entry\0228\n\004name\030\001 \001(\tB*\372A\'\n%datacatalog." - + "googleapis.com/EntryGroup\022\027\n\017linked_reso" - + "urce\030\t \001(\t\0226\n\004type\030\002 \001(\0162&.google.cloud." - + "datacatalog.v1.EntryTypeH\000\022\035\n\023user_speci" - + "fied_type\030\020 \001(\tH\000\022O\n\021integrated_system\030\021" - + " \001(\0162-.google.cloud.datacatalog.v1.Integ" - + "ratedSystemB\003\340A\003H\001\022\037\n\025user_specified_sys" - + "tem\030\022 \001(\tH\001\022G\n\020gcs_fileset_spec\030\006 \001(\0132+." - + "google.cloud.datacatalog.v1.GcsFilesetSp" - + "ecH\002\022M\n\023bigquery_table_spec\030\014 \001(\0132..goog" - + "le.cloud.datacatalog.v1.BigQueryTableSpe" - + "cH\002\022Z\n\032bigquery_date_sharded_spec\030\017 \001(\0132" - + "4.google.cloud.datacatalog.v1.BigQueryDa" - + "teShardedSpecH\002\022\024\n\014display_name\030\003 \001(\t\022\023\n" - + "\013description\030\004 \001(\t\0223\n\006schema\030\005 \001(\0132#.goo" - + "gle.cloud.datacatalog.v1.Schema\022O\n\030sourc" - + "e_system_timestamps\030\007 \001(\0132-.google.cloud" - + ".datacatalog.v1.SystemTimestamps:x\352Au\n d" - + "atacatalog.googleapis.com/Entry\022Qproject" - + "s/{project}/locations/{location}/entryGr" - + "oups/{entry_group}/entries/{entry}B\014\n\nen" - + "try_typeB\010\n\006systemB\013\n\ttype_spec\"\211\002\n\nEntr" - + "yGroup\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001" - + "(\t\022\023\n\013description\030\003 \001(\t\022S\n\027data_catalog_" - + "timestamps\030\004 \001(\0132-.google.cloud.datacata" - + "log.v1.SystemTimestampsB\003\340A\003:m\352Aj\n%datac" - + "atalog.googleapis.com/EntryGroup\022Aprojec" - + "ts/{project}/locations/{location}/entryG" - + "roups/{entry_group}\"\275\001\n\030CreateTagTemplat" - + "eRequest\022>\n\006parent\030\001 \001(\tB.\340A\002\372A(\022&dataca" - + "talog.googleapis.com/TagTemplate\022\034\n\017tag_" - + "template_id\030\003 \001(\tB\003\340A\002\022C\n\014tag_template\030\002" - + " \001(\0132(.google.cloud.datacatalog.v1.TagTe" - + "mplateB\003\340A\002\"U\n\025GetTagTemplateRequest\022<\n\004" - + "name\030\001 \001(\tB.\340A\002\372A(\n&datacatalog.googleap" - + "is.com/TagTemplate\"\220\001\n\030UpdateTagTemplate" - + "Request\022C\n\014tag_template\030\001 \001(\0132(.google.c" - + "loud.datacatalog.v1.TagTemplateB\003\340A\002\022/\n\013" - + "update_mask\030\002 \001(\0132\032.google.protobuf.Fiel" - + "dMask\"l\n\030DeleteTagTemplateRequest\022<\n\004nam" - + "e\030\001 \001(\tB.\340A\002\372A(\n&datacatalog.googleapis." - + "com/TagTemplate\022\022\n\005force\030\002 \001(\010B\003\340A\002\"~\n\020C" - + "reateTagRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \n" - + "\036datacatalog.googleapis.com/Tag\0222\n\003tag\030\002" - + " \001(\0132 .google.cloud.datacatalog.v1.TagB\003" - + "\340A\002\"w\n\020UpdateTagRequest\0222\n\003tag\030\001 \001(\0132 .g" - + "oogle.cloud.datacatalog.v1.TagB\003\340A\002\022/\n\013u" - + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" - + "Mask\"H\n\020DeleteTagRequest\0224\n\004name\030\001 \001(\tB&" - + "\340A\002\372A \022\036datacatalog.googleapis.com/Tag\"\323" - + "\001\n\035CreateTagTemplateFieldRequest\022>\n\006pare" - + "nt\030\001 \001(\tB.\340A\002\372A(\n&datacatalog.googleapis" - + ".com/TagTemplate\022\"\n\025tag_template_field_i" - + "d\030\002 \001(\tB\003\340A\002\022N\n\022tag_template_field\030\003 \001(\013" - + "2-.google.cloud.datacatalog.v1.TagTempla" - + "teFieldB\003\340A\002\"\350\001\n\035UpdateTagTemplateFieldR" - + "equest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+datacatalo" - + "g.googleapis.com/TagTemplateField\022N\n\022tag" - + "_template_field\030\002 \001(\0132-.google.cloud.dat" - + "acatalog.v1.TagTemplateFieldB\003\340A\002\0224\n\013upd" - + "ate_mask\030\003 \001(\0132\032.google.protobuf.FieldMa" - + "skB\003\340A\001\"\212\001\n\035RenameTagTemplateFieldReques" - + "t\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+datacatalog.goo" - + "gleapis.com/TagTemplateField\022&\n\031new_tag_" - + "template_field_id\030\002 \001(\tB\003\340A\002\"v\n\035DeleteTa" + + "\n\014sql_resource\030\003 \001(\tH\000\022\036\n\024fully_qualifie" + + "d_name\030\005 \001(\tH\000B\r\n\013target_name\"\242\010\n\005Entry\022" + + ";\n\004name\030\001 \001(\tB-\340A\003\372A\'\n%datacatalog.googl" + + "eapis.com/EntryGroup\022\027\n\017linked_resource\030" + + "\t \001(\t\022\034\n\024fully_qualified_name\030\035 \001(\t\0226\n\004t" + + "ype\030\002 \001(\0162&.google.cloud.datacatalog.v1." + + "EntryTypeH\000\022\035\n\023user_specified_type\030\020 \001(\t" + + "H\000\022O\n\021integrated_system\030\021 \001(\0162-.google.c" + + "loud.datacatalog.v1.IntegratedSystemB\003\340A" + + "\003H\001\022\037\n\025user_specified_system\030\022 \001(\tH\001\022G\n\020" + + "gcs_fileset_spec\030\006 \001(\0132+.google.cloud.da" + + "tacatalog.v1.GcsFilesetSpecH\002\022M\n\023bigquer" + + "y_table_spec\030\014 \001(\0132..google.cloud.dataca" + + "talog.v1.BigQueryTableSpecH\002\022Z\n\032bigquery" + + "_date_sharded_spec\030\017 \001(\01324.google.cloud." + + "datacatalog.v1.BigQueryDateShardedSpecH\002" + + "\022M\n\023database_table_spec\030\030 \001(\0132..google.c" + + "loud.datacatalog.v1.DatabaseTableSpecH\003\022" + + "\024\n\014display_name\030\003 \001(\t\022\023\n\013description\030\004 \001" + + "(\t\0223\n\006schema\030\005 \001(\0132#.google.cloud.dataca" + + "talog.v1.Schema\022O\n\030source_system_timesta" + + "mps\030\007 \001(\0132-.google.cloud.datacatalog.v1." + + "SystemTimestamps\022A\n\013data_source\030\024 \001(\0132\'." + + "google.cloud.datacatalog.v1.DataSourceB\003" + + "\340A\003:x\352Au\n datacatalog.googleapis.com/Ent" + + "ry\022Qprojects/{project}/locations/{locati" + + "on}/entryGroups/{entry_group}/entries/{e" + + "ntry}B\014\n\nentry_typeB\010\n\006systemB\013\n\ttype_sp" + + "ecB\006\n\004spec\"\236\001\n\021DatabaseTableSpec\022F\n\004type" + + "\030\001 \001(\01628.google.cloud.datacatalog.v1.Dat" + + "abaseTableSpec.TableType\"A\n\tTableType\022\032\n" + + "\026TABLE_TYPE_UNSPECIFIED\020\000\022\n\n\006NATIVE\020\001\022\014\n" + + "\010EXTERNAL\020\002\"\211\002\n\nEntryGroup\022\014\n\004name\030\001 \001(\t" + + "\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003 " + + "\001(\t\022S\n\027data_catalog_timestamps\030\004 \001(\0132-.g" + + "oogle.cloud.datacatalog.v1.SystemTimesta" + + "mpsB\003\340A\003:m\352Aj\n%datacatalog.googleapis.co" + + "m/EntryGroup\022Aprojects/{project}/locatio" + + "ns/{location}/entryGroups/{entry_group}\"" + + "\275\001\n\030CreateTagTemplateRequest\022>\n\006parent\030\001" + + " \001(\tB.\340A\002\372A(\022&datacatalog.googleapis.com" + + "/TagTemplate\022\034\n\017tag_template_id\030\003 \001(\tB\003\340" + + "A\002\022C\n\014tag_template\030\002 \001(\0132(.google.cloud." + + "datacatalog.v1.TagTemplateB\003\340A\002\"U\n\025GetTa" + + "gTemplateRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&" + + "datacatalog.googleapis.com/TagTemplate\"\220" + + "\001\n\030UpdateTagTemplateRequest\022C\n\014tag_templ" + + "ate\030\001 \001(\0132(.google.cloud.datacatalog.v1." + + "TagTemplateB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032." + + "google.protobuf.FieldMask\"l\n\030DeleteTagTe" + + "mplateRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&dat" + + "acatalog.googleapis.com/TagTemplate\022\022\n\005f" + + "orce\030\002 \001(\010B\003\340A\002\"~\n\020CreateTagRequest\0226\n\006p" + + "arent\030\001 \001(\tB&\340A\002\372A \n\036datacatalog.googlea" + + "pis.com/Tag\0222\n\003tag\030\002 \001(\0132 .google.cloud." + + "datacatalog.v1.TagB\003\340A\002\"w\n\020UpdateTagRequ" + + "est\0222\n\003tag\030\001 \001(\0132 .google.cloud.datacata" + + "log.v1.TagB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.g" + + "oogle.protobuf.FieldMask\"H\n\020DeleteTagReq" + + "uest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \022\036datacatalog." + + "googleapis.com/Tag\"\323\001\n\035CreateTagTemplate" + + "FieldRequest\022>\n\006parent\030\001 \001(\tB.\340A\002\372A(\n&da" + + "tacatalog.googleapis.com/TagTemplate\022\"\n\025" + + "tag_template_field_id\030\002 \001(\tB\003\340A\002\022N\n\022tag_" + + "template_field\030\003 \001(\0132-.google.cloud.data" + + "catalog.v1.TagTemplateFieldB\003\340A\002\"\350\001\n\035Upd" + + "ateTagTemplateFieldRequest\022A\n\004name\030\001 \001(\t" + + "B3\340A\002\372A-\n+datacatalog.googleapis.com/Tag" + + "TemplateField\022N\n\022tag_template_field\030\002 \001(" + + "\0132-.google.cloud.datacatalog.v1.TagTempl" + + "ateFieldB\003\340A\002\0224\n\013update_mask\030\003 \001(\0132\032.goo" + + "gle.protobuf.FieldMaskB\003\340A\001\"\212\001\n\035RenameTa" + "gTemplateFieldRequest\022A\n\004name\030\001 \001(\tB3\340A\002" + "\372A-\n+datacatalog.googleapis.com/TagTempl" - + "ateField\022\022\n\005force\030\002 \001(\010B\003\340A\002\"p\n\017ListTags" - + "Request\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036datacat" - + "alog.googleapis.com/Tag\022\021\n\tpage_size\030\002 \001" - + "(\005\022\022\n\npage_token\030\003 \001(\t\"[\n\020ListTagsRespon" - + "se\022.\n\004tags\030\001 \003(\0132 .google.cloud.datacata" - + "log.v1.Tag\022\027\n\017next_page_token\030\002 \001(\t\"\251\001\n\022" - + "ListEntriesRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372" - + "A\'\n%datacatalog.googleapis.com/EntryGrou" - + "p\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" - + "\022-\n\tread_mask\030\004 \001(\0132\032.google.protobuf.Fi" - + "eldMask\"c\n\023ListEntriesResponse\0223\n\007entrie" - + "s\030\001 \003(\0132\".google.cloud.datacatalog.v1.En" - + "try\022\027\n\017next_page_token\030\002 \001(\t*[\n\tEntryTyp" - + "e\022\032\n\026ENTRY_TYPE_UNSPECIFIED\020\000\022\t\n\005TABLE\020\002" - + "\022\t\n\005MODEL\020\005\022\017\n\013DATA_STREAM\020\003\022\013\n\007FILESET\020" - + "\0042\255/\n\013DataCatalog\022\243\001\n\rSearchCatalog\0221.go" - + "ogle.cloud.datacatalog.v1.SearchCatalogR" - + "equest\0322.google.cloud.datacatalog.v1.Sea" - + "rchCatalogResponse\"+\202\323\344\223\002\027\"\022/v1/catalog:" - + "search:\001*\332A\013scope,query\022\333\001\n\020CreateEntryG" - + "roup\0224.google.cloud.datacatalog.v1.Creat" - + "eEntryGroupRequest\032\'.google.cloud.dataca" - + "talog.v1.EntryGroup\"h\202\323\344\223\002>\"//v1/{parent" - + "=projects/*/locations/*}/entryGroups:\013en" - + "try_group\332A!parent,entry_group_id,entry_" - + "group\022\274\001\n\rGetEntryGroup\0221.google.cloud.d" - + "atacatalog.v1.GetEntryGroupRequest\032\'.goo" - + "gle.cloud.datacatalog.v1.EntryGroup\"O\202\323\344" - + "\223\0021\022//v1/{name=projects/*/locations/*/en" - + "tryGroups/*}\332A\004name\332A\016name,read_mask\022\353\001\n" - + "\020UpdateEntryGroup\0224.google.cloud.datacat" - + "alog.v1.UpdateEntryGroupRequest\032\'.google" - + ".cloud.datacatalog.v1.EntryGroup\"x\202\323\344\223\002J" - + "2;/v1/{entry_group.name=projects/*/locat" - + "ions/*/entryGroups/*}:\013entry_group\332A\013ent" - + "ry_group\332A\027entry_group,update_mask\022\240\001\n\020D" - + "eleteEntryGroup\0224.google.cloud.datacatal" - + "og.v1.DeleteEntryGroupRequest\032\026.google.p" - + "rotobuf.Empty\">\202\323\344\223\0021*//v1/{name=project" - + "s/*/locations/*/entryGroups/*}\332A\004name\022\276\001" - + "\n\017ListEntryGroups\0223.google.cloud.datacat" - + "alog.v1.ListEntryGroupsRequest\0324.google." - + "cloud.datacatalog.v1.ListEntryGroupsResp" - + "onse\"@\202\323\344\223\0021\022//v1/{parent=projects/*/loc" - + "ations/*}/entryGroups\332A\006parent\022\304\001\n\013Creat" - + "eEntry\022/.google.cloud.datacatalog.v1.Cre" - + "ateEntryRequest\032\".google.cloud.datacatal" - + "og.v1.Entry\"`\202\323\344\223\002B\"9/v1/{parent=project" - + "s/*/locations/*/entryGroups/*}/entries:\005" - + "entry\332A\025parent,entry_id,entry\022\316\001\n\013Update" - + "Entry\022/.google.cloud.datacatalog.v1.Upda" - + "teEntryRequest\032\".google.cloud.datacatalo" - + "g.v1.Entry\"j\202\323\344\223\002H2?/v1/{entry.name=proj" - + "ects/*/locations/*/entryGroups/*/entries" - + "/*}:\005entry\332A\005entry\332A\021entry,update_mask\022\240" - + "\001\n\013DeleteEntry\022/.google.cloud.datacatalo" - + "g.v1.DeleteEntryRequest\032\026.google.protobu" - + "f.Empty\"H\202\323\344\223\002;*9/v1/{name=projects/*/lo" - + "cations/*/entryGroups/*/entries/*}\332A\004nam" - + "e\022\246\001\n\010GetEntry\022,.google.cloud.datacatalo" - + "g.v1.GetEntryRequest\032\".google.cloud.data" - + "catalog.v1.Entry\"H\202\323\344\223\002;\0229/v1/{name=proj" - + "ects/*/locations/*/entryGroups/*/entries" - + "/*}\332A\004name\022~\n\013LookupEntry\022/.google.cloud" - + ".datacatalog.v1.LookupEntryRequest\032\".goo" - + "gle.cloud.datacatalog.v1.Entry\"\032\202\323\344\223\002\024\022\022" - + "/v1/entries:lookup\022\274\001\n\013ListEntries\022/.goo" - + "gle.cloud.datacatalog.v1.ListEntriesRequ" - + "est\0320.google.cloud.datacatalog.v1.ListEn" - + "triesResponse\"J\202\323\344\223\002;\0229/v1/{parent=proje" - + "cts/*/locations/*/entryGroups/*}/entries" - + "\332A\006parent\022\342\001\n\021CreateTagTemplate\0225.google" - + ".cloud.datacatalog.v1.CreateTagTemplateR" - + "equest\032(.google.cloud.datacatalog.v1.Tag" - + "Template\"l\202\323\344\223\002@\"0/v1/{parent=projects/*" - + "/locations/*}/tagTemplates:\014tag_template" - + "\332A#parent,tag_template_id,tag_template\022\257" - + "\001\n\016GetTagTemplate\0222.google.cloud.datacat" - + "alog.v1.GetTagTemplateRequest\032(.google.c" - + "loud.datacatalog.v1.TagTemplate\"?\202\323\344\223\0022\022" - + "0/v1/{name=projects/*/locations/*/tagTem" - + "plates/*}\332A\004name\022\363\001\n\021UpdateTagTemplate\0225" - + ".google.cloud.datacatalog.v1.UpdateTagTe" - + "mplateRequest\032(.google.cloud.datacatalog" - + ".v1.TagTemplate\"}\202\323\344\223\002M2=/v1/{tag_templa" - + "te.name=projects/*/locations/*/tagTempla" - + "tes/*}:\014tag_template\332A\014tag_template\332A\030ta" - + "g_template,update_mask\022\251\001\n\021DeleteTagTemp" - + "late\0225.google.cloud.datacatalog.v1.Delet" - + "eTagTemplateRequest\032\026.google.protobuf.Em" - + "pty\"E\202\323\344\223\0022*0/v1/{name=projects/*/locati" - + "ons/*/tagTemplates/*}\332A\nname,force\022\215\002\n\026C" - + "reateTagTemplateField\022:.google.cloud.dat" - + "acatalog.v1.CreateTagTemplateFieldReques" - + "t\032-.google.cloud.datacatalog.v1.TagTempl" - + "ateField\"\207\001\202\323\344\223\002O\"9/v1/{parent=projects/" - + "*/locations/*/tagTemplates/*}/fields:\022ta" - + "g_template_field\332A/parent,tag_template_f" - + "ield_id,tag_template_field\022\233\002\n\026UpdateTag" - + "TemplateField\022:.google.cloud.datacatalog" - + ".v1.UpdateTagTemplateFieldRequest\032-.goog" - + "le.cloud.datacatalog.v1.TagTemplateField" - + "\"\225\001\202\323\344\223\002O29/v1/{name=projects/*/location" - + "s/*/tagTemplates/*/fields/*}:\022tag_templa" - + "te_field\332A\027name,tag_template_field\332A#nam" - + "e,tag_template_field,update_mask\022\361\001\n\026Ren" - + "ameTagTemplateField\022:.google.cloud.datac" - + "atalog.v1.RenameTagTemplateFieldRequest\032" - + "-.google.cloud.datacatalog.v1.TagTemplat" - + "eField\"l\202\323\344\223\002E\"@/v1/{name=projects/*/loc" - + "ations/*/tagTemplates/*/fields/*}:rename" - + ":\001*\332A\036name,new_tag_template_field_id\022\274\001\n" - + "\026DeleteTagTemplateField\022:.google.cloud.d" - + "atacatalog.v1.DeleteTagTemplateFieldRequ" - + "est\032\026.google.protobuf.Empty\"N\202\323\344\223\002;*9/v1" - + "/{name=projects/*/locations/*/tagTemplat" - + "es/*/fields/*}\332A\nname,force\022\371\001\n\tCreateTa" - + "g\022-.google.cloud.datacatalog.v1.CreateTa" - + "gRequest\032 .google.cloud.datacatalog.v1.T" - + "ag\"\232\001\202\323\344\223\002\206\001\"@/v1/{parent=projects/*/loc" - + "ations/*/entryGroups/*/entries/*}/tags:\003" - + "tagZ=\"6/v1/{parent=projects/*/locations/" - + "*/entryGroups/*}/tags:\003tag\332A\nparent,tag\022" - + "\214\002\n\tUpdateTag\022-.google.cloud.datacatalog" - + ".v1.UpdateTagRequest\032 .google.cloud.data" - + "catalog.v1.Tag\"\255\001\202\323\344\223\002\216\0012D/v1/{tag.name=" - + "projects/*/locations/*/entryGroups/*/ent" - + "ries/*/tags/*}:\003tagZA2:/v1/{tag.name=pro" - + "jects/*/locations/*/entryGroups/*/tags/*" - + "}:\003tag\332A\003tag\332A\017tag,update_mask\022\336\001\n\tDelet" - + "eTag\022-.google.cloud.datacatalog.v1.Delet" - + "eTagRequest\032\026.google.protobuf.Empty\"\211\001\202\323" - + "\344\223\002|*@/v1/{name=projects/*/locations/*/e" - + "ntryGroups/*/entries/*/tags/*}Z8*6/v1/{n" + + "ateField\022&\n\031new_tag_template_field_id\030\002 " + + "\001(\tB\003\340A\002\"\236\001\n&RenameTagTemplateFieldEnumV" + + "alueRequest\022J\n\004name\030\001 \001(\tB<\340A\002\372A6\n4datac" + + "atalog.googleapis.com/TagTemplateFieldEn" + + "umValue\022(\n\033new_enum_value_display_name\030\002" + + " \001(\tB\003\340A\002\"v\n\035DeleteTagTemplateFieldReque" + + "st\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+datacatalog.go" + + "ogleapis.com/TagTemplateField\022\022\n\005force\030\002" + + " \001(\010B\003\340A\002\"p\n\017ListTagsRequest\0226\n\006parent\030\001" + + " \001(\tB&\340A\002\372A \022\036datacatalog.googleapis.com" + + "/Tag\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"[\n\020ListTagsResponse\022.\n\004tags\030\001 \003(\0132 ." + + "google.cloud.datacatalog.v1.Tag\022\027\n\017next_" + + "page_token\030\002 \001(\t\"\251\001\n\022ListEntriesRequest\022" + + "=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%datacatalog.goo" + + "gleapis.com/EntryGroup\022\021\n\tpage_size\030\002 \001(" + + "\005\022\022\n\npage_token\030\003 \001(\t\022-\n\tread_mask\030\004 \001(\013" + + "2\032.google.protobuf.FieldMask\"c\n\023ListEntr" + + "iesResponse\0223\n\007entries\030\001 \003(\0132\".google.cl" + + "oud.datacatalog.v1.Entry\022\027\n\017next_page_to" + + "ken\030\002 \001(\t*v\n\tEntryType\022\032\n\026ENTRY_TYPE_UNS" + + "PECIFIED\020\000\022\t\n\005TABLE\020\002\022\t\n\005MODEL\020\005\022\017\n\013DATA" + + "_STREAM\020\003\022\013\n\007FILESET\020\004\022\014\n\010DATABASE\020\007\022\013\n\007" + + "SERVICE\020\0162\3021\n\013DataCatalog\022\243\001\n\rSearchCata" + + "log\0221.google.cloud.datacatalog.v1.Search" + + "CatalogRequest\0322.google.cloud.datacatalo" + + "g.v1.SearchCatalogResponse\"+\202\323\344\223\002\027\"\022/v1/" + + "catalog:search:\001*\332A\013scope,query\022\333\001\n\020Crea" + + "teEntryGroup\0224.google.cloud.datacatalog." + + "v1.CreateEntryGroupRequest\032\'.google.clou" + + "d.datacatalog.v1.EntryGroup\"h\202\323\344\223\002>\"//v1" + + "/{parent=projects/*/locations/*}/entryGr" + + "oups:\013entry_group\332A!parent,entry_group_i" + + "d,entry_group\022\274\001\n\rGetEntryGroup\0221.google" + + ".cloud.datacatalog.v1.GetEntryGroupReque" + + "st\032\'.google.cloud.datacatalog.v1.EntryGr" + + "oup\"O\202\323\344\223\0021\022//v1/{name=projects/*/locati" + + "ons/*/entryGroups/*}\332A\004name\332A\016name,read_" + + "mask\022\353\001\n\020UpdateEntryGroup\0224.google.cloud" + + ".datacatalog.v1.UpdateEntryGroupRequest\032" + + "\'.google.cloud.datacatalog.v1.EntryGroup" + + "\"x\202\323\344\223\002J2;/v1/{entry_group.name=projects" + + "/*/locations/*/entryGroups/*}:\013entry_gro" + + "up\332A\013entry_group\332A\027entry_group,update_ma" + + "sk\022\240\001\n\020DeleteEntryGroup\0224.google.cloud.d" + + "atacatalog.v1.DeleteEntryGroupRequest\032\026." + + "google.protobuf.Empty\">\202\323\344\223\0021*//v1/{name" + + "=projects/*/locations/*/entryGroups/*}\332A" + + "\004name\022\276\001\n\017ListEntryGroups\0223.google.cloud" + + ".datacatalog.v1.ListEntryGroupsRequest\0324" + + ".google.cloud.datacatalog.v1.ListEntryGr" + + "oupsResponse\"@\202\323\344\223\0021\022//v1/{parent=projec" + + "ts/*/locations/*}/entryGroups\332A\006parent\022\304" + + "\001\n\013CreateEntry\022/.google.cloud.datacatalo" + + "g.v1.CreateEntryRequest\032\".google.cloud.d" + + "atacatalog.v1.Entry\"`\202\323\344\223\002B\"9/v1/{parent" + + "=projects/*/locations/*/entryGroups/*}/e" + + "ntries:\005entry\332A\025parent,entry_id,entry\022\316\001" + + "\n\013UpdateEntry\022/.google.cloud.datacatalog" + + ".v1.UpdateEntryRequest\032\".google.cloud.da" + + "tacatalog.v1.Entry\"j\202\323\344\223\002H2?/v1/{entry.n" + + "ame=projects/*/locations/*/entryGroups/*" + + "/entries/*}:\005entry\332A\005entry\332A\021entry,updat" + + "e_mask\022\240\001\n\013DeleteEntry\022/.google.cloud.da" + + "tacatalog.v1.DeleteEntryRequest\032\026.google" + + ".protobuf.Empty\"H\202\323\344\223\002;*9/v1/{name=proje" + + "cts/*/locations/*/entryGroups/*/entries/" + + "*}\332A\004name\022\246\001\n\010GetEntry\022,.google.cloud.da" + + "tacatalog.v1.GetEntryRequest\032\".google.cl" + + "oud.datacatalog.v1.Entry\"H\202\323\344\223\002;\0229/v1/{n" + "ame=projects/*/locations/*/entryGroups/*" - + "/tags/*}\332A\004name\022\365\001\n\010ListTags\022,.google.cl" - + "oud.datacatalog.v1.ListTagsRequest\032-.goo" - + "gle.cloud.datacatalog.v1.ListTagsRespons" - + "e\"\213\001\202\323\344\223\002|\022@/v1/{parent=projects/*/locat" - + "ions/*/entryGroups/*/entries/*}/tagsZ8\0226" - + "/v1/{parent=projects/*/locations/*/entry" - + "Groups/*}/tags\332A\006parent\022\362\001\n\014SetIamPolicy" - + "\022\".google.iam.v1.SetIamPolicyRequest\032\025.g" - + "oogle.iam.v1.Policy\"\246\001\202\323\344\223\002\215\001\"A/v1/{reso" - + "urce=projects/*/locations/*/tagTemplates" - + "/*}:setIamPolicy:\001*ZE\"@/v1/{resource=pro" - + "jects/*/locations/*/entryGroups/*}:setIa" - + "mPolicy:\001*\332A\017resource,policy\022\274\002\n\014GetIamP" - + "olicy\022\".google.iam.v1.GetIamPolicyReques" - + "t\032\025.google.iam.v1.Policy\"\360\001\202\323\344\223\002\336\001\"A/v1/" + + "/entries/*}\332A\004name\022~\n\013LookupEntry\022/.goog" + + "le.cloud.datacatalog.v1.LookupEntryReque" + + "st\032\".google.cloud.datacatalog.v1.Entry\"\032" + + "\202\323\344\223\002\024\022\022/v1/entries:lookup\022\274\001\n\013ListEntri" + + "es\022/.google.cloud.datacatalog.v1.ListEnt" + + "riesRequest\0320.google.cloud.datacatalog.v" + + "1.ListEntriesResponse\"J\202\323\344\223\002;\0229/v1/{pare" + + "nt=projects/*/locations/*/entryGroups/*}" + + "/entries\332A\006parent\022\342\001\n\021CreateTagTemplate\022" + + "5.google.cloud.datacatalog.v1.CreateTagT" + + "emplateRequest\032(.google.cloud.datacatalo" + + "g.v1.TagTemplate\"l\202\323\344\223\002@\"0/v1/{parent=pr" + + "ojects/*/locations/*}/tagTemplates:\014tag_" + + "template\332A#parent,tag_template_id,tag_te" + + "mplate\022\257\001\n\016GetTagTemplate\0222.google.cloud" + + ".datacatalog.v1.GetTagTemplateRequest\032(." + + "google.cloud.datacatalog.v1.TagTemplate\"" + + "?\202\323\344\223\0022\0220/v1/{name=projects/*/locations/" + + "*/tagTemplates/*}\332A\004name\022\363\001\n\021UpdateTagTe" + + "mplate\0225.google.cloud.datacatalog.v1.Upd" + + "ateTagTemplateRequest\032(.google.cloud.dat" + + "acatalog.v1.TagTemplate\"}\202\323\344\223\002M2=/v1/{ta" + + "g_template.name=projects/*/locations/*/t" + + "agTemplates/*}:\014tag_template\332A\014tag_templ" + + "ate\332A\030tag_template,update_mask\022\251\001\n\021Delet" + + "eTagTemplate\0225.google.cloud.datacatalog." + + "v1.DeleteTagTemplateRequest\032\026.google.pro" + + "tobuf.Empty\"E\202\323\344\223\0022*0/v1/{name=projects/" + + "*/locations/*/tagTemplates/*}\332A\nname,for" + + "ce\022\215\002\n\026CreateTagTemplateField\022:.google.c" + + "loud.datacatalog.v1.CreateTagTemplateFie" + + "ldRequest\032-.google.cloud.datacatalog.v1." + + "TagTemplateField\"\207\001\202\323\344\223\002O\"9/v1/{parent=p" + + "rojects/*/locations/*/tagTemplates/*}/fi" + + "elds:\022tag_template_field\332A/parent,tag_te" + + "mplate_field_id,tag_template_field\022\233\002\n\026U" + + "pdateTagTemplateField\022:.google.cloud.dat" + + "acatalog.v1.UpdateTagTemplateFieldReques" + + "t\032-.google.cloud.datacatalog.v1.TagTempl" + + "ateField\"\225\001\202\323\344\223\002O29/v1/{name=projects/*/" + + "locations/*/tagTemplates/*/fields/*}:\022ta" + + "g_template_field\332A\027name,tag_template_fie" + + "ld\332A#name,tag_template_field,update_mask" + + "\022\361\001\n\026RenameTagTemplateField\022:.google.clo" + + "ud.datacatalog.v1.RenameTagTemplateField" + + "Request\032-.google.cloud.datacatalog.v1.Ta" + + "gTemplateField\"l\202\323\344\223\002E\"@/v1/{name=projec" + + "ts/*/locations/*/tagTemplates/*/fields/*" + + "}:rename:\001*\332A\036name,new_tag_template_fiel" + + "d_id\022\222\002\n\037RenameTagTemplateFieldEnumValue" + + "\022C.google.cloud.datacatalog.v1.RenameTag" + + "TemplateFieldEnumValueRequest\032-.google.c" + + "loud.datacatalog.v1.TagTemplateField\"{\202\323" + + "\344\223\002R\"M/v1/{name=projects/*/locations/*/t" + + "agTemplates/*/fields/*/enumValues/*}:ren" + + "ame:\001*\332A name,new_enum_value_display_nam" + + "e\022\274\001\n\026DeleteTagTemplateField\022:.google.cl" + + "oud.datacatalog.v1.DeleteTagTemplateFiel" + + "dRequest\032\026.google.protobuf.Empty\"N\202\323\344\223\002;" + + "*9/v1/{name=projects/*/locations/*/tagTe" + + "mplates/*/fields/*}\332A\nname,force\022\371\001\n\tCre" + + "ateTag\022-.google.cloud.datacatalog.v1.Cre" + + "ateTagRequest\032 .google.cloud.datacatalog" + + ".v1.Tag\"\232\001\202\323\344\223\002\206\001\"@/v1/{parent=projects/" + + "*/locations/*/entryGroups/*/entries/*}/t" + + "ags:\003tagZ=\"6/v1/{parent=projects/*/locat" + + "ions/*/entryGroups/*}/tags:\003tag\332A\nparent" + + ",tag\022\214\002\n\tUpdateTag\022-.google.cloud.dataca" + + "talog.v1.UpdateTagRequest\032 .google.cloud" + + ".datacatalog.v1.Tag\"\255\001\202\323\344\223\002\216\0012D/v1/{tag." + + "name=projects/*/locations/*/entryGroups/" + + "*/entries/*/tags/*}:\003tagZA2:/v1/{tag.nam" + + "e=projects/*/locations/*/entryGroups/*/t" + + "ags/*}:\003tag\332A\003tag\332A\017tag,update_mask\022\336\001\n\t" + + "DeleteTag\022-.google.cloud.datacatalog.v1." + + "DeleteTagRequest\032\026.google.protobuf.Empty" + + "\"\211\001\202\323\344\223\002|*@/v1/{name=projects/*/location" + + "s/*/entryGroups/*/entries/*/tags/*}Z8*6/" + + "v1/{name=projects/*/locations/*/entryGro" + + "ups/*/tags/*}\332A\004name\022\365\001\n\010ListTags\022,.goog" + + "le.cloud.datacatalog.v1.ListTagsRequest\032" + + "-.google.cloud.datacatalog.v1.ListTagsRe" + + "sponse\"\213\001\202\323\344\223\002|\022@/v1/{parent=projects/*/" + + "locations/*/entryGroups/*/entries/*}/tag" + + "sZ8\0226/v1/{parent=projects/*/locations/*/" + + "entryGroups/*}/tags\332A\006parent\022\362\001\n\014SetIamP" + + "olicy\022\".google.iam.v1.SetIamPolicyReques" + + "t\032\025.google.iam.v1.Policy\"\246\001\202\323\344\223\002\215\001\"A/v1/" + "{resource=projects/*/locations/*/tagTemp" - + "lates/*}:getIamPolicy:\001*ZE\"@/v1/{resourc" + + "lates/*}:setIamPolicy:\001*ZE\"@/v1/{resourc" + "e=projects/*/locations/*/entryGroups/*}:" - + "getIamPolicy:\001*ZO\"J/v1/{resource=project" - + "s/*/locations/*/entryGroups/*/entries/*}" - + ":getIamPolicy:\001*\332A\010resource\022\343\002\n\022TestIamP" - + "ermissions\022(.google.iam.v1.TestIamPermis" - + "sionsRequest\032).google.iam.v1.TestIamPerm" - + "issionsResponse\"\367\001\202\323\344\223\002\360\001\"G/v1/{resource" - + "=projects/*/locations/*/tagTemplates/*}:" - + "testIamPermissions:\001*ZK\"F/v1/{resource=p" - + "rojects/*/locations/*/entryGroups/*}:tes" - + "tIamPermissions:\001*ZU\"P/v1/{resource=proj" - + "ects/*/locations/*/entryGroups/*/entries" - + "/*}:testIamPermissions:\001*\032N\312A\032datacatalo" - + "g.googleapis.com\322A.https://www.googleapi" - + "s.com/auth/cloud-platformB\313\001\n\037com.google" - + ".cloud.datacatalog.v1P\001ZFgoogle.golang.o" - + "rg/genproto/googleapis/cloud/datacatalog" - + "/v1;datacatalog\370\001\001\252\002\033Google.Cloud.DataCa" - + "talog.V1\312\002\033Google\\Cloud\\DataCatalog\\V1\352\002" - + "\036Google::Cloud::DataCatalog::V1b\006proto3" + + "setIamPolicy:\001*\332A\017resource,policy\022\274\002\n\014Ge" + + "tIamPolicy\022\".google.iam.v1.GetIamPolicyR" + + "equest\032\025.google.iam.v1.Policy\"\360\001\202\323\344\223\002\336\001\"" + + "A/v1/{resource=projects/*/locations/*/ta" + + "gTemplates/*}:getIamPolicy:\001*ZE\"@/v1/{re" + + "source=projects/*/locations/*/entryGroup" + + "s/*}:getIamPolicy:\001*ZO\"J/v1/{resource=pr" + + "ojects/*/locations/*/entryGroups/*/entri" + + "es/*}:getIamPolicy:\001*\332A\010resource\022\343\002\n\022Tes" + + "tIamPermissions\022(.google.iam.v1.TestIamP" + + "ermissionsRequest\032).google.iam.v1.TestIa" + + "mPermissionsResponse\"\367\001\202\323\344\223\002\360\001\"G/v1/{res" + + "ource=projects/*/locations/*/tagTemplate" + + "s/*}:testIamPermissions:\001*ZK\"F/v1/{resou" + + "rce=projects/*/locations/*/entryGroups/*" + + "}:testIamPermissions:\001*ZU\"P/v1/{resource" + + "=projects/*/locations/*/entryGroups/*/en" + + "tries/*}:testIamPermissions:\001*\032N\312A\032datac" + + "atalog.googleapis.com\322A.https://www.goog" + + "leapis.com/auth/cloud-platformB\217\003\n\037com.g" + + "oogle.cloud.datacatalog.v1P\001ZFgoogle.gol" + + "ang.org/genproto/googleapis/cloud/dataca" + + "talog/v1;datacatalog\370\001\001\252\002\033Google.Cloud.D" + + "ataCatalog.V1\312\002\033Google\\Cloud\\DataCatalog" + + "\\V1\352\002\036Google::Cloud::DataCatalog::V1\352A\300\001" + + "\n4datacatalog.googleapis.com/TagTemplate" + + "FieldEnumValue\022\207\001projects/{project}/loca" + + "tions/{location}/tagTemplates/{tag_templ" + + "ate}/fields/{tag_template_field_id}/enum" + + "Values/{enum_value_display_name}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -470,6 +506,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.datacatalog.v1.Common.getDescriptor(), + com.google.cloud.datacatalog.v1.DataSourceProto.getDescriptor(), com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass.getDescriptor(), com.google.cloud.datacatalog.v1.SchemaOuterClass.getDescriptor(), com.google.cloud.datacatalog.v1.Search.getDescriptor(), @@ -480,6 +517,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.iam.v1.PolicyProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_datacatalog_v1_SearchCatalogRequest_descriptor = getDescriptor().getMessageTypes().get(0); @@ -596,7 +634,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_LookupEntryRequest_descriptor, new java.lang.String[] { - "LinkedResource", "SqlResource", "TargetName", + "LinkedResource", "SqlResource", "FullyQualifiedName", "TargetName", }); internal_static_google_cloud_datacatalog_v1_Entry_descriptor = getDescriptor().getMessageTypes().get(13); @@ -606,6 +644,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "LinkedResource", + "FullyQualifiedName", "Type", "UserSpecifiedType", "IntegratedSystem", @@ -613,16 +652,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsFilesetSpec", "BigqueryTableSpec", "BigqueryDateShardedSpec", + "DatabaseTableSpec", "DisplayName", "Description", "Schema", "SourceSystemTimestamps", + "DataSource", "EntryType", "System", "TypeSpec", + "Spec", }); - internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor = + internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DatabaseTableSpec_descriptor, + new java.lang.String[] { + "Type", + }); + internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor = + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_datacatalog_v1_EntryGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_EntryGroup_descriptor, @@ -630,7 +680,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "DisplayName", "Description", "DataCatalogTimestamps", }); internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_CreateTagTemplateRequest_descriptor, @@ -638,7 +688,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "TagTemplateId", "TagTemplate", }); internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_GetTagTemplateRequest_descriptor, @@ -646,7 +696,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateRequest_descriptor, @@ -654,7 +704,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TagTemplate", "UpdateMask", }); internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateRequest_descriptor, @@ -662,7 +712,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Force", }); internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_datacatalog_v1_CreateTagRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_CreateTagRequest_descriptor, @@ -670,7 +720,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Tag", }); internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_UpdateTagRequest_descriptor, @@ -678,7 +728,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Tag", "UpdateMask", }); internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_DeleteTagRequest_descriptor, @@ -686,7 +736,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_CreateTagTemplateFieldRequest_descriptor, @@ -694,7 +744,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "TagTemplateFieldId", "TagTemplateField", }); internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_UpdateTagTemplateFieldRequest_descriptor, @@ -702,15 +752,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "TagTemplateField", "UpdateMask", }); internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldRequest_descriptor, new java.lang.String[] { "Name", "NewTagTemplateFieldId", }); + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_descriptor, + new java.lang.String[] { + "Name", "NewEnumValueDisplayName", + }); internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_DeleteTagTemplateFieldRequest_descriptor, @@ -718,7 +776,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Force", }); internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_datacatalog_v1_ListTagsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_ListTagsRequest_descriptor, @@ -726,7 +784,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_datacatalog_v1_ListTagsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_ListTagsResponse_descriptor, @@ -734,7 +792,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Tags", "NextPageToken", }); internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_ListEntriesRequest_descriptor, @@ -742,7 +800,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_ListEntriesResponse_descriptor, @@ -757,6 +815,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); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); @@ -765,6 +824,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.datacatalog.v1.Common.getDescriptor(); + com.google.cloud.datacatalog.v1.DataSourceProto.getDescriptor(); com.google.cloud.datacatalog.v1.GcsFilesetSpecOuterClass.getDescriptor(); com.google.cloud.datacatalog.v1.SchemaOuterClass.getDescriptor(); com.google.cloud.datacatalog.v1.Search.getDescriptor(); @@ -775,6 +835,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.iam.v1.PolicyProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequest.java new file mode 100644 index 00000000..7937040c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [DeletePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTag].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DeletePolicyTagRequest} + */ +public final class DeletePolicyTagRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DeletePolicyTagRequest) + DeletePolicyTagRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePolicyTagRequest.newBuilder() to construct. + private DeletePolicyTagRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePolicyTagRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePolicyTagRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeletePolicyTagRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.class, + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. Resource name of the policy tag to be deleted. All of its descendant
    +   * policy tags will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the policy tag to be deleted. All of its descendant
    +   * policy tags will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.DeletePolicyTagRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest other = + (com.google.cloud.datacatalog.v1.DeletePolicyTagRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [DeletePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTag].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DeletePolicyTagRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DeletePolicyTagRequest) + com.google.cloud.datacatalog.v1.DeletePolicyTagRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.class, + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeletePolicyTagRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeletePolicyTagRequest build() { + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeletePolicyTagRequest buildPartial() { + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest result = + new com.google.cloud.datacatalog.v1.DeletePolicyTagRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.DeletePolicyTagRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.DeletePolicyTagRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DeletePolicyTagRequest other) { + if (other == com.google.cloud.datacatalog.v1.DeletePolicyTagRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.DeletePolicyTagRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.DeletePolicyTagRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. Resource name of the policy tag to be deleted. All of its descendant
    +     * policy tags will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the policy tag to be deleted. All of its descendant
    +     * policy tags will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the policy tag to be deleted. All of its descendant
    +     * policy tags will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the policy tag to be deleted. All of its descendant
    +     * policy tags will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the policy tag to be deleted. All of its descendant
    +     * policy tags will also be deleted.
    +     * 
    + * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.DeletePolicyTagRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DeletePolicyTagRequest) + private static final com.google.cloud.datacatalog.v1.DeletePolicyTagRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DeletePolicyTagRequest(); + } + + public static com.google.cloud.datacatalog.v1.DeletePolicyTagRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePolicyTagRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeletePolicyTagRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeletePolicyTagRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequestOrBuilder.java new file mode 100644 index 00000000..91eb76b3 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface DeletePolicyTagRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DeletePolicyTagRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the policy tag to be deleted. All of its descendant
    +   * policy tags will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. Resource name of the policy tag to be deleted. All of its descendant
    +   * policy tags will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequest.java new file mode 100644 index 00000000..4de4b72e --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [DeleteTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomy].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTaxonomyRequest} + */ +public final class DeleteTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.DeleteTaxonomyRequest) + DeleteTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTaxonomyRequest.newBuilder() to construct. + private DeleteTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTaxonomyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTaxonomyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTaxonomyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +   * this taxonomy will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +   * this taxonomy will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest other = + (com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [DeleteTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomy].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.DeleteTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.DeleteTaxonomyRequest) + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest build() { + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest buildPartial() { + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest result = + new com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest other) { + if (other == com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +     * this taxonomy will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +     * this taxonomy will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +     * this taxonomy will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +     * this taxonomy will also be deleted.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +     * this taxonomy will also be deleted.
    +     * 
    + * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.DeleteTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.DeleteTaxonomyRequest) + private static final com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest(); + } + + public static com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTaxonomyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTaxonomyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.DeleteTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequestOrBuilder.java new file mode 100644 index 00000000..ed8e3122 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface DeleteTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.DeleteTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +   * this taxonomy will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. Resource name of the taxonomy to be deleted. All policy tags in
    +   * this taxonomy will also be deleted.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java index cfb93687..00234f11 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java @@ -48,6 +48,7 @@ private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Entry() { name_ = ""; linkedResource_ = ""; + fullyQualifiedName_ = ""; displayName_ = ""; description_ = ""; } @@ -224,6 +225,47 @@ private Entry( system_ = s; break; } + case 162: + { + com.google.cloud.datacatalog.v1.DataSource.Builder subBuilder = null; + if (dataSource_ != null) { + subBuilder = dataSource_.toBuilder(); + } + dataSource_ = + input.readMessage( + com.google.cloud.datacatalog.v1.DataSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataSource_); + dataSource_ = subBuilder.buildPartial(); + } + + break; + } + case 194: + { + com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder subBuilder = null; + if (specCase_ == 24) { + subBuilder = + ((com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_).toBuilder(); + } + spec_ = + input.readMessage( + com.google.cloud.datacatalog.v1.DatabaseTableSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_); + spec_ = subBuilder.buildPartial(); + } + specCase_ = 24; + break; + } + case 234: + { + java.lang.String s = input.readStringRequireUtf8(); + + fullyQualifiedName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -402,19 +444,66 @@ public TypeSpecCase getTypeSpecCase() { return TypeSpecCase.forNumber(typeSpecCase_); } + private int specCase_ = 0; + private java.lang.Object spec_; + + public enum SpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATABASE_TABLE_SPEC(24), + SPEC_NOT_SET(0); + private final int value; + + private SpecCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SpecCase valueOf(int value) { + return forNumber(value); + } + + public static SpecCase forNumber(int value) { + switch (value) { + case 24: + return DATABASE_TABLE_SPEC; + case 0: + return SPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SpecCase getSpecCase() { + return SpecCase.forNumber(specCase_); + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** * * *
    -   * The Data Catalog resource name of the entry in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Output only. The resource name of an entry in URL format.
    +   * Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The entry itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -434,13 +523,16 @@ public java.lang.String getName() { * * *
    -   * The Data Catalog resource name of the entry in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Output only. The resource name of an entry in URL format.
    +   * Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The entry itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -468,10 +560,14 @@ public com.google.protobuf.ByteString getNameBytes() { * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -499,10 +595,14 @@ public java.lang.String getLinkedResource() { * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -522,6 +622,73 @@ public com.google.protobuf.ByteString getLinkedResourceBytes() { } } + public static final int FULLY_QUALIFIED_NAME_FIELD_NUMBER = 29; + private volatile java.lang.Object fullyQualifiedName_; + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource. Set automatically for entries
    +   * representing resources from synced systems. Settable only during creation
    +   * and read-only afterwards. Can be used for search and lookup of the entries.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 29; + * + * @return The fullyQualifiedName. + */ + @java.lang.Override + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullyQualifiedName_ = s; + return s; + } + } + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource. Set automatically for entries
    +   * representing resources from synced systems. Settable only during creation
    +   * and read-only afterwards. Can be used for search and lookup of the entries.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 29; + * + * @return The bytes for fullyQualifiedName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullyQualifiedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int TYPE_FIELD_NUMBER = 2; /** * @@ -677,8 +844,8 @@ public com.google.protobuf.ByteString getUserSpecifiedTypeBytes() { * * *
    -   * Output only. This field indicates the entry's source system that Data
    -   * Catalog integrates with, such as BigQuery or Pub/Sub.
    +   * Output only. This field indicates the entry's source system that Data Catalog
    +   * integrates with, such as BigQuery or Pub/Sub.
        * 
    * * @@ -694,8 +861,8 @@ public boolean hasIntegratedSystem() { * * *
    -   * Output only. This field indicates the entry's source system that Data
    -   * Catalog integrates with, such as BigQuery or Pub/Sub.
    +   * Output only. This field indicates the entry's source system that Data Catalog
    +   * integrates with, such as BigQuery or Pub/Sub.
        * 
    * * @@ -714,8 +881,8 @@ public int getIntegratedSystemValue() { * * *
    -   * Output only. This field indicates the entry's source system that Data
    -   * Catalog integrates with, such as BigQuery or Pub/Sub.
    +   * Output only. This field indicates the entry's source system that Data Catalog
    +   * integrates with, such as BigQuery or Pub/Sub.
        * 
    * * @@ -988,15 +1155,72 @@ public com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec getBigqueryDateSh return com.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.getDefaultInstance(); } + public static final int DATABASE_TABLE_SPEC_FIELD_NUMBER = 24; + /** + * + * + *
    +   * Specification that applies to a table resource. Only valid
    +   * for entries of `TABLE` type.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * + * @return Whether the databaseTableSpec field is set. + */ + @java.lang.Override + public boolean hasDatabaseTableSpec() { + return specCase_ == 24; + } + /** + * + * + *
    +   * Specification that applies to a table resource. Only valid
    +   * for entries of `TABLE` type.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * + * @return The databaseTableSpec. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec getDatabaseTableSpec() { + if (specCase_ == 24) { + return (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_; + } + return com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance(); + } + /** + * + * + *
    +   * Specification that applies to a table resource. Only valid
    +   * for entries of `TABLE` type.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpecOrBuilder + getDatabaseTableSpecOrBuilder() { + if (specCase_ == 24) { + return (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_; + } + return com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance(); + } + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object displayName_; /** * * *
    -   * Display information such as title and description. A short name to identify
    -   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -   * empty string.
    +   * Display name of an entry.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum size is 200 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string display_name = 3; @@ -1019,9 +1243,11 @@ public java.lang.String getDisplayName() { * * *
    -   * Display information such as title and description. A short name to identify
    -   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -   * empty string.
    +   * Display name of an entry.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum size is 200 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string display_name = 3; @@ -1047,8 +1273,13 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
    -   * Entry description, which can consist of several sentences or paragraphs
    -   * that describe entry contents. Default value is an empty string.
    +   * Entry description that can consist of several sentences or paragraphs
    +   * that describe entry contents.
    +   * The description must not contain Unicode non-characters as well as C0
    +   * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +   * (CR), and page breaks (FF).
    +   * The maximum size is 2000 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string description = 4; @@ -1071,8 +1302,13 @@ public java.lang.String getDescription() { * * *
    -   * Entry description, which can consist of several sentences or paragraphs
    -   * that describe entry contents. Default value is an empty string.
    +   * Entry description that can consist of several sentences or paragraphs
    +   * that describe entry contents.
    +   * The description must not contain Unicode non-characters as well as C0
    +   * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +   * (CR), and page breaks (FF).
    +   * The maximum size is 2000 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string description = 4; @@ -1196,6 +1432,60 @@ public com.google.cloud.datacatalog.v1.SystemTimestamps getSourceSystemTimestamp return getSourceSystemTimestamps(); } + public static final int DATA_SOURCE_FIELD_NUMBER = 20; + private com.google.cloud.datacatalog.v1.DataSource dataSource_; + /** + * + * + *
    +   * Output only. Physical location of the entry.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSource field is set. + */ + @java.lang.Override + public boolean hasDataSource() { + return dataSource_ != null; + } + /** + * + * + *
    +   * Output only. Physical location of the entry.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSource. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSource getDataSource() { + return dataSource_ == null + ? com.google.cloud.datacatalog.v1.DataSource.getDefaultInstance() + : dataSource_; + } + /** + * + * + *
    +   * Output only. Physical location of the entry.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DataSourceOrBuilder getDataSourceOrBuilder() { + return getDataSource(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1249,6 +1539,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (systemCase_ == 18) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, system_); } + if (dataSource_ != null) { + output.writeMessage(20, getDataSource()); + } + if (specCase_ == 24) { + output.writeMessage(24, (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_); + } + if (!getFullyQualifiedNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, fullyQualifiedName_); + } unknownFields.writeTo(output); } @@ -1307,6 +1606,17 @@ public int getSerializedSize() { if (systemCase_ == 18) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, system_); } + if (dataSource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getDataSource()); + } + if (specCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_); + } + if (!getFullyQualifiedNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, fullyQualifiedName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1324,6 +1634,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getLinkedResource().equals(other.getLinkedResource())) return false; + if (!getFullyQualifiedName().equals(other.getFullyQualifiedName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getDescription().equals(other.getDescription())) return false; if (hasSchema() != other.hasSchema()) return false; @@ -1334,6 +1645,10 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceSystemTimestamps()) { if (!getSourceSystemTimestamps().equals(other.getSourceSystemTimestamps())) return false; } + if (hasDataSource() != other.hasDataSource()) return false; + if (hasDataSource()) { + if (!getDataSource().equals(other.getDataSource())) return false; + } if (!getEntryTypeCase().equals(other.getEntryTypeCase())) return false; switch (entryTypeCase_) { case 2: @@ -1370,6 +1685,14 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } + if (!getSpecCase().equals(other.getSpecCase())) return false; + switch (specCase_) { + case 24: + if (!getDatabaseTableSpec().equals(other.getDatabaseTableSpec())) return false; + break; + case 0: + default: + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1385,6 +1708,8 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + LINKED_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getLinkedResource().hashCode(); + hash = (37 * hash) + FULLY_QUALIFIED_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullyQualifiedName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; @@ -1397,6 +1722,10 @@ public int hashCode() { hash = (37 * hash) + SOURCE_SYSTEM_TIMESTAMPS_FIELD_NUMBER; hash = (53 * hash) + getSourceSystemTimestamps().hashCode(); } + if (hasDataSource()) { + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + } switch (entryTypeCase_) { case 2: hash = (37 * hash) + TYPE_FIELD_NUMBER; @@ -1437,6 +1766,14 @@ public int hashCode() { case 0: default: } + switch (specCase_) { + case 24: + hash = (37 * hash) + DATABASE_TABLE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseTableSpec().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1593,6 +1930,8 @@ public Builder clear() { linkedResource_ = ""; + fullyQualifiedName_ = ""; + displayName_ = ""; description_ = ""; @@ -1609,12 +1948,20 @@ public Builder clear() { sourceSystemTimestamps_ = null; sourceSystemTimestampsBuilder_ = null; } + if (dataSourceBuilder_ == null) { + dataSource_ = null; + } else { + dataSource_ = null; + dataSourceBuilder_ = null; + } entryTypeCase_ = 0; entryType_ = null; systemCase_ = 0; system_ = null; typeSpecCase_ = 0; typeSpec_ = null; + specCase_ = 0; + spec_ = null; return this; } @@ -1644,6 +1991,7 @@ public com.google.cloud.datacatalog.v1.Entry buildPartial() { new com.google.cloud.datacatalog.v1.Entry(this); result.name_ = name_; result.linkedResource_ = linkedResource_; + result.fullyQualifiedName_ = fullyQualifiedName_; if (entryTypeCase_ == 2) { result.entryType_ = entryType_; } @@ -1677,6 +2025,13 @@ public com.google.cloud.datacatalog.v1.Entry buildPartial() { result.typeSpec_ = bigqueryDateShardedSpecBuilder_.build(); } } + if (specCase_ == 24) { + if (databaseTableSpecBuilder_ == null) { + result.spec_ = spec_; + } else { + result.spec_ = databaseTableSpecBuilder_.build(); + } + } result.displayName_ = displayName_; result.description_ = description_; if (schemaBuilder_ == null) { @@ -1689,9 +2044,15 @@ public com.google.cloud.datacatalog.v1.Entry buildPartial() { } else { result.sourceSystemTimestamps_ = sourceSystemTimestampsBuilder_.build(); } + if (dataSourceBuilder_ == null) { + result.dataSource_ = dataSource_; + } else { + result.dataSource_ = dataSourceBuilder_.build(); + } result.entryTypeCase_ = entryTypeCase_; result.systemCase_ = systemCase_; result.typeSpecCase_ = typeSpecCase_; + result.specCase_ = specCase_; onBuilt(); return result; } @@ -1749,6 +2110,10 @@ public Builder mergeFrom(com.google.cloud.datacatalog.v1.Entry other) { linkedResource_ = other.linkedResource_; onChanged(); } + if (!other.getFullyQualifiedName().isEmpty()) { + fullyQualifiedName_ = other.fullyQualifiedName_; + onChanged(); + } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); @@ -1763,6 +2128,9 @@ public Builder mergeFrom(com.google.cloud.datacatalog.v1.Entry other) { if (other.hasSourceSystemTimestamps()) { mergeSourceSystemTimestamps(other.getSourceSystemTimestamps()); } + if (other.hasDataSource()) { + mergeDataSource(other.getDataSource()); + } switch (other.getEntryTypeCase()) { case TYPE: { @@ -1820,6 +2188,17 @@ public Builder mergeFrom(com.google.cloud.datacatalog.v1.Entry other) { break; } } + switch (other.getSpecCase()) { + case DATABASE_TABLE_SPEC: + { + mergeDatabaseTableSpec(other.getDatabaseTableSpec()); + break; + } + case SPEC_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1891,18 +2270,35 @@ public Builder clearTypeSpec() { return this; } + private int specCase_ = 0; + private java.lang.Object spec_; + + public SpecCase getSpecCase() { + return SpecCase.forNumber(specCase_); + } + + public Builder clearSpec() { + specCase_ = 0; + spec_ = null; + onChanged(); + return this; + } + private java.lang.Object name_ = ""; /** * * *
    -     * The Data Catalog resource name of the entry in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Output only. The resource name of an entry in URL format.
    +     * Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The entry itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -1921,13 +2317,16 @@ public java.lang.String getName() { * * *
    -     * The Data Catalog resource name of the entry in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Output only. The resource name of an entry in URL format.
    +     * Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The entry itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -1946,13 +2345,16 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
    -     * The Data Catalog resource name of the entry in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Output only. The resource name of an entry in URL format.
    +     * Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The entry itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -1970,13 +2372,16 @@ public Builder setName(java.lang.String value) { * * *
    -     * The Data Catalog resource name of the entry in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Output only. The resource name of an entry in URL format.
    +     * Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The entry itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -1990,13 +2395,16 @@ public Builder clearName() { * * *
    -     * The Data Catalog resource name of the entry in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -     * Note that this Entry and its child resources may not actually be stored in
    -     * the location in this name.
    +     * Output only. The resource name of an entry in URL format.
    +     * Example:
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +     * Note: The entry itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * 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. @@ -2022,10 +2430,14 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -2052,10 +2464,14 @@ public java.lang.String getLinkedResource() { * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -2082,10 +2498,14 @@ public com.google.protobuf.ByteString getLinkedResourceBytes() { * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -2111,10 +2531,14 @@ public Builder setLinkedResource(java.lang.String value) { * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -2136,10 +2560,14 @@ public Builder clearLinkedResource() { * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -2158,57 +2586,96 @@ public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object fullyQualifiedName_ = ""; /** * * *
    -     * The type of the entry.
    -     * Only used for Entries with types in the EntryType enum.
    +     * Fully qualified name (FQN) of the resource. Set automatically for entries
    +     * representing resources from synced systems. Settable only during creation
    +     * and read-only afterwards. Can be used for search and lookup of the entries.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
          * 
    * - * .google.cloud.datacatalog.v1.EntryType type = 2; + * string fully_qualified_name = 29; * - * @return Whether the type field is set. + * @return The fullyQualifiedName. */ - @java.lang.Override - public boolean hasType() { - return entryTypeCase_ == 2; + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = fullyQualifiedName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullyQualifiedName_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
    -     * The type of the entry.
    -     * Only used for Entries with types in the EntryType enum.
    +     * Fully qualified name (FQN) of the resource. Set automatically for entries
    +     * representing resources from synced systems. Settable only during creation
    +     * and read-only afterwards. Can be used for search and lookup of the entries.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
          * 
    * - * .google.cloud.datacatalog.v1.EntryType type = 2; + * string fully_qualified_name = 29; * - * @return The enum numeric value on the wire for type. + * @return The bytes for fullyQualifiedName. */ - @java.lang.Override - public int getTypeValue() { - if (entryTypeCase_ == 2) { - return ((java.lang.Integer) entryType_).intValue(); + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullyQualifiedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return 0; } /** * * *
    -     * The type of the entry.
    -     * Only used for Entries with types in the EntryType enum.
    +     * Fully qualified name (FQN) of the resource. Set automatically for entries
    +     * representing resources from synced systems. Settable only during creation
    +     * and read-only afterwards. Can be used for search and lookup of the entries.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
          * 
    * - * .google.cloud.datacatalog.v1.EntryType type = 2; + * string fully_qualified_name = 29; * - * @param value The enum numeric value on the wire for type to set. + * @param value The fullyQualifiedName to set. * @return This builder for chaining. */ - public Builder setTypeValue(int value) { - entryTypeCase_ = 2; - entryType_ = value; + public Builder setFullyQualifiedName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullyQualifiedName_ = value; onChanged(); return this; } @@ -2216,11 +2683,123 @@ public Builder setTypeValue(int value) { * * *
    -     * The type of the entry.
    -     * Only used for Entries with types in the EntryType enum.
    +     * Fully qualified name (FQN) of the resource. Set automatically for entries
    +     * representing resources from synced systems. Settable only during creation
    +     * and read-only afterwards. Can be used for search and lookup of the entries.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
          * 
    * - * .google.cloud.datacatalog.v1.EntryType type = 2; + * string fully_qualified_name = 29; + * + * @return This builder for chaining. + */ + public Builder clearFullyQualifiedName() { + + fullyQualifiedName_ = getDefaultInstance().getFullyQualifiedName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Fully qualified name (FQN) of the resource. Set automatically for entries
    +     * representing resources from synced systems. Settable only during creation
    +     * and read-only afterwards. Can be used for search and lookup of the entries.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +     * 
    + * + * string fully_qualified_name = 29; + * + * @param value The bytes for fullyQualifiedName to set. + * @return This builder for chaining. + */ + public Builder setFullyQualifiedNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullyQualifiedName_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The type of the entry.
    +     * Only used for Entries with types in the EntryType enum.
    +     * 
    + * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return entryTypeCase_ == 2; + } + /** + * + * + *
    +     * The type of the entry.
    +     * Only used for Entries with types in the EntryType enum.
    +     * 
    + * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + if (entryTypeCase_ == 2) { + return ((java.lang.Integer) entryType_).intValue(); + } + return 0; + } + /** + * + * + *
    +     * The type of the entry.
    +     * Only used for Entries with types in the EntryType enum.
    +     * 
    + * + * .google.cloud.datacatalog.v1.EntryType type = 2; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + entryTypeCase_ = 2; + entryType_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The type of the entry.
    +     * Only used for Entries with types in the EntryType enum.
    +     * 
    + * + * .google.cloud.datacatalog.v1.EntryType type = 2; * * @return The type. */ @@ -2463,8 +3042,8 @@ public Builder setUserSpecifiedTypeBytes(com.google.protobuf.ByteString value) { * * *
    -     * Output only. This field indicates the entry's source system that Data
    -     * Catalog integrates with, such as BigQuery or Pub/Sub.
    +     * Output only. This field indicates the entry's source system that Data Catalog
    +     * integrates with, such as BigQuery or Pub/Sub.
          * 
    * * @@ -2481,8 +3060,8 @@ public boolean hasIntegratedSystem() { * * *
    -     * Output only. This field indicates the entry's source system that Data
    -     * Catalog integrates with, such as BigQuery or Pub/Sub.
    +     * Output only. This field indicates the entry's source system that Data Catalog
    +     * integrates with, such as BigQuery or Pub/Sub.
          * 
    * * @@ -2502,8 +3081,8 @@ public int getIntegratedSystemValue() { * * *
    -     * Output only. This field indicates the entry's source system that Data
    -     * Catalog integrates with, such as BigQuery or Pub/Sub.
    +     * Output only. This field indicates the entry's source system that Data Catalog
    +     * integrates with, such as BigQuery or Pub/Sub.
          * 
    * * @@ -2523,8 +3102,8 @@ public Builder setIntegratedSystemValue(int value) { * * *
    -     * Output only. This field indicates the entry's source system that Data
    -     * Catalog integrates with, such as BigQuery or Pub/Sub.
    +     * Output only. This field indicates the entry's source system that Data Catalog
    +     * integrates with, such as BigQuery or Pub/Sub.
          * 
    * * @@ -2549,8 +3128,8 @@ public com.google.cloud.datacatalog.v1.IntegratedSystem getIntegratedSystem() { * * *
    -     * Output only. This field indicates the entry's source system that Data
    -     * Catalog integrates with, such as BigQuery or Pub/Sub.
    +     * Output only. This field indicates the entry's source system that Data Catalog
    +     * integrates with, such as BigQuery or Pub/Sub.
          * 
    * * @@ -2573,8 +3152,8 @@ public Builder setIntegratedSystem(com.google.cloud.datacatalog.v1.IntegratedSys * * *
    -     * Output only. This field indicates the entry's source system that Data
    -     * Catalog integrates with, such as BigQuery or Pub/Sub.
    +     * Output only. This field indicates the entry's source system that Data Catalog
    +     * integrates with, such as BigQuery or Pub/Sub.
          * 
    * * @@ -3429,14 +4008,235 @@ public Builder clearBigqueryDateShardedSpec() { return bigqueryDateShardedSpecBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.DatabaseTableSpec, + com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder, + com.google.cloud.datacatalog.v1.DatabaseTableSpecOrBuilder> + databaseTableSpecBuilder_; + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * + * @return Whether the databaseTableSpec field is set. + */ + @java.lang.Override + public boolean hasDatabaseTableSpec() { + return specCase_ == 24; + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * + * @return The databaseTableSpec. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpec getDatabaseTableSpec() { + if (databaseTableSpecBuilder_ == null) { + if (specCase_ == 24) { + return (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_; + } + return com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance(); + } else { + if (specCase_ == 24) { + return databaseTableSpecBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + public Builder setDatabaseTableSpec(com.google.cloud.datacatalog.v1.DatabaseTableSpec value) { + if (databaseTableSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spec_ = value; + onChanged(); + } else { + databaseTableSpecBuilder_.setMessage(value); + } + specCase_ = 24; + return this; + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + public Builder setDatabaseTableSpec( + com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder builderForValue) { + if (databaseTableSpecBuilder_ == null) { + spec_ = builderForValue.build(); + onChanged(); + } else { + databaseTableSpecBuilder_.setMessage(builderForValue.build()); + } + specCase_ = 24; + return this; + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + public Builder mergeDatabaseTableSpec(com.google.cloud.datacatalog.v1.DatabaseTableSpec value) { + if (databaseTableSpecBuilder_ == null) { + if (specCase_ == 24 + && spec_ != com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance()) { + spec_ = + com.google.cloud.datacatalog.v1.DatabaseTableSpec.newBuilder( + (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_) + .mergeFrom(value) + .buildPartial(); + } else { + spec_ = value; + } + onChanged(); + } else { + if (specCase_ == 24) { + databaseTableSpecBuilder_.mergeFrom(value); + } + databaseTableSpecBuilder_.setMessage(value); + } + specCase_ = 24; + return this; + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + public Builder clearDatabaseTableSpec() { + if (databaseTableSpecBuilder_ == null) { + if (specCase_ == 24) { + specCase_ = 0; + spec_ = null; + onChanged(); + } + } else { + if (specCase_ == 24) { + specCase_ = 0; + spec_ = null; + } + databaseTableSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + public com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder getDatabaseTableSpecBuilder() { + return getDatabaseTableSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.DatabaseTableSpecOrBuilder + getDatabaseTableSpecOrBuilder() { + if ((specCase_ == 24) && (databaseTableSpecBuilder_ != null)) { + return databaseTableSpecBuilder_.getMessageOrBuilder(); + } else { + if (specCase_ == 24) { + return (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_; + } + return com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Specification that applies to a table resource. Only valid
    +     * for entries of `TABLE` type.
    +     * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.DatabaseTableSpec, + com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder, + com.google.cloud.datacatalog.v1.DatabaseTableSpecOrBuilder> + getDatabaseTableSpecFieldBuilder() { + if (databaseTableSpecBuilder_ == null) { + if (!(specCase_ == 24)) { + spec_ = com.google.cloud.datacatalog.v1.DatabaseTableSpec.getDefaultInstance(); + } + databaseTableSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.DatabaseTableSpec, + com.google.cloud.datacatalog.v1.DatabaseTableSpec.Builder, + com.google.cloud.datacatalog.v1.DatabaseTableSpecOrBuilder>( + (com.google.cloud.datacatalog.v1.DatabaseTableSpec) spec_, + getParentForChildren(), + isClean()); + spec_ = null; + } + specCase_ = 24; + onChanged(); + ; + return databaseTableSpecBuilder_; + } + private java.lang.Object displayName_ = ""; /** * * *
    -     * Display information such as title and description. A short name to identify
    -     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -     * empty string.
    +     * Display name of an entry.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum size is 200 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string display_name = 3; @@ -3458,9 +4258,11 @@ public java.lang.String getDisplayName() { * * *
    -     * Display information such as title and description. A short name to identify
    -     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -     * empty string.
    +     * Display name of an entry.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum size is 200 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string display_name = 3; @@ -3482,9 +4284,11 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
    -     * Display information such as title and description. A short name to identify
    -     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -     * empty string.
    +     * Display name of an entry.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum size is 200 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string display_name = 3; @@ -3505,9 +4309,11 @@ public Builder setDisplayName(java.lang.String value) { * * *
    -     * Display information such as title and description. A short name to identify
    -     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -     * empty string.
    +     * Display name of an entry.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum size is 200 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string display_name = 3; @@ -3524,9 +4330,11 @@ public Builder clearDisplayName() { * * *
    -     * Display information such as title and description. A short name to identify
    -     * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -     * empty string.
    +     * Display name of an entry.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum size is 200 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string display_name = 3; @@ -3550,8 +4358,13 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { * * *
    -     * Entry description, which can consist of several sentences or paragraphs
    -     * that describe entry contents. Default value is an empty string.
    +     * Entry description that can consist of several sentences or paragraphs
    +     * that describe entry contents.
    +     * The description must not contain Unicode non-characters as well as C0
    +     * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +     * (CR), and page breaks (FF).
    +     * The maximum size is 2000 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string description = 4; @@ -3573,8 +4386,13 @@ public java.lang.String getDescription() { * * *
    -     * Entry description, which can consist of several sentences or paragraphs
    -     * that describe entry contents. Default value is an empty string.
    +     * Entry description that can consist of several sentences or paragraphs
    +     * that describe entry contents.
    +     * The description must not contain Unicode non-characters as well as C0
    +     * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +     * (CR), and page breaks (FF).
    +     * The maximum size is 2000 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string description = 4; @@ -3596,8 +4414,13 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
    -     * Entry description, which can consist of several sentences or paragraphs
    -     * that describe entry contents. Default value is an empty string.
    +     * Entry description that can consist of several sentences or paragraphs
    +     * that describe entry contents.
    +     * The description must not contain Unicode non-characters as well as C0
    +     * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +     * (CR), and page breaks (FF).
    +     * The maximum size is 2000 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string description = 4; @@ -3618,8 +4441,13 @@ public Builder setDescription(java.lang.String value) { * * *
    -     * Entry description, which can consist of several sentences or paragraphs
    -     * that describe entry contents. Default value is an empty string.
    +     * Entry description that can consist of several sentences or paragraphs
    +     * that describe entry contents.
    +     * The description must not contain Unicode non-characters as well as C0
    +     * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +     * (CR), and page breaks (FF).
    +     * The maximum size is 2000 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string description = 4; @@ -3636,8 +4464,13 @@ public Builder clearDescription() { * * *
    -     * Entry description, which can consist of several sentences or paragraphs
    -     * that describe entry contents. Default value is an empty string.
    +     * Entry description that can consist of several sentences or paragraphs
    +     * that describe entry contents.
    +     * The description must not contain Unicode non-characters as well as C0
    +     * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +     * (CR), and page breaks (FF).
    +     * The maximum size is 2000 bytes when encoded in UTF-8.
    +     * Default value is an empty string.
          * 
    * * string description = 4; @@ -4058,6 +4891,210 @@ public Builder clearSourceSystemTimestamps() { return sourceSystemTimestampsBuilder_; } + private com.google.cloud.datacatalog.v1.DataSource dataSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.DataSource, + com.google.cloud.datacatalog.v1.DataSource.Builder, + com.google.cloud.datacatalog.v1.DataSourceOrBuilder> + dataSourceBuilder_; + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSource field is set. + */ + public boolean hasDataSource() { + return dataSourceBuilder_ != null || dataSource_ != null; + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSource. + */ + public com.google.cloud.datacatalog.v1.DataSource getDataSource() { + if (dataSourceBuilder_ == null) { + return dataSource_ == null + ? com.google.cloud.datacatalog.v1.DataSource.getDefaultInstance() + : dataSource_; + } else { + return dataSourceBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataSource(com.google.cloud.datacatalog.v1.DataSource value) { + if (dataSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + onChanged(); + } else { + dataSourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataSource( + com.google.cloud.datacatalog.v1.DataSource.Builder builderForValue) { + if (dataSourceBuilder_ == null) { + dataSource_ = builderForValue.build(); + onChanged(); + } else { + dataSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDataSource(com.google.cloud.datacatalog.v1.DataSource value) { + if (dataSourceBuilder_ == null) { + if (dataSource_ != null) { + dataSource_ = + com.google.cloud.datacatalog.v1.DataSource.newBuilder(dataSource_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSource_ = value; + } + onChanged(); + } else { + dataSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDataSource() { + if (dataSourceBuilder_ == null) { + dataSource_ = null; + onChanged(); + } else { + dataSource_ = null; + dataSourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.DataSource.Builder getDataSourceBuilder() { + + onChanged(); + return getDataSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.DataSourceOrBuilder getDataSourceOrBuilder() { + if (dataSourceBuilder_ != null) { + return dataSourceBuilder_.getMessageOrBuilder(); + } else { + return dataSource_ == null + ? com.google.cloud.datacatalog.v1.DataSource.getDefaultInstance() + : dataSource_; + } + } + /** + * + * + *
    +     * Output only. Physical location of the entry.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.DataSource, + com.google.cloud.datacatalog.v1.DataSource.Builder, + com.google.cloud.datacatalog.v1.DataSourceOrBuilder> + getDataSourceFieldBuilder() { + if (dataSourceBuilder_ == null) { + dataSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.DataSource, + com.google.cloud.datacatalog.v1.DataSource.Builder, + com.google.cloud.datacatalog.v1.DataSourceOrBuilder>( + getDataSource(), getParentForChildren(), isClean()); + dataSource_ = null; + } + return dataSourceBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java index a7dfc4ce..a7ca49f0 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java @@ -152,9 +152,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * The resource name of the entry group in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -178,9 +178,9 @@ public java.lang.String getName() { * *
        * The resource name of the entry group in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -310,8 +310,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
    -   * Output only. Timestamps about this EntryGroup. Default value is empty
    -   * timestamps.
    +   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
        * 
    * * @@ -328,8 +327,7 @@ public boolean hasDataCatalogTimestamps() { * * *
    -   * Output only. Timestamps about this EntryGroup. Default value is empty
    -   * timestamps.
    +   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
        * 
    * * @@ -348,8 +346,7 @@ public com.google.cloud.datacatalog.v1.SystemTimestamps getDataCatalogTimestamps * * *
    -   * Output only. Timestamps about this EntryGroup. Default value is empty
    -   * timestamps.
    +   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
        * 
    * * @@ -747,9 +744,9 @@ public Builder mergeFrom( * *
          * The resource name of the entry group in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -772,9 +769,9 @@ public java.lang.String getName() { * *
          * The resource name of the entry group in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -797,9 +794,9 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * The resource name of the entry group in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -821,9 +818,9 @@ public Builder setName(java.lang.String value) { * *
          * The resource name of the entry group in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -841,9 +838,9 @@ public Builder clearName() { * *
          * The resource name of the entry group in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -     * Note that this EntryGroup and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +     * Note: The entry group itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -1099,8 +1096,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1116,8 +1112,7 @@ public boolean hasDataCatalogTimestamps() { * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1139,8 +1134,7 @@ public com.google.cloud.datacatalog.v1.SystemTimestamps getDataCatalogTimestamps * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1165,8 +1159,7 @@ public Builder setDataCatalogTimestamps( * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1188,8 +1181,7 @@ public Builder setDataCatalogTimestamps( * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1218,8 +1210,7 @@ public Builder mergeDataCatalogTimestamps( * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1241,8 +1232,7 @@ public Builder clearDataCatalogTimestamps() { * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1259,8 +1249,7 @@ public Builder clearDataCatalogTimestamps() { * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * @@ -1281,8 +1270,7 @@ public Builder clearDataCatalogTimestamps() { * * *
    -     * Output only. Timestamps about this EntryGroup. Default value is empty
    -     * timestamps.
    +     * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
          * 
    * * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java index 3df73089..a69343b5 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupOrBuilder.java @@ -28,9 +28,9 @@ public interface EntryGroupOrBuilder * *
        * The resource name of the entry group in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -43,9 +43,9 @@ public interface EntryGroupOrBuilder * *
        * The resource name of the entry group in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    -   * Note that this EntryGroup and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`
    +   * Note: The entry group itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -114,8 +114,7 @@ public interface EntryGroupOrBuilder * * *
    -   * Output only. Timestamps about this EntryGroup. Default value is empty
    -   * timestamps.
    +   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
        * 
    * * @@ -129,8 +128,7 @@ public interface EntryGroupOrBuilder * * *
    -   * Output only. Timestamps about this EntryGroup. Default value is empty
    -   * timestamps.
    +   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
        * 
    * * @@ -144,8 +142,7 @@ public interface EntryGroupOrBuilder * * *
    -   * Output only. Timestamps about this EntryGroup. Default value is empty
    -   * timestamps.
    +   * Output only. Timestamps about this EntryGroup. Default value is empty timestamps.
        * 
    * * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java index 08f5c9e5..1d44a4ff 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java @@ -27,13 +27,16 @@ public interface EntryOrBuilder * * *
    -   * The Data Catalog resource name of the entry in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Output only. The resource name of an entry in URL format.
    +   * Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The entry itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -42,13 +45,16 @@ public interface EntryOrBuilder * * *
    -   * The Data Catalog resource name of the entry in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    -   * Note that this Entry and its child resources may not actually be stored in
    -   * the location in this name.
    +   * Output only. The resource name of an entry in URL format.
    +   * Example:
    +   * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}`
    +   * Note: The entry itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -63,10 +69,14 @@ public interface EntryOrBuilder * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -83,10 +93,14 @@ public interface EntryOrBuilder * the * resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). * For example, the `linked_resource` for a table resource from BigQuery is: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * Output only when Entry is of type in the EntryType enum. For entries with - * user_specified_type, this field is optional and defaults to an empty - * string. + * `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + * Output only when entry is one of the types in the `EntryType` enum. + * For entries with a `user_specified_type`, this field is optional and + * defaults to an empty string. + * The resource string must contain only letters (a-z, A-Z), numbers (0-9), + * underscores (_), periods (.), colons (:), slashes (/), dashes (-), + * and hashes (#). + * The maximum size is 200 bytes when encoded in UTF-8. *
    * * string linked_resource = 9; @@ -95,6 +109,49 @@ public interface EntryOrBuilder */ com.google.protobuf.ByteString getLinkedResourceBytes(); + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource. Set automatically for entries
    +   * representing resources from synced systems. Settable only during creation
    +   * and read-only afterwards. Can be used for search and lookup of the entries.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 29; + * + * @return The fullyQualifiedName. + */ + java.lang.String getFullyQualifiedName(); + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource. Set automatically for entries
    +   * representing resources from synced systems. Settable only during creation
    +   * and read-only afterwards. Can be used for search and lookup of the entries.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 29; + * + * @return The bytes for fullyQualifiedName. + */ + com.google.protobuf.ByteString getFullyQualifiedNameBytes(); + /** * * @@ -200,8 +257,8 @@ public interface EntryOrBuilder * * *
    -   * Output only. This field indicates the entry's source system that Data
    -   * Catalog integrates with, such as BigQuery or Pub/Sub.
    +   * Output only. This field indicates the entry's source system that Data Catalog
    +   * integrates with, such as BigQuery or Pub/Sub.
        * 
    * * @@ -215,8 +272,8 @@ public interface EntryOrBuilder * * *
    -   * Output only. This field indicates the entry's source system that Data
    -   * Catalog integrates with, such as BigQuery or Pub/Sub.
    +   * Output only. This field indicates the entry's source system that Data Catalog
    +   * integrates with, such as BigQuery or Pub/Sub.
        * 
    * * @@ -230,8 +287,8 @@ public interface EntryOrBuilder * * *
    -   * Output only. This field indicates the entry's source system that Data
    -   * Catalog integrates with, such as BigQuery or Pub/Sub.
    +   * Output only. This field indicates the entry's source system that Data Catalog
    +   * integrates with, such as BigQuery or Pub/Sub.
        * 
    * * @@ -416,9 +473,49 @@ public interface EntryOrBuilder * * *
    -   * Display information such as title and description. A short name to identify
    -   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -   * empty string.
    +   * Specification that applies to a table resource. Only valid
    +   * for entries of `TABLE` type.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * + * @return Whether the databaseTableSpec field is set. + */ + boolean hasDatabaseTableSpec(); + /** + * + * + *
    +   * Specification that applies to a table resource. Only valid
    +   * for entries of `TABLE` type.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + * + * @return The databaseTableSpec. + */ + com.google.cloud.datacatalog.v1.DatabaseTableSpec getDatabaseTableSpec(); + /** + * + * + *
    +   * Specification that applies to a table resource. Only valid
    +   * for entries of `TABLE` type.
    +   * 
    + * + * .google.cloud.datacatalog.v1.DatabaseTableSpec database_table_spec = 24; + */ + com.google.cloud.datacatalog.v1.DatabaseTableSpecOrBuilder getDatabaseTableSpecOrBuilder(); + + /** + * + * + *
    +   * Display name of an entry.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum size is 200 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string display_name = 3; @@ -430,9 +527,11 @@ public interface EntryOrBuilder * * *
    -   * Display information such as title and description. A short name to identify
    -   * the entry, for example, "Analytics Data - Jan 2011". Default value is an
    -   * empty string.
    +   * Display name of an entry.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum size is 200 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string display_name = 3; @@ -445,8 +544,13 @@ public interface EntryOrBuilder * * *
    -   * Entry description, which can consist of several sentences or paragraphs
    -   * that describe entry contents. Default value is an empty string.
    +   * Entry description that can consist of several sentences or paragraphs
    +   * that describe entry contents.
    +   * The description must not contain Unicode non-characters as well as C0
    +   * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +   * (CR), and page breaks (FF).
    +   * The maximum size is 2000 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string description = 4; @@ -458,8 +562,13 @@ public interface EntryOrBuilder * * *
    -   * Entry description, which can consist of several sentences or paragraphs
    -   * that describe entry contents. Default value is an empty string.
    +   * Entry description that can consist of several sentences or paragraphs
    +   * that describe entry contents.
    +   * The description must not contain Unicode non-characters as well as C0
    +   * and C1 control codes except tabs (HT), new lines (LF), carriage returns
    +   * (CR), and page breaks (FF).
    +   * The maximum size is 2000 bytes when encoded in UTF-8.
    +   * Default value is an empty string.
        * 
    * * string description = 4; @@ -547,9 +656,52 @@ public interface EntryOrBuilder */ com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getSourceSystemTimestampsOrBuilder(); + /** + * + * + *
    +   * Output only. Physical location of the entry.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSource field is set. + */ + boolean hasDataSource(); + /** + * + * + *
    +   * Output only. Physical location of the entry.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSource. + */ + com.google.cloud.datacatalog.v1.DataSource getDataSource(); + /** + * + * + *
    +   * Output only. Physical location of the entry.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.DataSource data_source = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.datacatalog.v1.DataSourceOrBuilder getDataSourceOrBuilder(); + public com.google.cloud.datacatalog.v1.Entry.EntryTypeCase getEntryTypeCase(); public com.google.cloud.datacatalog.v1.Entry.SystemCase getSystemCase(); public com.google.cloud.datacatalog.v1.Entry.TypeSpecCase getTypeSpecCase(); + + public com.google.cloud.datacatalog.v1.Entry.SpecCase getSpecCase(); } diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java index 89cd1fc3..d9e0dcfd 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java @@ -66,7 +66,7 @@ public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { * * *
    -   * Output only. An entry type which is used for streaming entries. Example:
    +   * An entry type which is used for streaming entries. Example:
        * Pub/Sub topic.
        * 
    * @@ -84,6 +84,26 @@ public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { * FILESET = 4; */ FILESET(4), + /** + * + * + *
    +   * A database.
    +   * 
    + * + * DATABASE = 7; + */ + DATABASE(7), + /** + * + * + *
    +   * A service, for example, a Dataproc Metastore service.
    +   * 
    + * + * SERVICE = 14; + */ + SERVICE(14), UNRECOGNIZED(-1), ; @@ -123,7 +143,7 @@ public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { * * *
    -   * Output only. An entry type which is used for streaming entries. Example:
    +   * An entry type which is used for streaming entries. Example:
        * Pub/Sub topic.
        * 
    * @@ -141,6 +161,26 @@ public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { * FILESET = 4; */ public static final int FILESET_VALUE = 4; + /** + * + * + *
    +   * A database.
    +   * 
    + * + * DATABASE = 7; + */ + public static final int DATABASE_VALUE = 7; + /** + * + * + *
    +   * A service, for example, a Dataproc Metastore service.
    +   * 
    + * + * SERVICE = 14; + */ + public static final int SERVICE_VALUE = 14; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -176,6 +216,10 @@ public static EntryType forNumber(int value) { return DATA_STREAM; case 4: return FILESET; + case 7: + return DATABASE; + case 14: + return SERVICE; default: return null; } diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequest.java new file mode 100644 index 00000000..ad92b9ea --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequest.java @@ -0,0 +1,1174 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ExportTaxonomiesRequest} + */ +public final class ExportTaxonomiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ExportTaxonomiesRequest) + ExportTaxonomiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTaxonomiesRequest.newBuilder() to construct. + private ExportTaxonomiesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTaxonomiesRequest() { + parent_ = ""; + taxonomies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTaxonomiesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTaxonomiesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + taxonomies_.add(s); + break; + } + case 24: + { + destinationCase_ = 3; + destination_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = taxonomies_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.class, + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SERIALIZED_TAXONOMIES(3), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 3: + return SERIALIZED_TAXONOMIES; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. Resource name of the project that the exported taxonomies belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the project that the exported taxonomies belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAXONOMIES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList taxonomies_; + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the taxonomies. + */ + public com.google.protobuf.ProtocolStringList getTaxonomiesList() { + return taxonomies_; + } + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of taxonomies. + */ + public int getTaxonomiesCount() { + return taxonomies_.size(); + } + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The taxonomies at the given index. + */ + public java.lang.String getTaxonomies(int index) { + return taxonomies_.get(index); + } + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the taxonomies at the given index. + */ + public com.google.protobuf.ByteString getTaxonomiesBytes(int index) { + return taxonomies_.getByteString(index); + } + + public static final int SERIALIZED_TAXONOMIES_FIELD_NUMBER = 3; + /** + * + * + *
    +   * Export taxonomies as serialized taxonomies, which contain all the policy
    +   * tags as nested protos.
    +   * 
    + * + * bool serialized_taxonomies = 3; + * + * @return Whether the serializedTaxonomies field is set. + */ + @java.lang.Override + public boolean hasSerializedTaxonomies() { + return destinationCase_ == 3; + } + /** + * + * + *
    +   * Export taxonomies as serialized taxonomies, which contain all the policy
    +   * tags as nested protos.
    +   * 
    + * + * bool serialized_taxonomies = 3; + * + * @return The serializedTaxonomies. + */ + @java.lang.Override + public boolean getSerializedTaxonomies() { + if (destinationCase_ == 3) { + return (java.lang.Boolean) destination_; + } + return false; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < taxonomies_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, taxonomies_.getRaw(i)); + } + if (destinationCase_ == 3) { + output.writeBool(3, (boolean) ((java.lang.Boolean) destination_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < taxonomies_.size(); i++) { + dataSize += computeStringSizeNoTag(taxonomies_.getRaw(i)); + } + size += dataSize; + size += 1 * getTaxonomiesList().size(); + } + if (destinationCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, (boolean) ((java.lang.Boolean) destination_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest other = + (com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTaxonomiesList().equals(other.getTaxonomiesList())) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 3: + if (getSerializedTaxonomies() != other.getSerializedTaxonomies()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getTaxonomiesCount() > 0) { + hash = (37 * hash) + TAXONOMIES_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomiesList().hashCode(); + } + switch (destinationCase_) { + case 3: + hash = (37 * hash) + SERIALIZED_TAXONOMIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSerializedTaxonomies()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ExportTaxonomiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ExportTaxonomiesRequest) + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.class, + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + taxonomies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest build() { + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest buildPartial() { + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest result = + new com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = taxonomies_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.taxonomies_ = taxonomies_; + if (destinationCase_ == 3) { + result.destination_ = destination_; + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest other) { + if (other == com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.taxonomies_.isEmpty()) { + if (taxonomies_.isEmpty()) { + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTaxonomiesIsMutable(); + taxonomies_.addAll(other.taxonomies_); + } + onChanged(); + } + switch (other.getDestinationCase()) { + case SERIALIZED_TAXONOMIES: + { + setSerializedTaxonomies(other.getSerializedTaxonomies()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. Resource name of the project that the exported taxonomies belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the project that the exported taxonomies belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the project that the exported taxonomies belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the project that the exported taxonomies belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the project that the exported taxonomies belong to.
    +     * 
    + * + * + * 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. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList taxonomies_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTaxonomiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = new com.google.protobuf.LazyStringArrayList(taxonomies_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the taxonomies. + */ + public com.google.protobuf.ProtocolStringList getTaxonomiesList() { + return taxonomies_.getUnmodifiableView(); + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of taxonomies. + */ + public int getTaxonomiesCount() { + return taxonomies_.size(); + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The taxonomies at the given index. + */ + public java.lang.String getTaxonomies(int index) { + return taxonomies_.get(index); + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the taxonomies at the given index. + */ + public com.google.protobuf.ByteString getTaxonomiesBytes(int index) { + return taxonomies_.getByteString(index); + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The taxonomies to set. + * @return This builder for chaining. + */ + public Builder setTaxonomies(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The taxonomies to add. + * @return This builder for chaining. + */ + public Builder addTaxonomies(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(value); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The taxonomies to add. + * @return This builder for chaining. + */ + public Builder addAllTaxonomies(java.lang.Iterable values) { + ensureTaxonomiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taxonomies_); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTaxonomies() { + taxonomies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource names of the taxonomies to be exported.
    +     * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the taxonomies to add. + * @return This builder for chaining. + */ + public Builder addTaxonomiesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTaxonomiesIsMutable(); + taxonomies_.add(value); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Export taxonomies as serialized taxonomies, which contain all the policy
    +     * tags as nested protos.
    +     * 
    + * + * bool serialized_taxonomies = 3; + * + * @return Whether the serializedTaxonomies field is set. + */ + public boolean hasSerializedTaxonomies() { + return destinationCase_ == 3; + } + /** + * + * + *
    +     * Export taxonomies as serialized taxonomies, which contain all the policy
    +     * tags as nested protos.
    +     * 
    + * + * bool serialized_taxonomies = 3; + * + * @return The serializedTaxonomies. + */ + public boolean getSerializedTaxonomies() { + if (destinationCase_ == 3) { + return (java.lang.Boolean) destination_; + } + return false; + } + /** + * + * + *
    +     * Export taxonomies as serialized taxonomies, which contain all the policy
    +     * tags as nested protos.
    +     * 
    + * + * bool serialized_taxonomies = 3; + * + * @param value The serializedTaxonomies to set. + * @return This builder for chaining. + */ + public Builder setSerializedTaxonomies(boolean value) { + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Export taxonomies as serialized taxonomies, which contain all the policy
    +     * tags as nested protos.
    +     * 
    + * + * bool serialized_taxonomies = 3; + * + * @return This builder for chaining. + */ + public Builder clearSerializedTaxonomies() { + if (destinationCase_ == 3) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ExportTaxonomiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ExportTaxonomiesRequest) + private static final com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest(); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTaxonomiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTaxonomiesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequestOrBuilder.java new file mode 100644 index 00000000..c4dfaa69 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface ExportTaxonomiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ExportTaxonomiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the project that the exported taxonomies belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. Resource name of the project that the exported taxonomies belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the taxonomies. + */ + java.util.List getTaxonomiesList(); + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of taxonomies. + */ + int getTaxonomiesCount(); + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The taxonomies at the given index. + */ + java.lang.String getTaxonomies(int index); + /** + * + * + *
    +   * Required. Resource names of the taxonomies to be exported.
    +   * 
    + * + * + * repeated string taxonomies = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the taxonomies at the given index. + */ + com.google.protobuf.ByteString getTaxonomiesBytes(int index); + + /** + * + * + *
    +   * Export taxonomies as serialized taxonomies, which contain all the policy
    +   * tags as nested protos.
    +   * 
    + * + * bool serialized_taxonomies = 3; + * + * @return Whether the serializedTaxonomies field is set. + */ + boolean hasSerializedTaxonomies(); + /** + * + * + *
    +   * Export taxonomies as serialized taxonomies, which contain all the policy
    +   * tags as nested protos.
    +   * 
    + * + * bool serialized_taxonomies = 3; + * + * @return The serializedTaxonomies. + */ + boolean getSerializedTaxonomies(); + + public com.google.cloud.datacatalog.v1.ExportTaxonomiesRequest.DestinationCase + getDestinationCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponse.java new file mode 100644 index 00000000..d42331a7 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponse.java @@ -0,0 +1,964 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Response message for
    + * [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ExportTaxonomiesResponse} + */ +public final class ExportTaxonomiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ExportTaxonomiesResponse) + ExportTaxonomiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportTaxonomiesResponse.newBuilder() to construct. + private ExportTaxonomiesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportTaxonomiesResponse() { + taxonomies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportTaxonomiesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportTaxonomiesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + taxonomies_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.SerializedTaxonomy.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.class, + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.Builder.class); + } + + public static final int TAXONOMIES_FIELD_NUMBER = 1; + private java.util.List taxonomies_; + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + @java.lang.Override + public java.util.List getTaxonomiesList() { + return taxonomies_; + } + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + @java.lang.Override + public java.util.List + getTaxonomiesOrBuilderList() { + return taxonomies_; + } + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + @java.lang.Override + public int getTaxonomiesCount() { + return taxonomies_.size(); + } + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomy getTaxonomies(int index) { + return taxonomies_.get(index); + } + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder getTaxonomiesOrBuilder( + int index) { + return taxonomies_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < taxonomies_.size(); i++) { + output.writeMessage(1, taxonomies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < taxonomies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, taxonomies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse other = + (com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse) obj; + + if (!getTaxonomiesList().equals(other.getTaxonomiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTaxonomiesCount() > 0) { + hash = (37 * hash) + TAXONOMIES_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Response message for
    +   * [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ExportTaxonomiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ExportTaxonomiesResponse) + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.class, + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTaxonomiesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + taxonomiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse build() { + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse buildPartial() { + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse result = + new com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse(this); + int from_bitField0_ = bitField0_; + if (taxonomiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.taxonomies_ = taxonomies_; + } else { + result.taxonomies_ = taxonomiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse other) { + if (other == com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse.getDefaultInstance()) + return this; + if (taxonomiesBuilder_ == null) { + if (!other.taxonomies_.isEmpty()) { + if (taxonomies_.isEmpty()) { + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTaxonomiesIsMutable(); + taxonomies_.addAll(other.taxonomies_); + } + onChanged(); + } + } else { + if (!other.taxonomies_.isEmpty()) { + if (taxonomiesBuilder_.isEmpty()) { + taxonomiesBuilder_.dispose(); + taxonomiesBuilder_ = null; + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + taxonomiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTaxonomiesFieldBuilder() + : null; + } else { + taxonomiesBuilder_.addAllMessages(other.taxonomies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List taxonomies_ = + java.util.Collections.emptyList(); + + private void ensureTaxonomiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = + new java.util.ArrayList( + taxonomies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedTaxonomy, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder, + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder> + taxonomiesBuilder_; + + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public java.util.List getTaxonomiesList() { + if (taxonomiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(taxonomies_); + } else { + return taxonomiesBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public int getTaxonomiesCount() { + if (taxonomiesBuilder_ == null) { + return taxonomies_.size(); + } else { + return taxonomiesBuilder_.getCount(); + } + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy getTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder setTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, value); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder setTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder addTaxonomies(com.google.cloud.datacatalog.v1.SerializedTaxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder addTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder addTaxonomies( + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder addTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder addAllTaxonomies( + java.lang.Iterable values) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taxonomies_); + onChanged(); + } else { + taxonomiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder clearTaxonomies() { + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + taxonomiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public Builder removeTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.remove(index); + onChanged(); + } else { + taxonomiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder getTaxonomiesBuilder( + int index) { + return getTaxonomiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder getTaxonomiesOrBuilder( + int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public java.util.List + getTaxonomiesOrBuilderList() { + if (taxonomiesBuilder_ != null) { + return taxonomiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(taxonomies_); + } + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder addTaxonomiesBuilder() { + return getTaxonomiesFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.SerializedTaxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder addTaxonomiesBuilder( + int index) { + return getTaxonomiesFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.v1.SerializedTaxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * List of taxonomies and policy tags as nested protos.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + public java.util.List + getTaxonomiesBuilderList() { + return getTaxonomiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedTaxonomy, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder, + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder> + getTaxonomiesFieldBuilder() { + if (taxonomiesBuilder_ == null) { + taxonomiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedTaxonomy, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder, + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder>( + taxonomies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + taxonomies_ = null; + } + return taxonomiesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ExportTaxonomiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ExportTaxonomiesResponse) + private static final com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse(); + } + + public static com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportTaxonomiesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportTaxonomiesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ExportTaxonomiesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponseOrBuilder.java new file mode 100644 index 00000000..eb396785 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface ExportTaxonomiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ExportTaxonomiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + java.util.List getTaxonomiesList(); + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + com.google.cloud.datacatalog.v1.SerializedTaxonomy getTaxonomies(int index); + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + int getTaxonomiesCount(); + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + java.util.List + getTaxonomiesOrBuilderList(); + /** + * + * + *
    +   * List of taxonomies and policy tags as nested protos.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1; + */ + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder getTaxonomiesOrBuilder(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java index bf695369..036fc2a8 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java @@ -322,12 +322,13 @@ public interface EnumTypeOrBuilder * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -339,12 +340,13 @@ public interface EnumTypeOrBuilder * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -355,12 +357,13 @@ public interface EnumTypeOrBuilder * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -371,12 +374,13 @@ public interface EnumTypeOrBuilder * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -388,12 +392,13 @@ public interface EnumTypeOrBuilder * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -508,6 +513,9 @@ public interface EnumValueOrBuilder * *
            * Required. The display name of the enum value. Must not be an empty string.
    +       * The name must contain only Unicode letters, numbers (0-9), underscores
    +       * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +       * maximum length is 200 characters.
            * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -520,6 +528,9 @@ public interface EnumValueOrBuilder * *
            * Required. The display name of the enum value. Must not be an empty string.
    +       * The name must contain only Unicode letters, numbers (0-9), underscores
    +       * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +       * maximum length is 200 characters.
            * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -621,6 +632,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
            * Required. The display name of the enum value. Must not be an empty string.
    +       * The name must contain only Unicode letters, numbers (0-9), underscores
    +       * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +       * maximum length is 200 characters.
            * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -644,6 +658,9 @@ public java.lang.String getDisplayName() { * *
            * Required. The display name of the enum value. Must not be an empty string.
    +       * The name must contain only Unicode letters, numbers (0-9), underscores
    +       * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +       * maximum length is 200 characters.
            * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -988,6 +1005,9 @@ public Builder mergeFrom( * *
              * Required. The display name of the enum value. Must not be an empty string.
    +         * The name must contain only Unicode letters, numbers (0-9), underscores
    +         * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +         * maximum length is 200 characters.
              * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1010,6 +1030,9 @@ public java.lang.String getDisplayName() { * *
              * Required. The display name of the enum value. Must not be an empty string.
    +         * The name must contain only Unicode letters, numbers (0-9), underscores
    +         * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +         * maximum length is 200 characters.
              * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1032,6 +1055,9 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
              * Required. The display name of the enum value. Must not be an empty string.
    +         * The name must contain only Unicode letters, numbers (0-9), underscores
    +         * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +         * maximum length is 200 characters.
              * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1053,6 +1079,9 @@ public Builder setDisplayName(java.lang.String value) { * *
              * Required. The display name of the enum value. Must not be an empty string.
    +         * The name must contain only Unicode letters, numbers (0-9), underscores
    +         * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +         * maximum length is 200 characters.
              * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1070,6 +1099,9 @@ public Builder clearDisplayName() { * *
              * Required. The display name of the enum value. Must not be an empty string.
    +         * The name must contain only Unicode letters, numbers (0-9), underscores
    +         * (_), dashes (-), spaces ( ), and can't start or end with spaces. The
    +         * maximum length is 200 characters.
              * 
    * * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -1150,12 +1182,13 @@ public com.google.protobuf.Parser getParserForType() { * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -1170,12 +1203,13 @@ public com.google.protobuf.Parser getParserForType() { * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -1191,12 +1225,13 @@ public com.google.protobuf.Parser getParserForType() { * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -1210,12 +1245,13 @@ public int getAllowedValuesCount() { * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -1230,12 +1266,13 @@ public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue getAllowedVa * * *
    -     * Required on create; optional on update. The set of allowed values for
    -     * this enum. This set must not be empty, the display names of the values in
    -     * this set must not be empty and the display names of the values must be
    -     * case-insensitively unique within this set. Currently, enum values can
    -     * only be added to the list of allowed values. Deletion and renaming of
    -     * enum values are not supported. Can have up to 500 allowed values.
    +     * The set of allowed values for this enum.
    +     * This set must not be empty and can include up to 100 allowed values.
    +     * The display names of the values in this set must not be empty and must
    +     * be case-insensitively unique within this set.
    +     * The order of items in this set is preserved. This field can be used to
    +     * create, remove and reorder enum values. To rename enum values, use the
    +     * `RenameTagTemplateFieldEnumValue` method.
          * 
    * * repeated .google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue allowed_values = 1; @@ -1625,12 +1662,13 @@ private void ensureAllowedValuesIsMutable() { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1649,12 +1687,13 @@ private void ensureAllowedValuesIsMutable() { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1672,12 +1711,13 @@ public int getAllowedValuesCount() { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1696,12 +1736,13 @@ public com.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue getAllowedVa * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1726,12 +1767,13 @@ public Builder setAllowedValues( * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1754,12 +1796,13 @@ public Builder setAllowedValues( * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1784,12 +1827,13 @@ public Builder addAllowedValues( * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1814,12 +1858,13 @@ public Builder addAllowedValues( * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1841,12 +1886,13 @@ public Builder addAllowedValues( * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1869,12 +1915,13 @@ public Builder addAllowedValues( * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1897,12 +1944,13 @@ public Builder addAllAllowedValues( * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1923,12 +1971,13 @@ public Builder clearAllowedValues() { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1949,12 +1998,13 @@ public Builder removeAllowedValues(int index) { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1969,12 +2019,13 @@ public Builder removeAllowedValues(int index) { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -1993,12 +2044,13 @@ public Builder removeAllowedValues(int index) { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -2018,12 +2070,13 @@ public Builder removeAllowedValues(int index) { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -2040,12 +2093,13 @@ public Builder removeAllowedValues(int index) { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * @@ -2063,12 +2117,13 @@ public Builder removeAllowedValues(int index) { * * *
    -       * Required on create; optional on update. The set of allowed values for
    -       * this enum. This set must not be empty, the display names of the values in
    -       * this set must not be empty and the display names of the values must be
    -       * case-insensitively unique within this set. Currently, enum values can
    -       * only be added to the list of allowed values. Deletion and renaming of
    -       * enum values are not supported. Can have up to 500 allowed values.
    +       * The set of allowed values for this enum.
    +       * This set must not be empty and can include up to 100 allowed values.
    +       * The display names of the values in this set must not be empty and must
    +       * be case-insensitively unique within this set.
    +       * The order of items in this set is preserved. This field can be used to
    +       * create, remove and reorder enum values. To rename enum values, use the
    +       * `RenameTagTemplateFieldEnumValue` method.
            * 
    * * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequest.java new file mode 100644 index 00000000..6cae038f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [GetPolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTag].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.GetPolicyTagRequest} + */ +public final class GetPolicyTagRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GetPolicyTagRequest) + GetPolicyTagRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPolicyTagRequest.newBuilder() to construct. + private GetPolicyTagRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPolicyTagRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPolicyTagRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetPolicyTagRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetPolicyTagRequest.class, + com.google.cloud.datacatalog.v1.GetPolicyTagRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. Resource name of the requested policy tag.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the requested policy tag.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.GetPolicyTagRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.GetPolicyTagRequest other = + (com.google.cloud.datacatalog.v1.GetPolicyTagRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.GetPolicyTagRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [GetPolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTag].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.GetPolicyTagRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GetPolicyTagRequest) + com.google.cloud.datacatalog.v1.GetPolicyTagRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetPolicyTagRequest.class, + com.google.cloud.datacatalog.v1.GetPolicyTagRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.GetPolicyTagRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetPolicyTagRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.GetPolicyTagRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetPolicyTagRequest build() { + com.google.cloud.datacatalog.v1.GetPolicyTagRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetPolicyTagRequest buildPartial() { + com.google.cloud.datacatalog.v1.GetPolicyTagRequest result = + new com.google.cloud.datacatalog.v1.GetPolicyTagRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.GetPolicyTagRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.GetPolicyTagRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.GetPolicyTagRequest other) { + if (other == com.google.cloud.datacatalog.v1.GetPolicyTagRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.GetPolicyTagRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.GetPolicyTagRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. Resource name of the requested policy tag.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the requested policy tag.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the requested policy tag.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the requested policy tag.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the requested policy tag.
    +     * 
    + * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.GetPolicyTagRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GetPolicyTagRequest) + private static final com.google.cloud.datacatalog.v1.GetPolicyTagRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GetPolicyTagRequest(); + } + + public static com.google.cloud.datacatalog.v1.GetPolicyTagRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyTagRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetPolicyTagRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetPolicyTagRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequestOrBuilder.java new file mode 100644 index 00000000..d013a187 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface GetPolicyTagRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.GetPolicyTagRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the requested policy tag.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. Resource name of the requested policy tag.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequest.java new file mode 100644 index 00000000..1ce495aa --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [GetTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomy].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.GetTaxonomyRequest} + */ +public final class GetTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.GetTaxonomyRequest) + GetTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTaxonomyRequest.newBuilder() to construct. + private GetTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTaxonomyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTaxonomyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTaxonomyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.GetTaxonomyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. Resource name of the requested taxonomy.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the requested taxonomy.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.GetTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.GetTaxonomyRequest other = + (com.google.cloud.datacatalog.v1.GetTaxonomyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.GetTaxonomyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [GetTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomy].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.GetTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.GetTaxonomyRequest) + com.google.cloud.datacatalog.v1.GetTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.GetTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.GetTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.GetTaxonomyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.GetTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTaxonomyRequest build() { + com.google.cloud.datacatalog.v1.GetTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTaxonomyRequest buildPartial() { + com.google.cloud.datacatalog.v1.GetTaxonomyRequest result = + new com.google.cloud.datacatalog.v1.GetTaxonomyRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.GetTaxonomyRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.GetTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.GetTaxonomyRequest other) { + if (other == com.google.cloud.datacatalog.v1.GetTaxonomyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.GetTaxonomyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.GetTaxonomyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. Resource name of the requested taxonomy.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the requested taxonomy.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the requested taxonomy.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the requested taxonomy.
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the requested taxonomy.
    +     * 
    + * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.GetTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.GetTaxonomyRequest) + private static final com.google.cloud.datacatalog.v1.GetTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.GetTaxonomyRequest(); + } + + public static com.google.cloud.datacatalog.v1.GetTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTaxonomyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTaxonomyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.GetTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequestOrBuilder.java new file mode 100644 index 00000000..8cad7cc2 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface GetTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.GetTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the requested taxonomy.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. Resource name of the requested taxonomy.
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequest.java new file mode 100644 index 00000000..dbcfe7ed --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequest.java @@ -0,0 +1,1346 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ImportTaxonomiesRequest} + */ +public final class ImportTaxonomiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ImportTaxonomiesRequest) + ImportTaxonomiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportTaxonomiesRequest.newBuilder() to construct. + private ImportTaxonomiesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportTaxonomiesRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportTaxonomiesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportTaxonomiesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datacatalog.v1.InlineSource.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = ((com.google.cloud.datacatalog.v1.InlineSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.datacatalog.v1.InlineSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.InlineSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + case 26: + { + com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder subBuilder = null; + if (sourceCase_ == 3) { + subBuilder = + ((com.google.cloud.datacatalog.v1.CrossRegionalSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.datacatalog.v1.CrossRegionalSource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datacatalog.v1.CrossRegionalSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 3; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.class, + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SOURCE(2), + CROSS_REGIONAL_SOURCE(3), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return INLINE_SOURCE; + case 3: + return CROSS_REGIONAL_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. Resource name of project that the imported taxonomies will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of project that the imported taxonomies will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INLINE_SOURCE_FIELD_NUMBER = 2; + /** + * + * + *
    +   * Inline source used for taxonomies import.
    +   * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + /** + * + * + *
    +   * Inline source used for taxonomies import.
    +   * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSource getInlineSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.datacatalog.v1.InlineSource) source_; + } + return com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance(); + } + /** + * + * + *
    +   * Inline source used for taxonomies import.
    +   * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSourceOrBuilder getInlineSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.datacatalog.v1.InlineSource) source_; + } + return com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance(); + } + + public static final int CROSS_REGIONAL_SOURCE_FIELD_NUMBER = 3; + /** + * + * + *
    +   * Cross-regional source taxonomy to be imported.
    +   * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * + * @return Whether the crossRegionalSource field is set. + */ + @java.lang.Override + public boolean hasCrossRegionalSource() { + return sourceCase_ == 3; + } + /** + * + * + *
    +   * Cross-regional source taxonomy to be imported.
    +   * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * + * @return The crossRegionalSource. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSource getCrossRegionalSource() { + if (sourceCase_ == 3) { + return (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_; + } + return com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance(); + } + /** + * + * + *
    +   * Cross-regional source taxonomy to be imported.
    +   * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSourceOrBuilder + getCrossRegionalSourceOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_; + } + return com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (sourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datacatalog.v1.InlineSource) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datacatalog.v1.InlineSource) source_); + } + if (sourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest other = + (com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getInlineSource().equals(other.getInlineSource())) return false; + break; + case 3: + if (!getCrossRegionalSource().equals(other.getCrossRegionalSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + INLINE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInlineSource().hashCode(); + break; + case 3: + hash = (37 * hash) + CROSS_REGIONAL_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getCrossRegionalSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ImportTaxonomiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ImportTaxonomiesRequest) + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.class, + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest build() { + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest buildPartial() { + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest result = + new com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest(this); + result.parent_ = parent_; + if (sourceCase_ == 2) { + if (inlineSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = inlineSourceBuilder_.build(); + } + } + if (sourceCase_ == 3) { + if (crossRegionalSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = crossRegionalSourceBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest other) { + if (other == com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + switch (other.getSourceCase()) { + case INLINE_SOURCE: + { + mergeInlineSource(other.getInlineSource()); + break; + } + case CROSS_REGIONAL_SOURCE: + { + mergeCrossRegionalSource(other.getCrossRegionalSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. Resource name of project that the imported taxonomies will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of project that the imported taxonomies will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of project that the imported taxonomies will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of project that the imported taxonomies will belong to.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of project that the imported taxonomies will belong to.
    +     * 
    + * + * + * 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. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.InlineSource, + com.google.cloud.datacatalog.v1.InlineSource.Builder, + com.google.cloud.datacatalog.v1.InlineSourceOrBuilder> + inlineSourceBuilder_; + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSource getInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.datacatalog.v1.InlineSource) source_; + } + return com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return inlineSourceBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + public Builder setInlineSource(com.google.cloud.datacatalog.v1.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + inlineSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + public Builder setInlineSource( + com.google.cloud.datacatalog.v1.InlineSource.Builder builderForValue) { + if (inlineSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + inlineSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + public Builder mergeInlineSource(com.google.cloud.datacatalog.v1.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ != com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance()) { + source_ = + com.google.cloud.datacatalog.v1.InlineSource.newBuilder( + (com.google.cloud.datacatalog.v1.InlineSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + inlineSourceBuilder_.mergeFrom(value); + } + inlineSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + public Builder clearInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + inlineSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + public com.google.cloud.datacatalog.v1.InlineSource.Builder getInlineSourceBuilder() { + return getInlineSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSourceOrBuilder getInlineSourceOrBuilder() { + if ((sourceCase_ == 2) && (inlineSourceBuilder_ != null)) { + return inlineSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.datacatalog.v1.InlineSource) source_; + } + return com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Inline source used for taxonomies import.
    +     * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.InlineSource, + com.google.cloud.datacatalog.v1.InlineSource.Builder, + com.google.cloud.datacatalog.v1.InlineSourceOrBuilder> + getInlineSourceFieldBuilder() { + if (inlineSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance(); + } + inlineSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.InlineSource, + com.google.cloud.datacatalog.v1.InlineSource.Builder, + com.google.cloud.datacatalog.v1.InlineSourceOrBuilder>( + (com.google.cloud.datacatalog.v1.InlineSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + ; + return inlineSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.CrossRegionalSource, + com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder, + com.google.cloud.datacatalog.v1.CrossRegionalSourceOrBuilder> + crossRegionalSourceBuilder_; + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * + * @return Whether the crossRegionalSource field is set. + */ + @java.lang.Override + public boolean hasCrossRegionalSource() { + return sourceCase_ == 3; + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * + * @return The crossRegionalSource. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSource getCrossRegionalSource() { + if (crossRegionalSourceBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_; + } + return com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return crossRegionalSourceBuilder_.getMessage(); + } + return com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + public Builder setCrossRegionalSource( + com.google.cloud.datacatalog.v1.CrossRegionalSource value) { + if (crossRegionalSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + crossRegionalSourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + public Builder setCrossRegionalSource( + com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder builderForValue) { + if (crossRegionalSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + crossRegionalSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + public Builder mergeCrossRegionalSource( + com.google.cloud.datacatalog.v1.CrossRegionalSource value) { + if (crossRegionalSourceBuilder_ == null) { + if (sourceCase_ == 3 + && source_ + != com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance()) { + source_ = + com.google.cloud.datacatalog.v1.CrossRegionalSource.newBuilder( + (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + crossRegionalSourceBuilder_.mergeFrom(value); + } + crossRegionalSourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + public Builder clearCrossRegionalSource() { + if (crossRegionalSourceBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + crossRegionalSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + public com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder + getCrossRegionalSourceBuilder() { + return getCrossRegionalSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.CrossRegionalSourceOrBuilder + getCrossRegionalSourceOrBuilder() { + if ((sourceCase_ == 3) && (crossRegionalSourceBuilder_ != null)) { + return crossRegionalSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_; + } + return com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Cross-regional source taxonomy to be imported.
    +     * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.CrossRegionalSource, + com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder, + com.google.cloud.datacatalog.v1.CrossRegionalSourceOrBuilder> + getCrossRegionalSourceFieldBuilder() { + if (crossRegionalSourceBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.cloud.datacatalog.v1.CrossRegionalSource.getDefaultInstance(); + } + crossRegionalSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.CrossRegionalSource, + com.google.cloud.datacatalog.v1.CrossRegionalSource.Builder, + com.google.cloud.datacatalog.v1.CrossRegionalSourceOrBuilder>( + (com.google.cloud.datacatalog.v1.CrossRegionalSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged(); + ; + return crossRegionalSourceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ImportTaxonomiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ImportTaxonomiesRequest) + private static final com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest(); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportTaxonomiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportTaxonomiesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequestOrBuilder.java new file mode 100644 index 00000000..0a90c0b8 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequestOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface ImportTaxonomiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ImportTaxonomiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of project that the imported taxonomies will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. Resource name of project that the imported taxonomies will belong to.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * Inline source used for taxonomies import.
    +   * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * + * @return Whether the inlineSource field is set. + */ + boolean hasInlineSource(); + /** + * + * + *
    +   * Inline source used for taxonomies import.
    +   * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + * + * @return The inlineSource. + */ + com.google.cloud.datacatalog.v1.InlineSource getInlineSource(); + /** + * + * + *
    +   * Inline source used for taxonomies import.
    +   * 
    + * + * .google.cloud.datacatalog.v1.InlineSource inline_source = 2; + */ + com.google.cloud.datacatalog.v1.InlineSourceOrBuilder getInlineSourceOrBuilder(); + + /** + * + * + *
    +   * Cross-regional source taxonomy to be imported.
    +   * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * + * @return Whether the crossRegionalSource field is set. + */ + boolean hasCrossRegionalSource(); + /** + * + * + *
    +   * Cross-regional source taxonomy to be imported.
    +   * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + * + * @return The crossRegionalSource. + */ + com.google.cloud.datacatalog.v1.CrossRegionalSource getCrossRegionalSource(); + /** + * + * + *
    +   * Cross-regional source taxonomy to be imported.
    +   * 
    + * + * .google.cloud.datacatalog.v1.CrossRegionalSource cross_regional_source = 3; + */ + com.google.cloud.datacatalog.v1.CrossRegionalSourceOrBuilder getCrossRegionalSourceOrBuilder(); + + public com.google.cloud.datacatalog.v1.ImportTaxonomiesRequest.SourceCase getSourceCase(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponse.java new file mode 100644 index 00000000..d13572ee --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponse.java @@ -0,0 +1,953 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Response message for
    + * [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ImportTaxonomiesResponse} + */ +public final class ImportTaxonomiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ImportTaxonomiesResponse) + ImportTaxonomiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportTaxonomiesResponse.newBuilder() to construct. + private ImportTaxonomiesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportTaxonomiesResponse() { + taxonomies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportTaxonomiesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportTaxonomiesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + taxonomies_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.Taxonomy.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.class, + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.Builder.class); + } + + public static final int TAXONOMIES_FIELD_NUMBER = 1; + private java.util.List taxonomies_; + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public java.util.List getTaxonomiesList() { + return taxonomies_; + } + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public java.util.List + getTaxonomiesOrBuilderList() { + return taxonomies_; + } + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public int getTaxonomiesCount() { + return taxonomies_.size(); + } + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomies(int index) { + return taxonomies_.get(index); + } + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomiesOrBuilder(int index) { + return taxonomies_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < taxonomies_.size(); i++) { + output.writeMessage(1, taxonomies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < taxonomies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, taxonomies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse other = + (com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse) obj; + + if (!getTaxonomiesList().equals(other.getTaxonomiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTaxonomiesCount() > 0) { + hash = (37 * hash) + TAXONOMIES_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Response message for
    +   * [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ImportTaxonomiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ImportTaxonomiesResponse) + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.class, + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTaxonomiesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + taxonomiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse build() { + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse buildPartial() { + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse result = + new com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse(this); + int from_bitField0_ = bitField0_; + if (taxonomiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.taxonomies_ = taxonomies_; + } else { + result.taxonomies_ = taxonomiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse other) { + if (other == com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse.getDefaultInstance()) + return this; + if (taxonomiesBuilder_ == null) { + if (!other.taxonomies_.isEmpty()) { + if (taxonomies_.isEmpty()) { + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTaxonomiesIsMutable(); + taxonomies_.addAll(other.taxonomies_); + } + onChanged(); + } + } else { + if (!other.taxonomies_.isEmpty()) { + if (taxonomiesBuilder_.isEmpty()) { + taxonomiesBuilder_.dispose(); + taxonomiesBuilder_ = null; + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + taxonomiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTaxonomiesFieldBuilder() + : null; + } else { + taxonomiesBuilder_.addAllMessages(other.taxonomies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List taxonomies_ = + java.util.Collections.emptyList(); + + private void ensureTaxonomiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = + new java.util.ArrayList(taxonomies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + taxonomiesBuilder_; + + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public java.util.List getTaxonomiesList() { + if (taxonomiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(taxonomies_); + } else { + return taxonomiesBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public int getTaxonomiesCount() { + if (taxonomiesBuilder_ == null) { + return taxonomies_.size(); + } else { + return taxonomiesBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder setTaxonomies(int index, com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, value); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder setTaxonomies( + int index, com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies(com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies(int index, com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies(com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies( + int index, com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addAllTaxonomies( + java.lang.Iterable values) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taxonomies_); + onChanged(); + } else { + taxonomiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder clearTaxonomies() { + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + taxonomiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder removeTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.remove(index); + onChanged(); + } else { + taxonomiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder getTaxonomiesBuilder(int index) { + return getTaxonomiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomiesOrBuilder(int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public java.util.List + getTaxonomiesOrBuilderList() { + if (taxonomiesBuilder_ != null) { + return taxonomiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(taxonomies_); + } + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder addTaxonomiesBuilder() { + return getTaxonomiesFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder addTaxonomiesBuilder(int index) { + return getTaxonomiesFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * Taxonomies that were imported.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public java.util.List + getTaxonomiesBuilderList() { + return getTaxonomiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + getTaxonomiesFieldBuilder() { + if (taxonomiesBuilder_ == null) { + taxonomiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder>( + taxonomies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + taxonomies_ = null; + } + return taxonomiesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ImportTaxonomiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ImportTaxonomiesResponse) + private static final com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse(); + } + + public static com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportTaxonomiesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportTaxonomiesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ImportTaxonomiesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponseOrBuilder.java new file mode 100644 index 00000000..aa7011cb --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface ImportTaxonomiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ImportTaxonomiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + java.util.List getTaxonomiesList(); + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + com.google.cloud.datacatalog.v1.Taxonomy getTaxonomies(int index); + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + int getTaxonomiesCount(); + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + java.util.List + getTaxonomiesOrBuilderList(); + /** + * + * + *
    +   * Taxonomies that were imported.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomiesOrBuilder(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSource.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSource.java new file mode 100644 index 00000000..0ee13d05 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSource.java @@ -0,0 +1,1005 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Inline source containing taxonomies to import.
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.InlineSource} + */ +public final class InlineSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.InlineSource) + InlineSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use InlineSource.newBuilder() to construct. + private InlineSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InlineSource() { + taxonomies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InlineSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InlineSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + taxonomies_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.SerializedTaxonomy.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.InlineSource.class, + com.google.cloud.datacatalog.v1.InlineSource.Builder.class); + } + + public static final int TAXONOMIES_FIELD_NUMBER = 1; + private java.util.List taxonomies_; + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getTaxonomiesList() { + return taxonomies_; + } + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getTaxonomiesOrBuilderList() { + return taxonomies_; + } + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getTaxonomiesCount() { + return taxonomies_.size(); + } + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomy getTaxonomies(int index) { + return taxonomies_.get(index); + } + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder getTaxonomiesOrBuilder( + int index) { + return taxonomies_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < taxonomies_.size(); i++) { + output.writeMessage(1, taxonomies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < taxonomies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, taxonomies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.InlineSource)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.InlineSource other = + (com.google.cloud.datacatalog.v1.InlineSource) obj; + + if (!getTaxonomiesList().equals(other.getTaxonomiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTaxonomiesCount() > 0) { + hash = (37 * hash) + TAXONOMIES_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.InlineSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.InlineSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Inline source containing taxonomies to import.
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.InlineSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.InlineSource) + com.google.cloud.datacatalog.v1.InlineSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.InlineSource.class, + com.google.cloud.datacatalog.v1.InlineSource.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.InlineSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTaxonomiesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + taxonomiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_InlineSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSource getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSource build() { + com.google.cloud.datacatalog.v1.InlineSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSource buildPartial() { + com.google.cloud.datacatalog.v1.InlineSource result = + new com.google.cloud.datacatalog.v1.InlineSource(this); + int from_bitField0_ = bitField0_; + if (taxonomiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.taxonomies_ = taxonomies_; + } else { + result.taxonomies_ = taxonomiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.InlineSource) { + return mergeFrom((com.google.cloud.datacatalog.v1.InlineSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.InlineSource other) { + if (other == com.google.cloud.datacatalog.v1.InlineSource.getDefaultInstance()) return this; + if (taxonomiesBuilder_ == null) { + if (!other.taxonomies_.isEmpty()) { + if (taxonomies_.isEmpty()) { + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTaxonomiesIsMutable(); + taxonomies_.addAll(other.taxonomies_); + } + onChanged(); + } + } else { + if (!other.taxonomies_.isEmpty()) { + if (taxonomiesBuilder_.isEmpty()) { + taxonomiesBuilder_.dispose(); + taxonomiesBuilder_ = null; + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + taxonomiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTaxonomiesFieldBuilder() + : null; + } else { + taxonomiesBuilder_.addAllMessages(other.taxonomies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.InlineSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.InlineSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List taxonomies_ = + java.util.Collections.emptyList(); + + private void ensureTaxonomiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = + new java.util.ArrayList( + taxonomies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedTaxonomy, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder, + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder> + taxonomiesBuilder_; + + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getTaxonomiesList() { + if (taxonomiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(taxonomies_); + } else { + return taxonomiesBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getTaxonomiesCount() { + if (taxonomiesBuilder_ == null) { + return taxonomies_.size(); + } else { + return taxonomiesBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy getTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, value); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addTaxonomies(com.google.cloud.datacatalog.v1.SerializedTaxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addTaxonomies( + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addTaxonomies( + int index, com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllTaxonomies( + java.lang.Iterable values) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taxonomies_); + onChanged(); + } else { + taxonomiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTaxonomies() { + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + taxonomiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.remove(index); + onChanged(); + } else { + taxonomiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder getTaxonomiesBuilder( + int index) { + return getTaxonomiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder getTaxonomiesOrBuilder( + int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getTaxonomiesOrBuilderList() { + if (taxonomiesBuilder_ != null) { + return taxonomiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(taxonomies_); + } + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder addTaxonomiesBuilder() { + return getTaxonomiesFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.SerializedTaxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder addTaxonomiesBuilder( + int index) { + return getTaxonomiesFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.v1.SerializedTaxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * Required. Taxonomies to be imported.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getTaxonomiesBuilderList() { + return getTaxonomiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedTaxonomy, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder, + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder> + getTaxonomiesFieldBuilder() { + if (taxonomiesBuilder_ == null) { + taxonomiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedTaxonomy, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder, + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder>( + taxonomies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + taxonomies_ = null; + } + return taxonomiesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.InlineSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.InlineSource) + private static final com.google.cloud.datacatalog.v1.InlineSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.InlineSource(); + } + + public static com.google.cloud.datacatalog.v1.InlineSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InlineSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.InlineSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSourceOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSourceOrBuilder.java new file mode 100644 index 00000000..6657fd47 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSourceOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface InlineSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.InlineSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getTaxonomiesList(); + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.SerializedTaxonomy getTaxonomies(int index); + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getTaxonomiesCount(); + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getTaxonomiesOrBuilderList(); + /** + * + * + *
    +   * Required. Taxonomies to be imported.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.SerializedTaxonomy taxonomies = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder getTaxonomiesOrBuilder(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java index b034e7a5..3ccae874 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java @@ -59,6 +59,16 @@ public enum IntegratedSystem implements com.google.protobuf.ProtocolMessageEnum * CLOUD_PUBSUB = 2; */ CLOUD_PUBSUB(2), + /** + * + * + *
    +   * Dataproc Metastore.
    +   * 
    + * + * DATAPROC_METASTORE = 3; + */ + DATAPROC_METASTORE(3), UNRECOGNIZED(-1), ; @@ -92,6 +102,16 @@ public enum IntegratedSystem implements com.google.protobuf.ProtocolMessageEnum * CLOUD_PUBSUB = 2; */ public static final int CLOUD_PUBSUB_VALUE = 2; + /** + * + * + *
    +   * Dataproc Metastore.
    +   * 
    + * + * DATAPROC_METASTORE = 3; + */ + public static final int DATAPROC_METASTORE_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -123,6 +143,8 @@ public static IntegratedSystem forNumber(int value) { return BIGQUERY; case 2: return CLOUD_PUBSUB; + case 3: + return DATAPROC_METASTORE; default: return null; } diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java index 8ce53cb7..7cb6d193 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequest.java @@ -131,8 +131,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -   * Required. The name of the location that contains the entry groups, which
    -   * can be provided in URL format. Example:
    +   * Required. The name of the location that contains the entry groups, which can be
    +   * provided in URL format. Example:
        * * projects/{project_id}/locations/{location}
        * 
    * @@ -158,8 +158,8 @@ public java.lang.String getParent() { * * *
    -   * Required. The name of the location that contains the entry groups, which
    -   * can be provided in URL format. Example:
    +   * Required. The name of the location that contains the entry groups, which can be
    +   * provided in URL format. Example:
        * * projects/{project_id}/locations/{location}
        * 
    * @@ -188,8 +188,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
    -   * Optional. The maximum number of items to return. Default is 10. Max limit
    -   * is 1000. Throws an invalid argument for `page_size > 1000`.
    +   * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
    +   * Throws an invalid argument for `page_size > 1000`.
        * 
    * * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -207,8 +207,8 @@ public int getPageSize() { * * *
    -   * Optional. Token that specifies which page is requested. If empty, the first
    -   * page is returned.
    +   * Optional. Token that specifies which page is requested. If empty, the first page is
    +   * returned.
        * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -231,8 +231,8 @@ public java.lang.String getPageToken() { * * *
    -   * Optional. Token that specifies which page is requested. If empty, the first
    -   * page is returned.
    +   * Optional. Token that specifies which page is requested. If empty, the first page is
    +   * returned.
        * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -608,8 +608,8 @@ public Builder mergeFrom( * * *
    -     * Required. The name of the location that contains the entry groups, which
    -     * can be provided in URL format. Example:
    +     * Required. The name of the location that contains the entry groups, which can be
    +     * provided in URL format. Example:
          * * projects/{project_id}/locations/{location}
          * 
    * @@ -634,8 +634,8 @@ public java.lang.String getParent() { * * *
    -     * Required. The name of the location that contains the entry groups, which
    -     * can be provided in URL format. Example:
    +     * Required. The name of the location that contains the entry groups, which can be
    +     * provided in URL format. Example:
          * * projects/{project_id}/locations/{location}
          * 
    * @@ -660,8 +660,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
    -     * Required. The name of the location that contains the entry groups, which
    -     * can be provided in URL format. Example:
    +     * Required. The name of the location that contains the entry groups, which can be
    +     * provided in URL format. Example:
          * * projects/{project_id}/locations/{location}
          * 
    * @@ -685,8 +685,8 @@ public Builder setParent(java.lang.String value) { * * *
    -     * Required. The name of the location that contains the entry groups, which
    -     * can be provided in URL format. Example:
    +     * Required. The name of the location that contains the entry groups, which can be
    +     * provided in URL format. Example:
          * * projects/{project_id}/locations/{location}
          * 
    * @@ -706,8 +706,8 @@ public Builder clearParent() { * * *
    -     * Required. The name of the location that contains the entry groups, which
    -     * can be provided in URL format. Example:
    +     * Required. The name of the location that contains the entry groups, which can be
    +     * provided in URL format. Example:
          * * projects/{project_id}/locations/{location}
          * 
    * @@ -734,8 +734,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
    -     * Optional. The maximum number of items to return. Default is 10. Max limit
    -     * is 1000. Throws an invalid argument for `page_size > 1000`.
    +     * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
    +     * Throws an invalid argument for `page_size > 1000`.
          * 
    * * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -750,8 +750,8 @@ public int getPageSize() { * * *
    -     * Optional. The maximum number of items to return. Default is 10. Max limit
    -     * is 1000. Throws an invalid argument for `page_size > 1000`.
    +     * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
    +     * Throws an invalid argument for `page_size > 1000`.
          * 
    * * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -769,8 +769,8 @@ public Builder setPageSize(int value) { * * *
    -     * Optional. The maximum number of items to return. Default is 10. Max limit
    -     * is 1000. Throws an invalid argument for `page_size > 1000`.
    +     * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
    +     * Throws an invalid argument for `page_size > 1000`.
          * 
    * * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -789,8 +789,8 @@ public Builder clearPageSize() { * * *
    -     * Optional. Token that specifies which page is requested. If empty, the first
    -     * page is returned.
    +     * Optional. Token that specifies which page is requested. If empty, the first page is
    +     * returned.
          * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -812,8 +812,8 @@ public java.lang.String getPageToken() { * * *
    -     * Optional. Token that specifies which page is requested. If empty, the first
    -     * page is returned.
    +     * Optional. Token that specifies which page is requested. If empty, the first page is
    +     * returned.
          * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -835,8 +835,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
    -     * Optional. Token that specifies which page is requested. If empty, the first
    -     * page is returned.
    +     * Optional. Token that specifies which page is requested. If empty, the first page is
    +     * returned.
          * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -857,8 +857,8 @@ public Builder setPageToken(java.lang.String value) { * * *
    -     * Optional. Token that specifies which page is requested. If empty, the first
    -     * page is returned.
    +     * Optional. Token that specifies which page is requested. If empty, the first page is
    +     * returned.
          * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -875,8 +875,8 @@ public Builder clearPageToken() { * * *
    -     * Optional. Token that specifies which page is requested. If empty, the first
    -     * page is returned.
    +     * Optional. Token that specifies which page is requested. If empty, the first page is
    +     * returned.
          * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java index 7b30a99e..ec83aa42 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface ListEntryGroupsRequestOrBuilder * * *
    -   * Required. The name of the location that contains the entry groups, which
    -   * can be provided in URL format. Example:
    +   * Required. The name of the location that contains the entry groups, which can be
    +   * provided in URL format. Example:
        * * projects/{project_id}/locations/{location}
        * 
    * @@ -43,8 +43,8 @@ public interface ListEntryGroupsRequestOrBuilder * * *
    -   * Required. The name of the location that contains the entry groups, which
    -   * can be provided in URL format. Example:
    +   * Required. The name of the location that contains the entry groups, which can be
    +   * provided in URL format. Example:
        * * projects/{project_id}/locations/{location}
        * 
    * @@ -60,8 +60,8 @@ public interface ListEntryGroupsRequestOrBuilder * * *
    -   * Optional. The maximum number of items to return. Default is 10. Max limit
    -   * is 1000. Throws an invalid argument for `page_size > 1000`.
    +   * Optional. The maximum number of items to return. Default is 10. Max limit is 1000.
    +   * Throws an invalid argument for `page_size > 1000`.
        * 
    * * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -74,8 +74,8 @@ public interface ListEntryGroupsRequestOrBuilder * * *
    -   * Optional. Token that specifies which page is requested. If empty, the first
    -   * page is returned.
    +   * Optional. Token that specifies which page is requested. If empty, the first page is
    +   * returned.
        * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -87,8 +87,8 @@ public interface ListEntryGroupsRequestOrBuilder * * *
    -   * Optional. Token that specifies which page is requested. If empty, the first
    -   * page is returned.
    +   * Optional. Token that specifies which page is requested. If empty, the first page is
    +   * returned.
        * 
    * * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequest.java new file mode 100644 index 00000000..ab464ade --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequest.java @@ -0,0 +1,933 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListPolicyTagsRequest} + */ +public final class ListPolicyTagsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListPolicyTagsRequest) + ListPolicyTagsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPolicyTagsRequest.newBuilder() to construct. + private ListPolicyTagsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPolicyTagsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPolicyTagsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPolicyTagsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.class, + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. Resource name of the taxonomy to list the policy tags of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the taxonomy to list the policy tags of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
    +   * The maximum number of items to return. Must be a value between 1 and 1000.
    +   * If not set, defaults to 50.
    +   * 
    + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
    +   * The next_page_token value returned from a previous List request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
    +   * The next_page_token value returned from a previous List request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ListPolicyTagsRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest other = + (com.google.cloud.datacatalog.v1.ListPolicyTagsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListPolicyTagsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListPolicyTagsRequest) + com.google.cloud.datacatalog.v1.ListPolicyTagsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.class, + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsRequest build() { + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsRequest buildPartial() { + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest result = + new com.google.cloud.datacatalog.v1.ListPolicyTagsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ListPolicyTagsRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListPolicyTagsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListPolicyTagsRequest other) { + if (other == com.google.cloud.datacatalog.v1.ListPolicyTagsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ListPolicyTagsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListPolicyTagsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. Resource name of the taxonomy to list the policy tags of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to list the policy tags of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to list the policy tags of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to list the policy tags of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the taxonomy to list the policy tags of.
    +     * 
    + * + * + * 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. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
    +     * The maximum number of items to return. Must be a value between 1 and 1000.
    +     * If not set, defaults to 50.
    +     * 
    + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
    +     * The maximum number of items to return. Must be a value between 1 and 1000.
    +     * If not set, defaults to 50.
    +     * 
    + * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The maximum number of items to return. Must be a value between 1 and 1000.
    +     * If not set, defaults to 50.
    +     * 
    + * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
    +     * The next_page_token value returned from a previous List request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The next_page_token value returned from a previous List request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The next_page_token value returned from a previous List request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The next_page_token value returned from a previous List request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The next_page_token value returned from a previous List request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ListPolicyTagsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListPolicyTagsRequest) + private static final com.google.cloud.datacatalog.v1.ListPolicyTagsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListPolicyTagsRequest(); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyTagsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPolicyTagsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequestOrBuilder.java new file mode 100644 index 00000000..749a4cc0 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListPolicyTagsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListPolicyTagsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the taxonomy to list the policy tags of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. Resource name of the taxonomy to list the policy tags of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * The maximum number of items to return. Must be a value between 1 and 1000.
    +   * If not set, defaults to 50.
    +   * 
    + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
    +   * The next_page_token value returned from a previous List request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
    +   * The next_page_token value returned from a previous List request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponse.java new file mode 100644 index 00000000..7ab64695 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponse.java @@ -0,0 +1,1140 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Response message for
    + * [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListPolicyTagsResponse} + */ +public final class ListPolicyTagsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListPolicyTagsResponse) + ListPolicyTagsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPolicyTagsResponse.newBuilder() to construct. + private ListPolicyTagsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPolicyTagsResponse() { + policyTags_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPolicyTagsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPolicyTagsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + policyTags_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + policyTags_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.PolicyTag.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + policyTags_ = java.util.Collections.unmodifiableList(policyTags_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.class, + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.Builder.class); + } + + public static final int POLICY_TAGS_FIELD_NUMBER = 1; + private java.util.List policyTags_; + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + @java.lang.Override + public java.util.List getPolicyTagsList() { + return policyTags_; + } + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + @java.lang.Override + public java.util.List + getPolicyTagsOrBuilderList() { + return policyTags_; + } + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + @java.lang.Override + public int getPolicyTagsCount() { + return policyTags_.size(); + } + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTag getPolicyTags(int index) { + return policyTags_.get(index); + } + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagsOrBuilder(int index) { + return policyTags_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyTags_.size(); i++) { + output.writeMessage(1, policyTags_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyTags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyTags_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ListPolicyTagsResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse other = + (com.google.cloud.datacatalog.v1.ListPolicyTagsResponse) obj; + + if (!getPolicyTagsList().equals(other.getPolicyTagsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyTagsCount() > 0) { + hash = (37 * hash) + POLICY_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyTagsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Response message for
    +   * [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListPolicyTagsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListPolicyTagsResponse) + com.google.cloud.datacatalog.v1.ListPolicyTagsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.class, + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPolicyTagsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyTagsBuilder_ == null) { + policyTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyTagsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsResponse build() { + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsResponse buildPartial() { + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse result = + new com.google.cloud.datacatalog.v1.ListPolicyTagsResponse(this); + int from_bitField0_ = bitField0_; + if (policyTagsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyTags_ = java.util.Collections.unmodifiableList(policyTags_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyTags_ = policyTags_; + } else { + result.policyTags_ = policyTagsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ListPolicyTagsResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListPolicyTagsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListPolicyTagsResponse other) { + if (other == com.google.cloud.datacatalog.v1.ListPolicyTagsResponse.getDefaultInstance()) + return this; + if (policyTagsBuilder_ == null) { + if (!other.policyTags_.isEmpty()) { + if (policyTags_.isEmpty()) { + policyTags_ = other.policyTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyTagsIsMutable(); + policyTags_.addAll(other.policyTags_); + } + onChanged(); + } + } else { + if (!other.policyTags_.isEmpty()) { + if (policyTagsBuilder_.isEmpty()) { + policyTagsBuilder_.dispose(); + policyTagsBuilder_ = null; + policyTags_ = other.policyTags_; + bitField0_ = (bitField0_ & ~0x00000001); + policyTagsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPolicyTagsFieldBuilder() + : null; + } else { + policyTagsBuilder_.addAllMessages(other.policyTags_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ListPolicyTagsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListPolicyTagsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List policyTags_ = + java.util.Collections.emptyList(); + + private void ensurePolicyTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyTags_ = + new java.util.ArrayList(policyTags_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder> + policyTagsBuilder_; + + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public java.util.List getPolicyTagsList() { + if (policyTagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyTags_); + } else { + return policyTagsBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public int getPolicyTagsCount() { + if (policyTagsBuilder_ == null) { + return policyTags_.size(); + } else { + return policyTagsBuilder_.getCount(); + } + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public com.google.cloud.datacatalog.v1.PolicyTag getPolicyTags(int index) { + if (policyTagsBuilder_ == null) { + return policyTags_.get(index); + } else { + return policyTagsBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder setPolicyTags(int index, com.google.cloud.datacatalog.v1.PolicyTag value) { + if (policyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyTagsIsMutable(); + policyTags_.set(index, value); + onChanged(); + } else { + policyTagsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder setPolicyTags( + int index, com.google.cloud.datacatalog.v1.PolicyTag.Builder builderForValue) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.set(index, builderForValue.build()); + onChanged(); + } else { + policyTagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder addPolicyTags(com.google.cloud.datacatalog.v1.PolicyTag value) { + if (policyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyTagsIsMutable(); + policyTags_.add(value); + onChanged(); + } else { + policyTagsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder addPolicyTags(int index, com.google.cloud.datacatalog.v1.PolicyTag value) { + if (policyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyTagsIsMutable(); + policyTags_.add(index, value); + onChanged(); + } else { + policyTagsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder addPolicyTags( + com.google.cloud.datacatalog.v1.PolicyTag.Builder builderForValue) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.add(builderForValue.build()); + onChanged(); + } else { + policyTagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder addPolicyTags( + int index, com.google.cloud.datacatalog.v1.PolicyTag.Builder builderForValue) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.add(index, builderForValue.build()); + onChanged(); + } else { + policyTagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder addAllPolicyTags( + java.lang.Iterable values) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyTags_); + onChanged(); + } else { + policyTagsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder clearPolicyTags() { + if (policyTagsBuilder_ == null) { + policyTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyTagsBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public Builder removePolicyTags(int index) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.remove(index); + onChanged(); + } else { + policyTagsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public com.google.cloud.datacatalog.v1.PolicyTag.Builder getPolicyTagsBuilder(int index) { + return getPolicyTagsFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagsOrBuilder(int index) { + if (policyTagsBuilder_ == null) { + return policyTags_.get(index); + } else { + return policyTagsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public java.util.List + getPolicyTagsOrBuilderList() { + if (policyTagsBuilder_ != null) { + return policyTagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyTags_); + } + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public com.google.cloud.datacatalog.v1.PolicyTag.Builder addPolicyTagsBuilder() { + return getPolicyTagsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance()); + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public com.google.cloud.datacatalog.v1.PolicyTag.Builder addPolicyTagsBuilder(int index) { + return getPolicyTagsFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance()); + } + /** + * + * + *
    +     * The policy tags that are in the requested taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + public java.util.List + getPolicyTagsBuilderList() { + return getPolicyTagsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder> + getPolicyTagsFieldBuilder() { + if (policyTagsBuilder_ == null) { + policyTagsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder>( + policyTags_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policyTags_ = null; + } + return policyTagsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ListPolicyTagsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListPolicyTagsResponse) + private static final com.google.cloud.datacatalog.v1.ListPolicyTagsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListPolicyTagsResponse(); + } + + public static com.google.cloud.datacatalog.v1.ListPolicyTagsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyTagsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPolicyTagsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListPolicyTagsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponseOrBuilder.java new file mode 100644 index 00000000..49dde188 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListPolicyTagsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListPolicyTagsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + java.util.List getPolicyTagsList(); + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + com.google.cloud.datacatalog.v1.PolicyTag getPolicyTags(int index); + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + int getPolicyTagsCount(); + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + java.util.List + getPolicyTagsOrBuilderList(); + /** + * + * + *
    +   * The policy tags that are in the requested taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.PolicyTag policy_tags = 1; + */ + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagsOrBuilder(int index); + + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java index 167f50b4..b4685a93 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java @@ -131,8 +131,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -   * Required. The name of the Data Catalog resource to list the tags of. The
    -   * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +   * Required. The name of the Data Catalog resource to list the tags of. The resource
    +   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
        * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
        * Examples:
        * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    @@ -161,8 +161,8 @@ public java.lang.String getParent() {
        *
        *
        * 
    -   * Required. The name of the Data Catalog resource to list the tags of. The
    -   * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +   * Required. The name of the Data Catalog resource to list the tags of. The resource
    +   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
        * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
        * Examples:
        * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    @@ -611,8 +611,8 @@ public Builder mergeFrom(
          *
          *
          * 
    -     * Required. The name of the Data Catalog resource to list the tags of. The
    -     * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +     * Required. The name of the Data Catalog resource to list the tags of. The resource
    +     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
          * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
          * Examples:
          * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    @@ -640,8 +640,8 @@ public java.lang.String getParent() {
          *
          *
          * 
    -     * Required. The name of the Data Catalog resource to list the tags of. The
    -     * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +     * Required. The name of the Data Catalog resource to list the tags of. The resource
    +     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
          * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
          * Examples:
          * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    @@ -669,8 +669,8 @@ public com.google.protobuf.ByteString getParentBytes() {
          *
          *
          * 
    -     * Required. The name of the Data Catalog resource to list the tags of. The
    -     * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +     * Required. The name of the Data Catalog resource to list the tags of. The resource
    +     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
          * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
          * Examples:
          * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    @@ -697,8 +697,8 @@ public Builder setParent(java.lang.String value) {
          *
          *
          * 
    -     * Required. The name of the Data Catalog resource to list the tags of. The
    -     * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +     * Required. The name of the Data Catalog resource to list the tags of. The resource
    +     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
          * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
          * Examples:
          * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    @@ -721,8 +721,8 @@ public Builder clearParent() {
          *
          *
          * 
    -     * Required. The name of the Data Catalog resource to list the tags of. The
    -     * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +     * Required. The name of the Data Catalog resource to list the tags of. The resource
    +     * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
          * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
          * Examples:
          * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java
    index 801fb7ab..34b2b83f 100644
    --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java
    +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java
    @@ -27,8 +27,8 @@ public interface ListTagsRequestOrBuilder
        *
        *
        * 
    -   * Required. The name of the Data Catalog resource to list the tags of. The
    -   * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +   * Required. The name of the Data Catalog resource to list the tags of. The resource
    +   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
        * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
        * Examples:
        * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    @@ -46,8 +46,8 @@ public interface ListTagsRequestOrBuilder
        *
        *
        * 
    -   * Required. The name of the Data Catalog resource to list the tags of. The
    -   * resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
    +   * Required. The name of the Data Catalog resource to list the tags of. The resource
    +   * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an
        * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup].
        * Examples:
        * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequest.java
    new file mode 100644
    index 00000000..089a4de9
    --- /dev/null
    +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequest.java
    @@ -0,0 +1,933 @@
    +/*
    + * Copyright 2020 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.
    + */
    +// Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// source: google/cloud/datacatalog/v1/policytagmanager.proto
    +
    +package com.google.cloud.datacatalog.v1;
    +
    +/**
    + *
    + *
    + * 
    + * Request message for
    + * [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTaxonomiesRequest} + */ +public final class ListTaxonomiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListTaxonomiesRequest) + ListTaxonomiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTaxonomiesRequest.newBuilder() to construct. + private ListTaxonomiesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTaxonomiesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTaxonomiesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTaxonomiesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.class, + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
    +   * Required. Resource name of the project to list the taxonomies of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Resource name of the project to list the taxonomies of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
    +   * The maximum number of items to return. Must be a value between 1 and 1000.
    +   * If not set, defaults to 50.
    +   * 
    + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
    +   * The next_page_token value returned from a previous list request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
    +   * The next_page_token value returned from a previous list request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ListTaxonomiesRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest other = + (com.google.cloud.datacatalog.v1.ListTaxonomiesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTaxonomiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListTaxonomiesRequest) + com.google.cloud.datacatalog.v1.ListTaxonomiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.class, + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesRequest build() { + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesRequest buildPartial() { + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest result = + new com.google.cloud.datacatalog.v1.ListTaxonomiesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ListTaxonomiesRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListTaxonomiesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListTaxonomiesRequest other) { + if (other == com.google.cloud.datacatalog.v1.ListTaxonomiesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ListTaxonomiesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListTaxonomiesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
    +     * Required. Resource name of the project to list the taxonomies of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the project to list the taxonomies of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Resource name of the project to list the taxonomies of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the project to list the taxonomies of.
    +     * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Resource name of the project to list the taxonomies of.
    +     * 
    + * + * + * 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. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
    +     * The maximum number of items to return. Must be a value between 1 and 1000.
    +     * If not set, defaults to 50.
    +     * 
    + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
    +     * The maximum number of items to return. Must be a value between 1 and 1000.
    +     * If not set, defaults to 50.
    +     * 
    + * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The maximum number of items to return. Must be a value between 1 and 1000.
    +     * If not set, defaults to 50.
    +     * 
    + * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
    +     * The next_page_token value returned from a previous list request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The next_page_token value returned from a previous list request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The next_page_token value returned from a previous list request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The next_page_token value returned from a previous list request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The next_page_token value returned from a previous list request, if any. If
    +     * not set, defaults to an empty string.
    +     * 
    + * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ListTaxonomiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListTaxonomiesRequest) + private static final com.google.cloud.datacatalog.v1.ListTaxonomiesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListTaxonomiesRequest(); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTaxonomiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTaxonomiesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequestOrBuilder.java new file mode 100644 index 00000000..57632c35 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListTaxonomiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListTaxonomiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Resource name of the project to list the taxonomies of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
    +   * Required. Resource name of the project to list the taxonomies of.
    +   * 
    + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
    +   * The maximum number of items to return. Must be a value between 1 and 1000.
    +   * If not set, defaults to 50.
    +   * 
    + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
    +   * The next_page_token value returned from a previous list request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
    +   * The next_page_token value returned from a previous list request, if any. If
    +   * not set, defaults to an empty string.
    +   * 
    + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponse.java new file mode 100644 index 00000000..2cb4332f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponse.java @@ -0,0 +1,1139 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Response message for
    + * [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTaxonomiesResponse} + */ +public final class ListTaxonomiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.ListTaxonomiesResponse) + ListTaxonomiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTaxonomiesResponse.newBuilder() to construct. + private ListTaxonomiesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTaxonomiesResponse() { + taxonomies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTaxonomiesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTaxonomiesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + taxonomies_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.Taxonomy.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.class, + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.Builder.class); + } + + public static final int TAXONOMIES_FIELD_NUMBER = 1; + private java.util.List taxonomies_; + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public java.util.List getTaxonomiesList() { + return taxonomies_; + } + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public java.util.List + getTaxonomiesOrBuilderList() { + return taxonomies_; + } + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public int getTaxonomiesCount() { + return taxonomies_.size(); + } + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomies(int index) { + return taxonomies_.get(index); + } + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomiesOrBuilder(int index) { + return taxonomies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < taxonomies_.size(); i++) { + output.writeMessage(1, taxonomies_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < taxonomies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, taxonomies_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.ListTaxonomiesResponse)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse other = + (com.google.cloud.datacatalog.v1.ListTaxonomiesResponse) obj; + + if (!getTaxonomiesList().equals(other.getTaxonomiesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTaxonomiesCount() > 0) { + hash = (37 * hash) + TAXONOMIES_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomiesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Response message for
    +   * [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.ListTaxonomiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.ListTaxonomiesResponse) + com.google.cloud.datacatalog.v1.ListTaxonomiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.class, + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTaxonomiesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + taxonomiesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesResponse getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesResponse build() { + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesResponse buildPartial() { + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse result = + new com.google.cloud.datacatalog.v1.ListTaxonomiesResponse(this); + int from_bitField0_ = bitField0_; + if (taxonomiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = java.util.Collections.unmodifiableList(taxonomies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.taxonomies_ = taxonomies_; + } else { + result.taxonomies_ = taxonomiesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.ListTaxonomiesResponse) { + return mergeFrom((com.google.cloud.datacatalog.v1.ListTaxonomiesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.ListTaxonomiesResponse other) { + if (other == com.google.cloud.datacatalog.v1.ListTaxonomiesResponse.getDefaultInstance()) + return this; + if (taxonomiesBuilder_ == null) { + if (!other.taxonomies_.isEmpty()) { + if (taxonomies_.isEmpty()) { + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTaxonomiesIsMutable(); + taxonomies_.addAll(other.taxonomies_); + } + onChanged(); + } + } else { + if (!other.taxonomies_.isEmpty()) { + if (taxonomiesBuilder_.isEmpty()) { + taxonomiesBuilder_.dispose(); + taxonomiesBuilder_ = null; + taxonomies_ = other.taxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + taxonomiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTaxonomiesFieldBuilder() + : null; + } else { + taxonomiesBuilder_.addAllMessages(other.taxonomies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.ListTaxonomiesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.ListTaxonomiesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List taxonomies_ = + java.util.Collections.emptyList(); + + private void ensureTaxonomiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + taxonomies_ = + new java.util.ArrayList(taxonomies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + taxonomiesBuilder_; + + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public java.util.List getTaxonomiesList() { + if (taxonomiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(taxonomies_); + } else { + return taxonomiesBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public int getTaxonomiesCount() { + if (taxonomiesBuilder_ == null) { + return taxonomies_.size(); + } else { + return taxonomiesBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder setTaxonomies(int index, com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, value); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder setTaxonomies( + int index, com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.set(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies(com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies(int index, com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, value); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies(com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addTaxonomies( + int index, com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.add(index, builderForValue.build()); + onChanged(); + } else { + taxonomiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder addAllTaxonomies( + java.lang.Iterable values) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, taxonomies_); + onChanged(); + } else { + taxonomiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder clearTaxonomies() { + if (taxonomiesBuilder_ == null) { + taxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + taxonomiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public Builder removeTaxonomies(int index) { + if (taxonomiesBuilder_ == null) { + ensureTaxonomiesIsMutable(); + taxonomies_.remove(index); + onChanged(); + } else { + taxonomiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder getTaxonomiesBuilder(int index) { + return getTaxonomiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomiesOrBuilder(int index) { + if (taxonomiesBuilder_ == null) { + return taxonomies_.get(index); + } else { + return taxonomiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public java.util.List + getTaxonomiesOrBuilderList() { + if (taxonomiesBuilder_ != null) { + return taxonomiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(taxonomies_); + } + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder addTaxonomiesBuilder() { + return getTaxonomiesFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder addTaxonomiesBuilder(int index) { + return getTaxonomiesFieldBuilder() + .addBuilder(index, com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance()); + } + /** + * + * + *
    +     * Taxonomies that the project contains.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + public java.util.List + getTaxonomiesBuilderList() { + return getTaxonomiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + getTaxonomiesFieldBuilder() { + if (taxonomiesBuilder_ == null) { + taxonomiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder>( + taxonomies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + taxonomies_ = null; + } + return taxonomiesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Token used to retrieve the next page of results, or empty if there are no
    +     * more results in the list.
    +     * 
    + * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.ListTaxonomiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.ListTaxonomiesResponse) + private static final com.google.cloud.datacatalog.v1.ListTaxonomiesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.ListTaxonomiesResponse(); + } + + public static com.google.cloud.datacatalog.v1.ListTaxonomiesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTaxonomiesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTaxonomiesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.ListTaxonomiesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponseOrBuilder.java new file mode 100644 index 00000000..d4ba519b --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface ListTaxonomiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.ListTaxonomiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + java.util.List getTaxonomiesList(); + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + com.google.cloud.datacatalog.v1.Taxonomy getTaxonomies(int index); + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + int getTaxonomiesCount(); + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + java.util.List + getTaxonomiesOrBuilderList(); + /** + * + * + *
    +   * Taxonomies that the project contains.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy taxonomies = 1; + */ + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomiesOrBuilder(int index); + + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
    +   * Token used to retrieve the next page of results, or empty if there are no
    +   * more results in the list.
    +   * 
    + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java index 6093c767..fc74af3c 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java @@ -83,6 +83,13 @@ private LookupEntryRequest( targetName_ = s; break; } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + targetNameCase_ = 5; + targetName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -126,6 +133,7 @@ public enum TargetNameCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { LINKED_RESOURCE(1), SQL_RESOURCE(3), + FULLY_QUALIFIED_NAME(5), TARGETNAME_NOT_SET(0); private final int value; @@ -148,6 +156,8 @@ public static TargetNameCase forNumber(int value) { return LINKED_RESOURCE; case 3: return SQL_RESOURCE; + case 5: + return FULLY_QUALIFIED_NAME; case 0: return TARGETNAME_NOT_SET; default: @@ -264,7 +274,7 @@ public com.google.protobuf.ByteString getLinkedResourceBytes() { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -286,7 +296,7 @@ public boolean hasSqlResource() { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -321,7 +331,7 @@ public java.lang.String getSqlResource() { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -346,6 +356,97 @@ public com.google.protobuf.ByteString getSqlResourceBytes() { } } + public static final int FULLY_QUALIFIED_NAME_FIELD_NUMBER = 5; + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 5; + * + * @return Whether the fullyQualifiedName field is set. + */ + public boolean hasFullyQualifiedName() { + return targetNameCase_ == 5; + } + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 5; + * + * @return The fullyQualifiedName. + */ + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = ""; + if (targetNameCase_ == 5) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 5) { + targetName_ = s; + } + return s; + } + } + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 5; + * + * @return The bytes for fullyQualifiedName. + */ + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 5) { + ref = targetName_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 5) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -366,6 +467,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetNameCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetName_); } + if (targetNameCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, targetName_); + } unknownFields.writeTo(output); } @@ -381,6 +485,9 @@ public int getSerializedSize() { if (targetNameCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetName_); } + if (targetNameCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, targetName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -405,6 +512,9 @@ public boolean equals(final java.lang.Object obj) { case 3: if (!getSqlResource().equals(other.getSqlResource())) return false; break; + case 5: + if (!getFullyQualifiedName().equals(other.getFullyQualifiedName())) return false; + break; case 0: default: } @@ -428,6 +538,10 @@ public int hashCode() { hash = (37 * hash) + SQL_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSqlResource().hashCode(); break; + case 5: + hash = (37 * hash) + FULLY_QUALIFIED_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullyQualifiedName().hashCode(); + break; case 0: default: } @@ -612,6 +726,9 @@ public com.google.cloud.datacatalog.v1.LookupEntryRequest buildPartial() { if (targetNameCase_ == 3) { result.targetName_ = targetName_; } + if (targetNameCase_ == 5) { + result.targetName_ = targetName_; + } result.targetNameCase_ = targetNameCase_; onBuilt(); return result; @@ -678,6 +795,13 @@ public Builder mergeFrom(com.google.cloud.datacatalog.v1.LookupEntryRequest othe onChanged(); break; } + case FULLY_QUALIFIED_NAME: + { + targetNameCase_ = 5; + targetName_ = other.targetName_; + onChanged(); + break; + } case TARGETNAME_NOT_SET: { break; @@ -908,7 +1032,7 @@ public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -931,7 +1055,7 @@ public boolean hasSqlResource() { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -967,7 +1091,7 @@ public java.lang.String getSqlResource() { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -1003,7 +1127,7 @@ public com.google.protobuf.ByteString getSqlResourceBytes() { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -1032,7 +1156,7 @@ public Builder setSqlResource(java.lang.String value) { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -1059,7 +1183,7 @@ public Builder clearSqlResource() { * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -1079,6 +1203,182 @@ public Builder setSqlResourceBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
    +     * Fully qualified name (FQN) of the resource.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +     * 
    + * + * string fully_qualified_name = 5; + * + * @return Whether the fullyQualifiedName field is set. + */ + @java.lang.Override + public boolean hasFullyQualifiedName() { + return targetNameCase_ == 5; + } + /** + * + * + *
    +     * Fully qualified name (FQN) of the resource.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +     * 
    + * + * string fully_qualified_name = 5; + * + * @return The fullyQualifiedName. + */ + @java.lang.Override + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = ""; + if (targetNameCase_ == 5) { + ref = targetName_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetNameCase_ == 5) { + targetName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Fully qualified name (FQN) of the resource.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +     * 
    + * + * string fully_qualified_name = 5; + * + * @return The bytes for fullyQualifiedName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = ""; + if (targetNameCase_ == 5) { + ref = targetName_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetNameCase_ == 5) { + targetName_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Fully qualified name (FQN) of the resource.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +     * 
    + * + * string fully_qualified_name = 5; + * + * @param value The fullyQualifiedName to set. + * @return This builder for chaining. + */ + public Builder setFullyQualifiedName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetNameCase_ = 5; + targetName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Fully qualified name (FQN) of the resource.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +     * 
    + * + * string fully_qualified_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearFullyQualifiedName() { + if (targetNameCase_ == 5) { + targetNameCase_ = 0; + targetName_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
    +     * Fully qualified name (FQN) of the resource.
    +     * FQNs take two forms:
    +     * * For non-regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * * For regionalized resources:
    +     *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +     * Example for a DPMS table:
    +     * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +     * 
    + * + * string fully_qualified_name = 5; + * + * @param value The bytes for fullyQualifiedName to set. + * @return This builder for chaining. + */ + public Builder setFullyQualifiedNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetNameCase_ = 5; + targetName_ = 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-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java index 1caaee2b..9bea4b0c 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java @@ -89,7 +89,7 @@ public interface LookupEntryRequestOrBuilder * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -109,7 +109,7 @@ public interface LookupEntryRequestOrBuilder * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -129,7 +129,7 @@ public interface LookupEntryRequestOrBuilder * * `bigquery.table.project_id.dataset_id.table_id` * * `bigquery.dataset.project_id.dataset_id` * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. + * `*_id`s should satisfy the standard SQL rules for identifiers. * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. *
    * @@ -139,5 +139,63 @@ public interface LookupEntryRequestOrBuilder */ com.google.protobuf.ByteString getSqlResourceBytes(); + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 5; + * + * @return Whether the fullyQualifiedName field is set. + */ + boolean hasFullyQualifiedName(); + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 5; + * + * @return The fullyQualifiedName. + */ + java.lang.String getFullyQualifiedName(); + /** + * + * + *
    +   * Fully qualified name (FQN) of the resource.
    +   * FQNs take two forms:
    +   * * For non-regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * * For regionalized resources:
    +   *   `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
    +   * Example for a DPMS table:
    +   * `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id`
    +   * 
    + * + * string fully_qualified_name = 5; + * + * @return The bytes for fullyQualifiedName. + */ + com.google.protobuf.ByteString getFullyQualifiedNameBytes(); + public com.google.cloud.datacatalog.v1.LookupEntryRequest.TargetNameCase getTargetNameCase(); } diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTag.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTag.java new file mode 100644 index 00000000..145bc681 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTag.java @@ -0,0 +1,1576 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Denotes one policy tag in a taxonomy (e.g. ssn). Policy tags can be defined
    + * in a hierarchy. For example, consider the following hierarchy:
    + * + Geolocation
    + *   + LatLong
    + *   + City
    + *   + ZipCode
    + * Policy tag "Geolocation" contains 3 child policy tags: "LatLong", "City", and
    + * "ZipCode".
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.PolicyTag} + */ +public final class PolicyTag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.PolicyTag) + PolicyTagOrBuilder { + private static final long serialVersionUID = 0L; + // Use PolicyTag.newBuilder() to construct. + private PolicyTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyTag() { + name_ = ""; + displayName_ = ""; + description_ = ""; + parentPolicyTag_ = ""; + childPolicyTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PolicyTag(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PolicyTag( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + parentPolicyTag_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + childPolicyTags_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = childPolicyTags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_PolicyTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_PolicyTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.PolicyTag.class, + com.google.cloud.datacatalog.v1.PolicyTag.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Output only. Resource name of this policy tag in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +   * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +   * Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Output only. Resource name of this policy tag in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +   * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +   * Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
    +   * Required. User-defined name of this policy tag. It must: be unique within the parent
    +   * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +   * spaces; not start or end with spaces; and be at most 200 bytes long when
    +   * encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. User-defined name of this policy tag. It must: be unique within the parent
    +   * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +   * spaces; not start or end with spaces; and be at most 200 bytes long when
    +   * encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
    +   * Description of this policy tag. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
    +   * Description of this policy tag. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_POLICY_TAG_FIELD_NUMBER = 4; + private volatile java.lang.Object parentPolicyTag_; + /** + * + * + *
    +   * Resource name of this policy tag's parent policy tag (e.g. for the
    +   * "LatLong" policy tag in the example above, this field contains the
    +   * resource name of the "Geolocation" policy tag). If empty, it means this
    +   * policy tag is a top level policy tag (e.g. this field is empty for the
    +   * "Geolocation" policy tag in the example above). If not set, defaults to an
    +   * empty string.
    +   * 
    + * + * string parent_policy_tag = 4; + * + * @return The parentPolicyTag. + */ + @java.lang.Override + public java.lang.String getParentPolicyTag() { + java.lang.Object ref = parentPolicyTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentPolicyTag_ = s; + return s; + } + } + /** + * + * + *
    +   * Resource name of this policy tag's parent policy tag (e.g. for the
    +   * "LatLong" policy tag in the example above, this field contains the
    +   * resource name of the "Geolocation" policy tag). If empty, it means this
    +   * policy tag is a top level policy tag (e.g. this field is empty for the
    +   * "Geolocation" policy tag in the example above). If not set, defaults to an
    +   * empty string.
    +   * 
    + * + * string parent_policy_tag = 4; + * + * @return The bytes for parentPolicyTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentPolicyTagBytes() { + java.lang.Object ref = parentPolicyTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentPolicyTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHILD_POLICY_TAGS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList childPolicyTags_; + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the childPolicyTags. + */ + public com.google.protobuf.ProtocolStringList getChildPolicyTagsList() { + return childPolicyTags_; + } + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of childPolicyTags. + */ + public int getChildPolicyTagsCount() { + return childPolicyTags_.size(); + } + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The childPolicyTags at the given index. + */ + public java.lang.String getChildPolicyTags(int index) { + return childPolicyTags_.get(index); + } + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the childPolicyTags at the given index. + */ + public com.google.protobuf.ByteString getChildPolicyTagsBytes(int index) { + return childPolicyTags_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!getParentPolicyTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parentPolicyTag_); + } + for (int i = 0; i < childPolicyTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, childPolicyTags_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!getParentPolicyTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parentPolicyTag_); + } + { + int dataSize = 0; + for (int i = 0; i < childPolicyTags_.size(); i++) { + dataSize += computeStringSizeNoTag(childPolicyTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getChildPolicyTagsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.PolicyTag)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.PolicyTag other = + (com.google.cloud.datacatalog.v1.PolicyTag) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getParentPolicyTag().equals(other.getParentPolicyTag())) return false; + if (!getChildPolicyTagsList().equals(other.getChildPolicyTagsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PARENT_POLICY_TAG_FIELD_NUMBER; + hash = (53 * hash) + getParentPolicyTag().hashCode(); + if (getChildPolicyTagsCount() > 0) { + hash = (37 * hash) + CHILD_POLICY_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getChildPolicyTagsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.PolicyTag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Denotes one policy tag in a taxonomy (e.g. ssn). Policy tags can be defined
    +   * in a hierarchy. For example, consider the following hierarchy:
    +   * + Geolocation
    +   *   + LatLong
    +   *   + City
    +   *   + ZipCode
    +   * Policy tag "Geolocation" contains 3 child policy tags: "LatLong", "City", and
    +   * "ZipCode".
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.PolicyTag} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.PolicyTag) + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_PolicyTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_PolicyTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.PolicyTag.class, + com.google.cloud.datacatalog.v1.PolicyTag.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.PolicyTag.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + parentPolicyTag_ = ""; + + childPolicyTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_PolicyTag_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTag getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTag build() { + com.google.cloud.datacatalog.v1.PolicyTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTag buildPartial() { + com.google.cloud.datacatalog.v1.PolicyTag result = + new com.google.cloud.datacatalog.v1.PolicyTag(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.parentPolicyTag_ = parentPolicyTag_; + if (((bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = childPolicyTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.childPolicyTags_ = childPolicyTags_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.PolicyTag) { + return mergeFrom((com.google.cloud.datacatalog.v1.PolicyTag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.PolicyTag other) { + if (other == com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getParentPolicyTag().isEmpty()) { + parentPolicyTag_ = other.parentPolicyTag_; + onChanged(); + } + if (!other.childPolicyTags_.isEmpty()) { + if (childPolicyTags_.isEmpty()) { + childPolicyTags_ = other.childPolicyTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.addAll(other.childPolicyTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.PolicyTag parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.PolicyTag) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Output only. Resource name of this policy tag in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +     * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +     * Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Output only. Resource name of this policy tag in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +     * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +     * Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Output only. Resource name of this policy tag in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +     * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +     * Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource name of this policy tag in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +     * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +     * Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource name of this policy tag in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +     * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +     * Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
    +     * Required. User-defined name of this policy tag. It must: be unique within the parent
    +     * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +     * spaces; not start or end with spaces; and be at most 200 bytes long when
    +     * encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. User-defined name of this policy tag. It must: be unique within the parent
    +     * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +     * spaces; not start or end with spaces; and be at most 200 bytes long when
    +     * encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. User-defined name of this policy tag. It must: be unique within the parent
    +     * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +     * spaces; not start or end with spaces; and be at most 200 bytes long when
    +     * encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. User-defined name of this policy tag. It must: be unique within the parent
    +     * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +     * spaces; not start or end with spaces; and be at most 200 bytes long when
    +     * encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. User-defined name of this policy tag. It must: be unique within the parent
    +     * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +     * spaces; not start or end with spaces; and be at most 200 bytes long when
    +     * encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
    +     * Description of this policy tag. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Description of this policy tag. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Description of this policy tag. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Description of this policy tag. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Description of this policy tag. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object parentPolicyTag_ = ""; + /** + * + * + *
    +     * Resource name of this policy tag's parent policy tag (e.g. for the
    +     * "LatLong" policy tag in the example above, this field contains the
    +     * resource name of the "Geolocation" policy tag). If empty, it means this
    +     * policy tag is a top level policy tag (e.g. this field is empty for the
    +     * "Geolocation" policy tag in the example above). If not set, defaults to an
    +     * empty string.
    +     * 
    + * + * string parent_policy_tag = 4; + * + * @return The parentPolicyTag. + */ + public java.lang.String getParentPolicyTag() { + java.lang.Object ref = parentPolicyTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentPolicyTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Resource name of this policy tag's parent policy tag (e.g. for the
    +     * "LatLong" policy tag in the example above, this field contains the
    +     * resource name of the "Geolocation" policy tag). If empty, it means this
    +     * policy tag is a top level policy tag (e.g. this field is empty for the
    +     * "Geolocation" policy tag in the example above). If not set, defaults to an
    +     * empty string.
    +     * 
    + * + * string parent_policy_tag = 4; + * + * @return The bytes for parentPolicyTag. + */ + public com.google.protobuf.ByteString getParentPolicyTagBytes() { + java.lang.Object ref = parentPolicyTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentPolicyTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Resource name of this policy tag's parent policy tag (e.g. for the
    +     * "LatLong" policy tag in the example above, this field contains the
    +     * resource name of the "Geolocation" policy tag). If empty, it means this
    +     * policy tag is a top level policy tag (e.g. this field is empty for the
    +     * "Geolocation" policy tag in the example above). If not set, defaults to an
    +     * empty string.
    +     * 
    + * + * string parent_policy_tag = 4; + * + * @param value The parentPolicyTag to set. + * @return This builder for chaining. + */ + public Builder setParentPolicyTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parentPolicyTag_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Resource name of this policy tag's parent policy tag (e.g. for the
    +     * "LatLong" policy tag in the example above, this field contains the
    +     * resource name of the "Geolocation" policy tag). If empty, it means this
    +     * policy tag is a top level policy tag (e.g. this field is empty for the
    +     * "Geolocation" policy tag in the example above). If not set, defaults to an
    +     * empty string.
    +     * 
    + * + * string parent_policy_tag = 4; + * + * @return This builder for chaining. + */ + public Builder clearParentPolicyTag() { + + parentPolicyTag_ = getDefaultInstance().getParentPolicyTag(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Resource name of this policy tag's parent policy tag (e.g. for the
    +     * "LatLong" policy tag in the example above, this field contains the
    +     * resource name of the "Geolocation" policy tag). If empty, it means this
    +     * policy tag is a top level policy tag (e.g. this field is empty for the
    +     * "Geolocation" policy tag in the example above). If not set, defaults to an
    +     * empty string.
    +     * 
    + * + * string parent_policy_tag = 4; + * + * @param value The bytes for parentPolicyTag to set. + * @return This builder for chaining. + */ + public Builder setParentPolicyTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parentPolicyTag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList childPolicyTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureChildPolicyTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = new com.google.protobuf.LazyStringArrayList(childPolicyTags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the childPolicyTags. + */ + public com.google.protobuf.ProtocolStringList getChildPolicyTagsList() { + return childPolicyTags_.getUnmodifiableView(); + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of childPolicyTags. + */ + public int getChildPolicyTagsCount() { + return childPolicyTags_.size(); + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The childPolicyTags at the given index. + */ + public java.lang.String getChildPolicyTags(int index) { + return childPolicyTags_.get(index); + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the childPolicyTags at the given index. + */ + public com.google.protobuf.ByteString getChildPolicyTagsBytes(int index) { + return childPolicyTags_.getByteString(index); + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The childPolicyTags to set. + * @return This builder for chaining. + */ + public Builder setChildPolicyTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The childPolicyTags to add. + * @return This builder for chaining. + */ + public Builder addChildPolicyTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The childPolicyTags to add. + * @return This builder for chaining. + */ + public Builder addAllChildPolicyTags(java.lang.Iterable values) { + ensureChildPolicyTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, childPolicyTags_); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearChildPolicyTags() { + childPolicyTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource names of child policy tags of this policy tag.
    +     * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the childPolicyTags to add. + * @return This builder for chaining. + */ + public Builder addChildPolicyTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.PolicyTag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.PolicyTag) + private static final com.google.cloud.datacatalog.v1.PolicyTag DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.PolicyTag(); + } + + public static com.google.cloud.datacatalog.v1.PolicyTag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PolicyTag(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerProto.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerProto.java new file mode 100644 index 00000000..f298b647 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerProto.java @@ -0,0 +1,387 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public final class PolicyTagManagerProto { + private PolicyTagManagerProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_Taxonomy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_Taxonomy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_PolicyTag_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_PolicyTag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/datacatalog/v1/policytagm" + + "anager.proto\022\033google.cloud.datacatalog.v" + + "1\032\034google/api/annotations.proto\032\027google/" + + "api/client.proto\032\037google/api/field_behav" + + "ior.proto\032\031google/api/resource.proto\032,go" + + "ogle/cloud/datacatalog/v1/timestamps.pro" + + "to\032\036google/iam/v1/iam_policy.proto\032\032goog" + + "le/iam/v1/policy.proto\032\033google/protobuf/" + + "empty.proto\032 google/protobuf/field_mask." + + "proto\"\316\003\n\010Taxonomy\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022\030\n\013description\030" + + "\003 \001(\tB\003\340A\001\022\035\n\020policy_tag_count\030\004 \001(\005B\003\340A" + + "\003\022O\n\023taxonomy_timestamps\030\005 \001(\0132-.google." + + "cloud.datacatalog.v1.SystemTimestampsB\003\340" + + "A\003\022U\n\026activated_policy_types\030\006 \003(\01620.goo" + + "gle.cloud.datacatalog.v1.Taxonomy.Policy" + + "TypeB\003\340A\001\"J\n\nPolicyType\022\033\n\027POLICY_TYPE_U" + + "NSPECIFIED\020\000\022\037\n\033FINE_GRAINED_ACCESS_CONT" + + "ROL\020\001:g\352Ad\n#datacatalog.googleapis.com/T" + + "axonomy\022=projects/{project}/locations/{l" + + "ocation}/taxonomies/{taxonomy}\"\214\002\n\tPolic" + + "yTag\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_name\030" + + "\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t\022\031\n\021paren" + + "t_policy_tag\030\004 \001(\t\022\036\n\021child_policy_tags\030" + + "\005 \003(\tB\003\340A\003:\200\001\352A}\n$datacatalog.googleapis" + + ".com/PolicyTag\022Uprojects/{project}/locat" + + "ions/{location}/taxonomies/{taxonomy}/po" + + "licyTags/{policy_tag}\"\215\001\n\025CreateTaxonomy" + + "Request\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#datacat" + + "alog.googleapis.com/Taxonomy\0227\n\010taxonomy" + + "\030\002 \001(\0132%.google.cloud.datacatalog.v1.Tax" + + "onomy\"R\n\025DeleteTaxonomyRequest\0229\n\004name\030\001" + + " \001(\tB+\340A\002\372A%\n#datacatalog.googleapis.com" + + "/Taxonomy\"\201\001\n\025UpdateTaxonomyRequest\0227\n\010t" + + "axonomy\030\001 \001(\0132%.google.cloud.datacatalog" + + ".v1.Taxonomy\022/\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMask\"{\n\025ListTaxonomiesR" + + "equest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#datacata" + + "log.googleapis.com/Taxonomy\022\021\n\tpage_size" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"l\n\026ListTaxono" + + "miesResponse\0229\n\ntaxonomies\030\001 \003(\0132%.googl" + + "e.cloud.datacatalog.v1.Taxonomy\022\027\n\017next_" + + "page_token\030\002 \001(\t\"O\n\022GetTaxonomyRequest\0229" + + "\n\004name\030\001 \001(\tB+\340A\002\372A%\n#datacatalog.google" + + "apis.com/Taxonomy\"\222\001\n\026CreatePolicyTagReq" + + "uest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$datacatalo" + + "g.googleapis.com/PolicyTag\022:\n\npolicy_tag" + + "\030\002 \001(\0132&.google.cloud.datacatalog.v1.Pol" + + "icyTag\"T\n\026DeletePolicyTagRequest\022:\n\004name" + + "\030\001 \001(\tB,\340A\002\372A&\n$datacatalog.googleapis.c" + + "om/PolicyTag\"\205\001\n\026UpdatePolicyTagRequest\022" + + ":\n\npolicy_tag\030\001 \001(\0132&.google.cloud.datac" + + "atalog.v1.PolicyTag\022/\n\013update_mask\030\002 \001(\013" + + "2\032.google.protobuf.FieldMask\"|\n\025ListPoli" + + "cyTagsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$d" + + "atacatalog.googleapis.com/PolicyTag\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"n\n\026Li" + + "stPolicyTagsResponse\022;\n\013policy_tags\030\001 \003(" + + "\0132&.google.cloud.datacatalog.v1.PolicyTa" + + "g\022\027\n\017next_page_token\030\002 \001(\t\"Q\n\023GetPolicyT" + + "agRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$datacat" + + "alog.googleapis.com/PolicyTag2\273\025\n\020Policy" + + "TagManager\022\277\001\n\016CreateTaxonomy\0222.google.c" + + "loud.datacatalog.v1.CreateTaxonomyReques" + + "t\032%.google.cloud.datacatalog.v1.Taxonomy" + + "\"R\202\323\344\223\002:\"./v1/{parent=projects/*/locatio" + + "ns/*}/taxonomies:\010taxonomy\332A\017parent,taxo" + + "nomy\022\233\001\n\016DeleteTaxonomy\0222.google.cloud.d" + + "atacatalog.v1.DeleteTaxonomyRequest\032\026.go" + + "ogle.protobuf.Empty\"=\202\323\344\223\0020*./v1/{name=p" + + "rojects/*/locations/*/taxonomies/*}\332A\004na" + + "me\022\301\001\n\016UpdateTaxonomy\0222.google.cloud.dat" + + "acatalog.v1.UpdateTaxonomyRequest\032%.goog" + + "le.cloud.datacatalog.v1.Taxonomy\"T\202\323\344\223\002C" + + "27/v1/{taxonomy.name=projects/*/location" + + "s/*/taxonomies/*}:\010taxonomy\332A\010taxonomy\022\272" + + "\001\n\016ListTaxonomies\0222.google.cloud.datacat" + + "alog.v1.ListTaxonomiesRequest\0323.google.c" + + "loud.datacatalog.v1.ListTaxonomiesRespon" + + "se\"?\202\323\344\223\0020\022./v1/{parent=projects/*/locat" + + "ions/*}/taxonomies\332A\006parent\022\244\001\n\013GetTaxon" + + "omy\022/.google.cloud.datacatalog.v1.GetTax" + + "onomyRequest\032%.google.cloud.datacatalog." + + "v1.Taxonomy\"=\202\323\344\223\0020\022./v1/{name=projects/" + + "*/locations/*/taxonomies/*}\332A\004name\022\323\001\n\017C" + + "reatePolicyTag\0223.google.cloud.datacatalo" + + "g.v1.CreatePolicyTagRequest\032&.google.clo" + + "ud.datacatalog.v1.PolicyTag\"c\202\323\344\223\002I\";/v1" + + "/{parent=projects/*/locations/*/taxonomi" + + "es/*}/policyTags:\npolicy_tag\332A\021parent,po" + + "licy_tag\022\252\001\n\017DeletePolicyTag\0223.google.cl" + + "oud.datacatalog.v1.DeletePolicyTagReques" + + "t\032\026.google.protobuf.Empty\"J\202\323\344\223\002=*;/v1/{" + + "name=projects/*/locations/*/taxonomies/*" + + "/policyTags/*}\332A\004name\022\327\001\n\017UpdatePolicyTa" + + "g\0223.google.cloud.datacatalog.v1.UpdatePo" + + "licyTagRequest\032&.google.cloud.datacatalo" + + "g.v1.PolicyTag\"g\202\323\344\223\002T2F/v1/{policy_tag." + + "name=projects/*/locations/*/taxonomies/*" + + "/policyTags/*}:\npolicy_tag\332A\npolicy_tag\022" + + "\307\001\n\016ListPolicyTags\0222.google.cloud.dataca" + + "talog.v1.ListPolicyTagsRequest\0323.google." + + "cloud.datacatalog.v1.ListPolicyTagsRespo" + + "nse\"L\202\323\344\223\002=\022;/v1/{parent=projects/*/loca" + + "tions/*/taxonomies/*}/policyTags\332A\006paren" + + "t\022\264\001\n\014GetPolicyTag\0220.google.cloud.dataca" + + "talog.v1.GetPolicyTagRequest\032&.google.cl" + + "oud.datacatalog.v1.PolicyTag\"J\202\323\344\223\002=\022;/v" + + "1/{name=projects/*/locations/*/taxonomie" + + "s/*/policyTags/*}\332A\004name\022\352\001\n\014GetIamPolic" + + "y\022\".google.iam.v1.GetIamPolicyRequest\032\025." + + "google.iam.v1.Policy\"\236\001\202\323\344\223\002\227\001\"?/v1/{res" + + "ource=projects/*/locations/*/taxonomies/" + + "*}:getIamPolicy:\001*ZQ\"L/v1/{resource=proj" + + "ects/*/locations/*/taxonomies/*/policyTa" + + "gs/*}:getIamPolicy:\001*\022\352\001\n\014SetIamPolicy\022\"" + + ".google.iam.v1.SetIamPolicyRequest\032\025.goo" + + "gle.iam.v1.Policy\"\236\001\202\323\344\223\002\227\001\"?/v1/{resour" + + "ce=projects/*/locations/*/taxonomies/*}:" + + "setIamPolicy:\001*ZQ\"L/v1/{resource=project" + + "s/*/locations/*/taxonomies/*/policyTags/" + + "*}:setIamPolicy:\001*\022\226\002\n\022TestIamPermission" + + "s\022(.google.iam.v1.TestIamPermissionsRequ" + + "est\032).google.iam.v1.TestIamPermissionsRe" + + "sponse\"\252\001\202\323\344\223\002\243\001\"E/v1/{resource=projects" + + "/*/locations/*/taxonomies/*}:testIamPerm" + + "issions:\001*ZW\"R/v1/{resource=projects/*/l" + + "ocations/*/taxonomies/*/policyTags/*}:te" + + "stIamPermissions:\001*\032N\312A\032datacatalog.goog" + + "leapis.com\322A.https://www.googleapis.com/" + + "auth/cloud-platformB\342\001\n\037com.google.cloud" + + ".datacatalog.v1B\025PolicyTagManagerProtoP\001" + + "ZFgoogle.golang.org/genproto/googleapis/" + + "cloud/datacatalog/v1;datacatalog\370\001\001\252\002\033Go" + + "ogle.Cloud.DataCatalog.V1\312\002\033Google\\Cloud" + + "\\DataCatalog\\V1\352\002\036Google::Cloud::DataCat" + + "alog::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.datacatalog.v1.Timestamps.getDescriptor(), + com.google.iam.v1.IamPolicyProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_Taxonomy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_Taxonomy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_Taxonomy_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "PolicyTagCount", + "TaxonomyTimestamps", + "ActivatedPolicyTypes", + }); + internal_static_google_cloud_datacatalog_v1_PolicyTag_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1_PolicyTag_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_PolicyTag_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "ParentPolicyTag", "ChildPolicyTags", + }); + internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CreateTaxonomyRequest_descriptor, + new java.lang.String[] { + "Parent", "Taxonomy", + }); + internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DeleteTaxonomyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_descriptor, + new java.lang.String[] { + "Taxonomy", "UpdateMask", + }); + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListTaxonomiesResponse_descriptor, + new java.lang.String[] { + "Taxonomies", "NextPageToken", + }); + internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_GetTaxonomyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CreatePolicyTagRequest_descriptor, + new java.lang.String[] { + "Parent", "PolicyTag", + }); + internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_DeletePolicyTagRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_descriptor, + new java.lang.String[] { + "PolicyTag", "UpdateMask", + }); + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ListPolicyTagsResponse_descriptor, + new java.lang.String[] { + "PolicyTags", "NextPageToken", + }); + internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_GetPolicyTagRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + 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.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.datacatalog.v1.Timestamps.getDescriptor(); + com.google.iam.v1.IamPolicyProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationProto.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationProto.java new file mode 100644 index 00000000..4c0d37e0 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationProto.java @@ -0,0 +1,222 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public final class PolicyTagManagerSerializationProto { + private PolicyTagManagerSerializationProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_InlineSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_InlineSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n?google/cloud/datacatalog/v1/policytagm" + + "anagerserialization.proto\022\033google.cloud." + + "datacatalog.v1\032\034google/api/annotations.p" + + "roto\032\037google/api/field_behavior.proto\032\031g" + + "oogle/api/resource.proto\0322google/cloud/d" + + "atacatalog/v1/policytagmanager.proto\032\032go" + + "ogle/iam/v1/policy.proto\032\027google/api/cli" + + "ent.proto\"\335\001\n\022SerializedTaxonomy\022\031\n\014disp" + + "lay_name\030\001 \001(\tB\003\340A\002\022\023\n\013description\030\002 \001(\t" + + "\022E\n\013policy_tags\030\003 \003(\01320.google.cloud.dat" + + "acatalog.v1.SerializedPolicyTag\022P\n\026activ" + + "ated_policy_types\030\004 \003(\01620.google.cloud.d" + + "atacatalog.v1.Taxonomy.PolicyType\"\246\001\n\023Se" + + "rializedPolicyTag\022\022\n\npolicy_tag\030\001 \001(\t\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030" + + "\003 \001(\t\022K\n\021child_policy_tags\030\004 \003(\01320.googl" + + "e.cloud.datacatalog.v1.SerializedPolicyT" + + "ag\"\367\001\n\027ImportTaxonomiesRequest\022;\n\006parent" + + "\030\001 \001(\tB+\340A\002\372A%\022#datacatalog.googleapis.c" + + "om/Taxonomy\022B\n\rinline_source\030\002 \001(\0132).goo" + + "gle.cloud.datacatalog.v1.InlineSourceH\000\022" + + "Q\n\025cross_regional_source\030\003 \001(\01320.google." + + "cloud.datacatalog.v1.CrossRegionalSource" + + "H\000B\010\n\006source\"X\n\014InlineSource\022H\n\ntaxonomi" + + "es\030\001 \003(\0132/.google.cloud.datacatalog.v1.S" + + "erializedTaxonomyB\003\340A\002\"T\n\023CrossRegionalS" + + "ource\022=\n\010taxonomy\030\001 \001(\tB+\340A\002\372A%\n#datacat" + + "alog.googleapis.com/Taxonomy\"U\n\030ImportTa" + + "xonomiesResponse\0229\n\ntaxonomies\030\001 \003(\0132%.g" + + "oogle.cloud.datacatalog.v1.Taxonomy\"\307\001\n\027" + + "ExportTaxonomiesRequest\022;\n\006parent\030\001 \001(\tB" + + "+\340A\002\372A%\022#datacatalog.googleapis.com/Taxo" + + "nomy\022?\n\ntaxonomies\030\002 \003(\tB+\340A\002\372A%\n#dataca" + + "talog.googleapis.com/Taxonomy\022\037\n\025seriali" + + "zed_taxonomies\030\003 \001(\010H\000B\r\n\013destination\"_\n" + + "\030ExportTaxonomiesResponse\022C\n\ntaxonomies\030" + + "\001 \003(\0132/.google.cloud.datacatalog.v1.Seri" + + "alizedTaxonomy2\364\003\n\035PolicyTagManagerSeria" + + "lization\022\301\001\n\020ImportTaxonomies\0224.google.c" + + "loud.datacatalog.v1.ImportTaxonomiesRequ" + + "est\0325.google.cloud.datacatalog.v1.Import" + + "TaxonomiesResponse\"@\202\323\344\223\002:\"5/v1/{parent=" + + "projects/*/locations/*}/taxonomies:impor" + + "t:\001*\022\276\001\n\020ExportTaxonomies\0224.google.cloud" + + ".datacatalog.v1.ExportTaxonomiesRequest\032" + + "5.google.cloud.datacatalog.v1.ExportTaxo" + + "nomiesResponse\"=\202\323\344\223\0027\0225/v1/{parent=proj" + + "ects/*/locations/*}/taxonomies:export\032N\312" + + "A\032datacatalog.googleapis.com\322A.https://w" + + "ww.googleapis.com/auth/cloud-platformB\357\001" + + "\n\037com.google.cloud.datacatalog.v1B\"Polic" + + "yTagManagerSerializationProtoP\001ZFgoogle." + + "golang.org/genproto/googleapis/cloud/dat" + + "acatalog/v1;datacatalog\370\001\001\252\002\033Google.Clou" + + "d.DataCatalog.V1\312\002\033Google\\Cloud\\DataCata" + + "log\\V1\352\002\036Google::Cloud::DataCatalog::V1b" + + "\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.datacatalog.v1.PolicyTagManagerProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + }); + internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_descriptor, + new java.lang.String[] { + "DisplayName", "Description", "PolicyTags", "ActivatedPolicyTypes", + }); + internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_descriptor, + new java.lang.String[] { + "PolicyTag", "DisplayName", "Description", "ChildPolicyTags", + }); + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesRequest_descriptor, + new java.lang.String[] { + "Parent", "InlineSource", "CrossRegionalSource", "Source", + }); + internal_static_google_cloud_datacatalog_v1_InlineSource_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datacatalog_v1_InlineSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_InlineSource_descriptor, + new java.lang.String[] { + "Taxonomies", + }); + internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_CrossRegionalSource_descriptor, + new java.lang.String[] { + "Taxonomy", + }); + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ImportTaxonomiesResponse_descriptor, + new java.lang.String[] { + "Taxonomies", + }); + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesRequest_descriptor, + new java.lang.String[] { + "Parent", "Taxonomies", "SerializedTaxonomies", "Destination", + }); + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datacatalog_v1_ExportTaxonomiesResponse_descriptor, + new java.lang.String[] { + "Taxonomies", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.datacatalog.v1.PolicyTagManagerProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagName.java new file mode 100644 index 00000000..4f1c1fc3 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagName.java @@ -0,0 +1,261 @@ +/* + * 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.datacatalog.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 PolicyTagName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_TAXONOMY_POLICY_TAG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String taxonomy; + private final String policyTag; + + @Deprecated + protected PolicyTagName() { + project = null; + location = null; + taxonomy = null; + policyTag = null; + } + + private PolicyTagName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + taxonomy = Preconditions.checkNotNull(builder.getTaxonomy()); + policyTag = Preconditions.checkNotNull(builder.getPolicyTag()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTaxonomy() { + return taxonomy; + } + + public String getPolicyTag() { + return policyTag; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PolicyTagName of( + String project, String location, String taxonomy, String policyTag) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTaxonomy(taxonomy) + .setPolicyTag(policyTag) + .build(); + } + + public static String format(String project, String location, String taxonomy, String policyTag) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTaxonomy(taxonomy) + .setPolicyTag(policyTag) + .build() + .toString(); + } + + public static PolicyTagName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TAXONOMY_POLICY_TAG.validatedMatch( + formattedString, "PolicyTagName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("taxonomy"), + matchMap.get("policy_tag")); + } + + 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 (PolicyTagName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TAXONOMY_POLICY_TAG.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 (taxonomy != null) { + fieldMapBuilder.put("taxonomy", taxonomy); + } + if (policyTag != null) { + fieldMapBuilder.put("policy_tag", policyTag); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TAXONOMY_POLICY_TAG.instantiate( + "project", project, "location", location, "taxonomy", taxonomy, "policy_tag", policyTag); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PolicyTagName that = ((PolicyTagName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.taxonomy, that.taxonomy) + && Objects.equals(this.policyTag, that.policyTag); + } + 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(taxonomy); + h *= 1000003; + h ^= Objects.hashCode(policyTag); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}. + */ + public static class Builder { + private String project; + private String location; + private String taxonomy; + private String policyTag; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTaxonomy() { + return taxonomy; + } + + public String getPolicyTag() { + return policyTag; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTaxonomy(String taxonomy) { + this.taxonomy = taxonomy; + return this; + } + + public Builder setPolicyTag(String policyTag) { + this.policyTag = policyTag; + return this; + } + + private Builder(PolicyTagName policyTagName) { + project = policyTagName.project; + location = policyTagName.location; + taxonomy = policyTagName.taxonomy; + policyTag = policyTagName.policyTag; + } + + public PolicyTagName build() { + return new PolicyTagName(this); + } + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagOrBuilder.java new file mode 100644 index 00000000..1dde5542 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagOrBuilder.java @@ -0,0 +1,208 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface PolicyTagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.PolicyTag) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Output only. Resource name of this policy tag in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +   * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +   * Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Output only. Resource name of this policy tag in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}".
    +   * Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag
    +   * Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * Required. User-defined name of this policy tag. It must: be unique within the parent
    +   * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +   * spaces; not start or end with spaces; and be at most 200 bytes long when
    +   * encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
    +   * Required. User-defined name of this policy tag. It must: be unique within the parent
    +   * taxonomy; contain only unicode letters, numbers, underscores, dashes and
    +   * spaces; not start or end with spaces; and be at most 200 bytes long when
    +   * encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +   * Description of this policy tag. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
    +   * Description of this policy tag. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
    +   * Resource name of this policy tag's parent policy tag (e.g. for the
    +   * "LatLong" policy tag in the example above, this field contains the
    +   * resource name of the "Geolocation" policy tag). If empty, it means this
    +   * policy tag is a top level policy tag (e.g. this field is empty for the
    +   * "Geolocation" policy tag in the example above). If not set, defaults to an
    +   * empty string.
    +   * 
    + * + * string parent_policy_tag = 4; + * + * @return The parentPolicyTag. + */ + java.lang.String getParentPolicyTag(); + /** + * + * + *
    +   * Resource name of this policy tag's parent policy tag (e.g. for the
    +   * "LatLong" policy tag in the example above, this field contains the
    +   * resource name of the "Geolocation" policy tag). If empty, it means this
    +   * policy tag is a top level policy tag (e.g. this field is empty for the
    +   * "Geolocation" policy tag in the example above). If not set, defaults to an
    +   * empty string.
    +   * 
    + * + * string parent_policy_tag = 4; + * + * @return The bytes for parentPolicyTag. + */ + com.google.protobuf.ByteString getParentPolicyTagBytes(); + + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the childPolicyTags. + */ + java.util.List getChildPolicyTagsList(); + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of childPolicyTags. + */ + int getChildPolicyTagsCount(); + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The childPolicyTags at the given index. + */ + java.lang.String getChildPolicyTags(int index); + /** + * + * + *
    +   * Output only. Resource names of child policy tags of this policy tag.
    +   * 
    + * + * repeated string child_policy_tags = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the childPolicyTags at the given index. + */ + com.google.protobuf.ByteString getChildPolicyTagsBytes(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequest.java new file mode 100644 index 00000000..685b9c84 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequest.java @@ -0,0 +1,858 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest} + */ +public final class RenameTagTemplateFieldEnumValueRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) + RenameTagTemplateFieldEnumValueRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RenameTagTemplateFieldEnumValueRequest.newBuilder() to construct. + private RenameTagTemplateFieldEnumValueRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RenameTagTemplateFieldEnumValueRequest() { + name_ = ""; + newEnumValueDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RenameTagTemplateFieldEnumValueRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RenameTagTemplateFieldEnumValueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + newEnumValueDisplayName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.class, + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Required. The name of the enum field value. Example:
    +   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The name of the enum field value. Example:
    +   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEW_ENUM_VALUE_DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object newEnumValueDisplayName_; + /** + * + * + *
    +   * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +   * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newEnumValueDisplayName. + */ + @java.lang.Override + public java.lang.String getNewEnumValueDisplayName() { + java.lang.Object ref = newEnumValueDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newEnumValueDisplayName_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +   * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for newEnumValueDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNewEnumValueDisplayNameBytes() { + java.lang.Object ref = newEnumValueDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newEnumValueDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getNewEnumValueDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, newEnumValueDisplayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getNewEnumValueDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, newEnumValueDisplayName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest other = + (com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getNewEnumValueDisplayName().equals(other.getNewEnumValueDisplayName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + NEW_ENUM_VALUE_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNewEnumValueDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.class, + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + newEnumValueDisplayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.Datacatalog + .internal_static_google_cloud_datacatalog_v1_RenameTagTemplateFieldEnumValueRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest build() { + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest buildPartial() { + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest result = + new com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest(this); + result.name_ = name_; + result.newEnumValueDisplayName_ = newEnumValueDisplayName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) { + return mergeFrom( + (com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest other) { + if (other + == com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getNewEnumValueDisplayName().isEmpty()) { + newEnumValueDisplayName_ = other.newEnumValueDisplayName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Required. The name of the enum field value. Example:
    +     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The name of the enum field value. Example:
    +     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The name of the enum field value. Example:
    +     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The name of the enum field value. Example:
    +     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +     * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The name of the enum field value. Example:
    +     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +     * 
    + * + * + * 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. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object newEnumValueDisplayName_ = ""; + /** + * + * + *
    +     * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +     * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The newEnumValueDisplayName. + */ + public java.lang.String getNewEnumValueDisplayName() { + java.lang.Object ref = newEnumValueDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newEnumValueDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +     * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for newEnumValueDisplayName. + */ + public com.google.protobuf.ByteString getNewEnumValueDisplayNameBytes() { + java.lang.Object ref = newEnumValueDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newEnumValueDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +     * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The newEnumValueDisplayName to set. + * @return This builder for chaining. + */ + public Builder setNewEnumValueDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + newEnumValueDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +     * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearNewEnumValueDisplayName() { + + newEnumValueDisplayName_ = getDefaultInstance().getNewEnumValueDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +     * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for newEnumValueDisplayName to set. + * @return This builder for chaining. + */ + public Builder setNewEnumValueDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + newEnumValueDisplayName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) + private static final com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest(); + } + + public static com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RenameTagTemplateFieldEnumValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RenameTagTemplateFieldEnumValueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequestOrBuilder.java new file mode 100644 index 00000000..d9b051f6 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequestOrBuilder.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/datacatalog.proto + +package com.google.cloud.datacatalog.v1; + +public interface RenameTagTemplateFieldEnumValueRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The name of the enum field value. Example:
    +   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Required. The name of the enum field value. Example:
    +   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    +   * 
    + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +   * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newEnumValueDisplayName. + */ + java.lang.String getNewEnumValueDisplayName(); + /** + * + * + *
    +   * Required. The new display name of the enum value. For example, `my_new_enum_value`.
    +   * 
    + * + * string new_enum_value_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for newEnumValueDisplayName. + */ + com.google.protobuf.ByteString getNewEnumValueDisplayNameBytes(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java index 70a9224a..f5b214e0 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java @@ -181,8 +181,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
    -   * Required. The new ID of this tag template field. For example,
    -   * `my_new_field`.
    +   * Required. The new ID of this tag template field. For example, `my_new_field`.
        * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -205,8 +204,7 @@ public java.lang.String getNewTagTemplateFieldId() { * * *
    -   * Required. The new ID of this tag template field. For example,
    -   * `my_new_field`.
    +   * Required. The new ID of this tag template field. For example, `my_new_field`.
        * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -691,8 +689,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
    -     * Required. The new ID of this tag template field. For example,
    -     * `my_new_field`.
    +     * Required. The new ID of this tag template field. For example, `my_new_field`.
          * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -714,8 +711,7 @@ public java.lang.String getNewTagTemplateFieldId() { * * *
    -     * Required. The new ID of this tag template field. For example,
    -     * `my_new_field`.
    +     * Required. The new ID of this tag template field. For example, `my_new_field`.
          * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -737,8 +733,7 @@ public com.google.protobuf.ByteString getNewTagTemplateFieldIdBytes() { * * *
    -     * Required. The new ID of this tag template field. For example,
    -     * `my_new_field`.
    +     * Required. The new ID of this tag template field. For example, `my_new_field`.
          * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -759,8 +754,7 @@ public Builder setNewTagTemplateFieldId(java.lang.String value) { * * *
    -     * Required. The new ID of this tag template field. For example,
    -     * `my_new_field`.
    +     * Required. The new ID of this tag template field. For example, `my_new_field`.
          * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -777,8 +771,7 @@ public Builder clearNewTagTemplateFieldId() { * * *
    -     * Required. The new ID of this tag template field. For example,
    -     * `my_new_field`.
    +     * Required. The new ID of this tag template field. For example, `my_new_field`.
          * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java index ce17a6b2..ff360676 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java @@ -58,8 +58,7 @@ public interface RenameTagTemplateFieldRequestOrBuilder * * *
    -   * Required. The new ID of this tag template field. For example,
    -   * `my_new_field`.
    +   * Required. The new ID of this tag template field. For example, `my_new_field`.
        * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -71,8 +70,7 @@ public interface RenameTagTemplateFieldRequestOrBuilder * * *
    -   * Required. The new ID of this tag template field. For example,
    -   * `my_new_field`.
    +   * Required. The new ID of this tag template field. For example, `my_new_field`.
        * 
    * * string new_tag_template_field_id = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java index 6152f63a..293f5565 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java @@ -125,13 +125,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ @java.lang.Override public java.util.List getColumnsList() { @@ -141,13 +140,12 @@ public java.util.List getColumnsLi * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ @java.lang.Override public java.util.List @@ -158,13 +156,12 @@ public java.util.List getColumnsLi * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ @java.lang.Override public int getColumnsCount() { @@ -174,13 +171,12 @@ public int getColumnsCount() { * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ @java.lang.Override public com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index) { @@ -190,13 +186,12 @@ public com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index) { * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ @java.lang.Override public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder(int index) { @@ -580,13 +575,12 @@ private void ensureColumnsIsMutable() { * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public java.util.List getColumnsList() { if (columnsBuilder_ == null) { @@ -599,13 +593,12 @@ public java.util.List getColumnsLi * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public int getColumnsCount() { if (columnsBuilder_ == null) { @@ -618,13 +611,12 @@ public int getColumnsCount() { * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index) { if (columnsBuilder_ == null) { @@ -637,13 +629,12 @@ public com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index) { * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder setColumns(int index, com.google.cloud.datacatalog.v1.ColumnSchema value) { if (columnsBuilder_ == null) { @@ -662,13 +653,12 @@ public Builder setColumns(int index, com.google.cloud.datacatalog.v1.ColumnSchem * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder setColumns( int index, com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { @@ -685,13 +675,12 @@ public Builder setColumns( * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder addColumns(com.google.cloud.datacatalog.v1.ColumnSchema value) { if (columnsBuilder_ == null) { @@ -710,13 +699,12 @@ public Builder addColumns(com.google.cloud.datacatalog.v1.ColumnSchema value) { * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder addColumns(int index, com.google.cloud.datacatalog.v1.ColumnSchema value) { if (columnsBuilder_ == null) { @@ -735,13 +723,12 @@ public Builder addColumns(int index, com.google.cloud.datacatalog.v1.ColumnSchem * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder addColumns( com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { @@ -758,13 +745,12 @@ public Builder addColumns( * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder addColumns( int index, com.google.cloud.datacatalog.v1.ColumnSchema.Builder builderForValue) { @@ -781,13 +767,12 @@ public Builder addColumns( * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder addAllColumns( java.lang.Iterable values) { @@ -804,13 +789,12 @@ public Builder addAllColumns( * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder clearColumns() { if (columnsBuilder_ == null) { @@ -826,13 +810,12 @@ public Builder clearColumns() { * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public Builder removeColumns(int index) { if (columnsBuilder_ == null) { @@ -848,13 +831,12 @@ public Builder removeColumns(int index) { * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public com.google.cloud.datacatalog.v1.ColumnSchema.Builder getColumnsBuilder(int index) { return getColumnsFieldBuilder().getBuilder(index); @@ -863,13 +845,12 @@ public com.google.cloud.datacatalog.v1.ColumnSchema.Builder getColumnsBuilder(in * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder(int index) { if (columnsBuilder_ == null) { @@ -882,13 +863,12 @@ public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public java.util.List getColumnsOrBuilderList() { @@ -902,13 +882,12 @@ public com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addColumnsBuilder() { return getColumnsFieldBuilder() @@ -918,13 +897,12 @@ public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addColumnsBuilder() * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addColumnsBuilder(int index) { return getColumnsFieldBuilder() @@ -934,13 +912,12 @@ public com.google.cloud.datacatalog.v1.ColumnSchema.Builder addColumnsBuilder(in * * *
    -     * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -     * specified.
    +     * The unified GoogleSQL-like schema of columns.
    +     * The overall maximum number of columns and nested columns is 10,000.
    +     * The maximum nested depth is 15 levels.
          * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ public java.util.List getColumnsBuilderList() { diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java index 5f177d38..6af75cb2 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOrBuilder.java @@ -27,52 +27,48 @@ public interface SchemaOrBuilder * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ java.util.List getColumnsList(); /** * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ com.google.cloud.datacatalog.v1.ColumnSchema getColumns(int index); /** * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ int getColumnsCount(); /** * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ java.util.List getColumnsOrBuilderList(); @@ -80,13 +76,12 @@ public interface SchemaOrBuilder * * *
    -   * Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be
    -   * specified.
    +   * The unified GoogleSQL-like schema of columns.
    +   * The overall maximum number of columns and nested columns is 10,000.
    +   * The maximum nested depth is 15 levels.
        * 
    * - * - * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * repeated .google.cloud.datacatalog.v1.ColumnSchema columns = 2; */ com.google.cloud.datacatalog.v1.ColumnSchemaOrBuilder getColumnsOrBuilder(int index); } diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java index e84971bc..6866bdfd 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SchemaOuterClass.java @@ -46,19 +46,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n(google/cloud/datacatalog/v1/schema.pro" + "to\022\033google.cloud.datacatalog.v1\032\037google/" - + "api/field_behavior.proto\"I\n\006Schema\022?\n\007co" + + "api/field_behavior.proto\"D\n\006Schema\022:\n\007co" + "lumns\030\002 \003(\0132).google.cloud.datacatalog.v" - + "1.ColumnSchemaB\003\340A\002\"\247\001\n\014ColumnSchema\022\023\n\006" - + "column\030\006 \001(\tB\003\340A\002\022\021\n\004type\030\001 \001(\tB\003\340A\002\022\030\n\013" - + "description\030\002 \001(\tB\003\340A\001\022\021\n\004mode\030\003 \001(\tB\003\340A" - + "\001\022B\n\nsubcolumns\030\007 \003(\0132).google.cloud.dat" - + "acatalog.v1.ColumnSchemaB\003\340A\001B\313\001\n\037com.go" - + "ogle.cloud.datacatalog.v1P\001ZFgoogle.gola" - + "ng.org/genproto/googleapis/cloud/datacat" - + "alog/v1;datacatalog\370\001\001\252\002\033Google.Cloud.Da" - + "taCatalog.V1\312\002\033Google\\Cloud\\DataCatalog\\" - + "V1\352\002\036Google::Cloud::DataCatalog::V1b\006pro" - + "to3" + + "1.ColumnSchema\"\247\001\n\014ColumnSchema\022\023\n\006colum" + + "n\030\006 \001(\tB\003\340A\002\022\021\n\004type\030\001 \001(\tB\003\340A\002\022\030\n\013descr" + + "iption\030\002 \001(\tB\003\340A\001\022\021\n\004mode\030\003 \001(\tB\003\340A\001\022B\n\n" + + "subcolumns\030\007 \003(\0132).google.cloud.datacata" + + "log.v1.ColumnSchemaB\003\340A\001B\313\001\n\037com.google." + + "cloud.datacatalog.v1P\001ZFgoogle.golang.or" + + "g/genproto/googleapis/cloud/datacatalog/" + + "v1;datacatalog\370\001\001\252\002\033Google.Cloud.DataCat" + + "alog.V1\312\002\033Google\\Cloud\\DataCatalog\\V1\352\002\036" + + "Google::Cloud::DataCatalog::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java index f23f11da..2f79f238 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Search.java @@ -44,23 +44,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\022\033google.cloud.datacatalog.v1\032\037google/" + "api/field_behavior.proto\032(google/cloud/d" + "atacatalog/v1/common.proto\032\037google/proto" - + "buf/timestamp.proto\"\264\002\n\023SearchCatalogRes" + + "buf/timestamp.proto\"\203\003\n\023SearchCatalogRes" + "ult\022I\n\022search_result_type\030\001 \001(\0162-.google" + ".cloud.datacatalog.v1.SearchResultType\022\035" + "\n\025search_result_subtype\030\002 \001(\t\022\036\n\026relativ" + "e_resource_name\030\003 \001(\t\022\027\n\017linked_resource" - + "\030\004 \001(\t\022O\n\021integrated_system\030\010 \001(\0162-.goog" - + "le.cloud.datacatalog.v1.IntegratedSystem" - + "B\003\340A\003H\000\022\037\n\025user_specified_system\030\t \001(\tH\000" - + "B\010\n\006system*d\n\020SearchResultType\022\"\n\036SEARCH" - + "_RESULT_TYPE_UNSPECIFIED\020\000\022\t\n\005ENTRY\020\001\022\020\n" - + "\014TAG_TEMPLATE\020\002\022\017\n\013ENTRY_GROUP\020\003B\313\001\n\037com" - + ".google.cloud.datacatalog.v1P\001ZFgoogle.g" - + "olang.org/genproto/googleapis/cloud/data" - + "catalog/v1;datacatalog\370\001\001\252\002\033Google.Cloud" - + ".DataCatalog.V1\312\002\033Google\\Cloud\\DataCatal" - + "og\\V1\352\002\036Google::Cloud::DataCatalog::V1b\006" - + "proto3" + + "\030\004 \001(\t\022/\n\013modify_time\030\007 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022O\n\021integrated_system\030\010 \001" + + "(\0162-.google.cloud.datacatalog.v1.Integra" + + "tedSystemB\003\340A\003H\000\022\037\n\025user_specified_syste" + + "m\030\t \001(\tH\000\022\034\n\024fully_qualified_name\030\n \001(\tB" + + "\010\n\006system*d\n\020SearchResultType\022\"\n\036SEARCH_" + + "RESULT_TYPE_UNSPECIFIED\020\000\022\t\n\005ENTRY\020\001\022\020\n\014" + + "TAG_TEMPLATE\020\002\022\017\n\013ENTRY_GROUP\020\003B\313\001\n\037com." + + "google.cloud.datacatalog.v1P\001ZFgoogle.go" + + "lang.org/genproto/googleapis/cloud/datac" + + "atalog/v1;datacatalog\370\001\001\252\002\033Google.Cloud." + + "DataCatalog.V1\312\002\033Google\\Cloud\\DataCatalo" + + "g\\V1\352\002\036Google::Cloud::DataCatalog::V1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -80,8 +82,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SearchResultSubtype", "RelativeResourceName", "LinkedResource", + "ModifyTime", "IntegratedSystem", "UserSpecifiedSystem", + "FullyQualifiedName", "System", }); com.google.protobuf.ExtensionRegistry registry = diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java index 6717b972..09ed8502 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequest.java @@ -295,38 +295,14 @@ public interface ScopeOrBuilder *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -341,38 +317,14 @@ public interface ScopeOrBuilder *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -387,38 +339,14 @@ public interface ScopeOrBuilder *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -434,38 +362,14 @@ public interface ScopeOrBuilder *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -776,38 +680,14 @@ public boolean getIncludeGcpPublicDatasets() { *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -824,38 +704,14 @@ public com.google.protobuf.ProtocolStringList getRestrictedLocationsList() { *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -872,38 +728,14 @@ public int getRestrictedLocationsCount() { *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -921,38 +753,14 @@ public java.lang.String getRestrictedLocations(int index) { *
          * Optional. The list of locations to search within.
          * 1. If empty, search will be performed in all locations;
    -     * 2. If any of the locations are NOT in the valid locations list, error
    -     * will be returned;
    +     * 2. If any of the locations are NOT [supported
    +     * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +     * error will be returned;
          * 3. Otherwise, search only the given locations for matching results.
          * Typical usage is to leave this field empty. When a location is
          * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
          * users can repeat the search request with this parameter set to get
          * additional information on the error.
    -     * Valid locations:
    -     *  * asia-east1
    -     *  * asia-east2
    -     *  * asia-northeast1
    -     *  * asia-northeast2
    -     *  * asia-northeast3
    -     *  * asia-south1
    -     *  * asia-southeast1
    -     *  * australia-southeast1
    -     *  * eu
    -     *  * europe-north1
    -     *  * europe-west1
    -     *  * europe-west2
    -     *  * europe-west3
    -     *  * europe-west4
    -     *  * europe-west6
    -     *  * global
    -     *  * northamerica-northeast1
    -     *  * southamerica-east1
    -     *  * us
    -     *  * us-central1
    -     *  * us-east1
    -     *  * us-east4
    -     *  * us-west1
    -     *  * us-west2
          * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -1840,38 +1648,14 @@ private void ensureRestrictedLocationsIsMutable() { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -1888,38 +1672,14 @@ public com.google.protobuf.ProtocolStringList getRestrictedLocationsList() { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -1936,38 +1696,14 @@ public int getRestrictedLocationsCount() { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -1985,38 +1721,14 @@ public java.lang.String getRestrictedLocations(int index) { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -2034,38 +1746,14 @@ public com.google.protobuf.ByteString getRestrictedLocationsBytes(int index) { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -2090,38 +1778,14 @@ public Builder setRestrictedLocations(int index, java.lang.String value) { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -2145,38 +1809,14 @@ public Builder addRestrictedLocations(java.lang.String value) { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -2197,38 +1837,14 @@ public Builder addAllRestrictedLocations(java.lang.Iterable va *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -2248,38 +1864,14 @@ public Builder clearRestrictedLocations() { *
            * Optional. The list of locations to search within.
            * 1. If empty, search will be performed in all locations;
    -       * 2. If any of the locations are NOT in the valid locations list, error
    -       * will be returned;
    +       * 2. If any of the locations are NOT [supported
    +       * regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions),
    +       * error will be returned;
            * 3. Otherwise, search only the given locations for matching results.
            * Typical usage is to leave this field empty. When a location is
            * unreachable as returned in the `SearchCatalogResponse.unreachable` field,
            * users can repeat the search request with this parameter set to get
            * additional information on the error.
    -       * Valid locations:
    -       *  * asia-east1
    -       *  * asia-east2
    -       *  * asia-northeast1
    -       *  * asia-northeast2
    -       *  * asia-northeast3
    -       *  * asia-south1
    -       *  * asia-southeast1
    -       *  * australia-southeast1
    -       *  * eu
    -       *  * europe-north1
    -       *  * europe-west1
    -       *  * europe-west2
    -       *  * europe-west3
    -       *  * europe-west4
    -       *  * europe-west6
    -       *  * global
    -       *  * northamerica-northeast1
    -       *  * southamerica-east1
    -       *  * us
    -       *  * us-central1
    -       *  * us-east1
    -       *  * us-east4
    -       *  * us-west1
    -       *  * us-west2
            * 
    * * repeated string restricted_locations = 16 [(.google.api.field_behavior) = OPTIONAL]; @@ -2421,8 +2013,8 @@ public com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder getSc * * *
    -   * Required. The query string in search query syntax. The query must be
    -   * non-empty.
    +   * Optional. The query string in search query syntax. An empty query string will result
    +   * in all data assets (in the specified scope) that the user has access to.
        * Query strings can be simple as "x" or more qualified as:
        * * name:x
        * * column:x
    @@ -2433,7 +2025,7 @@ public com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder getSc
        * for more information.
        * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The query. */ @@ -2453,8 +2045,8 @@ public java.lang.String getQuery() { * * *
    -   * Required. The query string in search query syntax. The query must be
    -   * non-empty.
    +   * Optional. The query string in search query syntax. An empty query string will result
    +   * in all data assets (in the specified scope) that the user has access to.
        * Query strings can be simple as "x" or more qualified as:
        * * name:x
        * * column:x
    @@ -2465,7 +2057,7 @@ public java.lang.String getQuery() {
        * for more information.
        * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for query. */ @@ -2508,8 +2100,8 @@ public int getPageSize() { * *
        * Optional. Pagination token returned in an earlier
    -   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -   * which indicates that this is a continuation of a prior
    +   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +   * indicates that this is a continuation of a prior
        * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
        * call, and that the system should return the next page of data. If empty,
        * the first page is returned.
    @@ -2536,8 +2128,8 @@ public java.lang.String getPageToken() {
        *
        * 
        * Optional. Pagination token returned in an earlier
    -   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -   * which indicates that this is a continuation of a prior
    +   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +   * indicates that this is a continuation of a prior
        * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
        * call, and that the system should return the next page of data. If empty,
        * the first page is returned.
    @@ -3249,8 +2841,8 @@ public com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder getSc
          *
          *
          * 
    -     * Required. The query string in search query syntax. The query must be
    -     * non-empty.
    +     * Optional. The query string in search query syntax. An empty query string will result
    +     * in all data assets (in the specified scope) that the user has access to.
          * Query strings can be simple as "x" or more qualified as:
          * * name:x
          * * column:x
    @@ -3261,7 +2853,7 @@ public com.google.cloud.datacatalog.v1.SearchCatalogRequest.ScopeOrBuilder getSc
          * for more information.
          * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The query. */ @@ -3280,8 +2872,8 @@ public java.lang.String getQuery() { * * *
    -     * Required. The query string in search query syntax. The query must be
    -     * non-empty.
    +     * Optional. The query string in search query syntax. An empty query string will result
    +     * in all data assets (in the specified scope) that the user has access to.
          * Query strings can be simple as "x" or more qualified as:
          * * name:x
          * * column:x
    @@ -3292,7 +2884,7 @@ public java.lang.String getQuery() {
          * for more information.
          * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for query. */ @@ -3311,8 +2903,8 @@ public com.google.protobuf.ByteString getQueryBytes() { * * *
    -     * Required. The query string in search query syntax. The query must be
    -     * non-empty.
    +     * Optional. The query string in search query syntax. An empty query string will result
    +     * in all data assets (in the specified scope) that the user has access to.
          * Query strings can be simple as "x" or more qualified as:
          * * name:x
          * * column:x
    @@ -3323,7 +2915,7 @@ public com.google.protobuf.ByteString getQueryBytes() {
          * for more information.
          * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The query to set. * @return This builder for chaining. @@ -3341,8 +2933,8 @@ public Builder setQuery(java.lang.String value) { * * *
    -     * Required. The query string in search query syntax. The query must be
    -     * non-empty.
    +     * Optional. The query string in search query syntax. An empty query string will result
    +     * in all data assets (in the specified scope) that the user has access to.
          * Query strings can be simple as "x" or more qualified as:
          * * name:x
          * * column:x
    @@ -3353,7 +2945,7 @@ public Builder setQuery(java.lang.String value) {
          * for more information.
          * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3367,8 +2959,8 @@ public Builder clearQuery() { * * *
    -     * Required. The query string in search query syntax. The query must be
    -     * non-empty.
    +     * Optional. The query string in search query syntax. An empty query string will result
    +     * in all data assets (in the specified scope) that the user has access to.
          * Query strings can be simple as "x" or more qualified as:
          * * name:x
          * * column:x
    @@ -3379,7 +2971,7 @@ public Builder clearQuery() {
          * for more information.
          * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for query to set. * @return This builder for chaining. @@ -3456,8 +3048,8 @@ public Builder clearPageSize() { * *
          * Optional. Pagination token returned in an earlier
    -     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -     * which indicates that this is a continuation of a prior
    +     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +     * indicates that this is a continuation of a prior
          * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
          * call, and that the system should return the next page of data. If empty,
          * the first page is returned.
    @@ -3483,8 +3075,8 @@ public java.lang.String getPageToken() {
          *
          * 
          * Optional. Pagination token returned in an earlier
    -     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -     * which indicates that this is a continuation of a prior
    +     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +     * indicates that this is a continuation of a prior
          * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
          * call, and that the system should return the next page of data. If empty,
          * the first page is returned.
    @@ -3510,8 +3102,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
          *
          * 
          * Optional. Pagination token returned in an earlier
    -     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -     * which indicates that this is a continuation of a prior
    +     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +     * indicates that this is a continuation of a prior
          * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
          * call, and that the system should return the next page of data. If empty,
          * the first page is returned.
    @@ -3536,8 +3128,8 @@ public Builder setPageToken(java.lang.String value) {
          *
          * 
          * Optional. Pagination token returned in an earlier
    -     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -     * which indicates that this is a continuation of a prior
    +     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +     * indicates that this is a continuation of a prior
          * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
          * call, and that the system should return the next page of data. If empty,
          * the first page is returned.
    @@ -3558,8 +3150,8 @@ public Builder clearPageToken() {
          *
          * 
          * Optional. Pagination token returned in an earlier
    -     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -     * which indicates that this is a continuation of a prior
    +     * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +     * indicates that this is a continuation of a prior
          * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
          * call, and that the system should return the next page of data. If empty,
          * the first page is returned.
    diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java
    index ef1f18f7..90b845fb 100644
    --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java
    +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogRequestOrBuilder.java
    @@ -77,8 +77,8 @@ public interface SearchCatalogRequestOrBuilder
        *
        *
        * 
    -   * Required. The query string in search query syntax. The query must be
    -   * non-empty.
    +   * Optional. The query string in search query syntax. An empty query string will result
    +   * in all data assets (in the specified scope) that the user has access to.
        * Query strings can be simple as "x" or more qualified as:
        * * name:x
        * * column:x
    @@ -89,7 +89,7 @@ public interface SearchCatalogRequestOrBuilder
        * for more information.
        * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The query. */ @@ -98,8 +98,8 @@ public interface SearchCatalogRequestOrBuilder * * *
    -   * Required. The query string in search query syntax. The query must be
    -   * non-empty.
    +   * Optional. The query string in search query syntax. An empty query string will result
    +   * in all data assets (in the specified scope) that the user has access to.
        * Query strings can be simple as "x" or more qualified as:
        * * name:x
        * * column:x
    @@ -110,7 +110,7 @@ public interface SearchCatalogRequestOrBuilder
        * for more information.
        * 
    * - * string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * string query = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for query. */ @@ -135,8 +135,8 @@ public interface SearchCatalogRequestOrBuilder * *
        * Optional. Pagination token returned in an earlier
    -   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -   * which indicates that this is a continuation of a prior
    +   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +   * indicates that this is a continuation of a prior
        * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
        * call, and that the system should return the next page of data. If empty,
        * the first page is returned.
    @@ -152,8 +152,8 @@ public interface SearchCatalogRequestOrBuilder
        *
        * 
        * Optional. Pagination token returned in an earlier
    -   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token],
    -   * which indicates that this is a continuation of a prior
    +   * [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which
    +   * indicates that this is a continuation of a prior
        * [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
        * call, and that the system should return the next page of data. If empty,
        * the first page is returned.
    diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java
    index 08270377..06525e64 100644
    --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java
    +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponse.java
    @@ -272,7 +272,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() {
        * Unreachable locations. Search result does not include data from those
        * locations. Users can get additional information on the error by repeating
        * the search request with a more restrictive parameter -- setting the value
    -   * for `SearchDataCatalogRequest.scope.include_locations`.
    +   * for `SearchDataCatalogRequest.scope.restricted_locations`.
        * 
    * * repeated string unreachable = 6; @@ -289,7 +289,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -306,7 +306,7 @@ public int getUnreachableCount() { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -324,7 +324,7 @@ public java.lang.String getUnreachable(int index) { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -1226,7 +1226,7 @@ private void ensureUnreachableIsMutable() { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -1243,7 +1243,7 @@ public com.google.protobuf.ProtocolStringList getUnreachableList() { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -1260,7 +1260,7 @@ public int getUnreachableCount() { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -1278,7 +1278,7 @@ public java.lang.String getUnreachable(int index) { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -1296,7 +1296,7 @@ public com.google.protobuf.ByteString getUnreachableBytes(int index) { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -1321,7 +1321,7 @@ public Builder setUnreachable(int index, java.lang.String value) { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. *
    * * repeated string unreachable = 6; @@ -1345,7 +1345,7 @@ public Builder addUnreachable(java.lang.String value) { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. * * * repeated string unreachable = 6; @@ -1366,7 +1366,7 @@ public Builder addAllUnreachable(java.lang.Iterable values) { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. * * * repeated string unreachable = 6; @@ -1386,7 +1386,7 @@ public Builder clearUnreachable() { * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. * * * repeated string unreachable = 6; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java index 551dd29e..daedf937 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResponseOrBuilder.java @@ -107,7 +107,7 @@ public interface SearchCatalogResponseOrBuilder * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. * * * repeated string unreachable = 6; @@ -122,7 +122,7 @@ public interface SearchCatalogResponseOrBuilder * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. * * * repeated string unreachable = 6; @@ -137,7 +137,7 @@ public interface SearchCatalogResponseOrBuilder * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. * * * repeated string unreachable = 6; @@ -153,7 +153,7 @@ public interface SearchCatalogResponseOrBuilder * Unreachable locations. Search result does not include data from those * locations. Users can get additional information on the error by repeating * the search request with a more restrictive parameter -- setting the value - * for `SearchDataCatalogRequest.scope.include_locations`. + * for `SearchDataCatalogRequest.scope.restricted_locations`. * * * repeated string unreachable = 6; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java index 3259a05c..2cddabe9 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java @@ -43,6 +43,7 @@ private SearchCatalogResult() { searchResultSubtype_ = ""; relativeResourceName_ = ""; linkedResource_ = ""; + fullyQualifiedName_ = ""; } @java.lang.Override @@ -100,6 +101,21 @@ private SearchCatalogResult( java.lang.String s = input.readStringRequireUtf8(); linkedResource_ = s; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (modifyTime_ != null) { + subBuilder = modifyTime_.toBuilder(); + } + modifyTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(modifyTime_); + modifyTime_ = subBuilder.buildPartial(); + } + break; } case 64: @@ -116,6 +132,13 @@ private SearchCatalogResult( system_ = s; break; } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + fullyQualifiedName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -400,6 +423,52 @@ public com.google.protobuf.ByteString getLinkedResourceBytes() { } } + public static final int MODIFY_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp modifyTime_; + /** + * + * + *
    +   * Last-modified timestamp of the entry from the managing system.
    +   * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + * + * @return Whether the modifyTime field is set. + */ + @java.lang.Override + public boolean hasModifyTime() { + return modifyTime_ != null; + } + /** + * + * + *
    +   * Last-modified timestamp of the entry from the managing system.
    +   * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + * + * @return The modifyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getModifyTime() { + return modifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifyTime_; + } + /** + * + * + *
    +   * Last-modified timestamp of the entry from the managing system.
    +   * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getModifyTimeOrBuilder() { + return getModifyTime(); + } + public static final int INTEGRATED_SYSTEM_FIELD_NUMBER = 8; /** * @@ -537,6 +606,71 @@ public com.google.protobuf.ByteString getUserSpecifiedSystemBytes() { } } + public static final int FULLY_QUALIFIED_NAME_FIELD_NUMBER = 10; + private volatile java.lang.Object fullyQualifiedName_; + /** + * + * + *
    +   * Fully Qualified Name of the resource.
    +   * There are two main forms of FQNs:
    +   * {system}:{project}.{dot-separated path to resource}
    +   *     for non-regionalized resources
    +   * {system}:{project}.{location id}.{dot-separated path to resource}
    +   *     for regionalized resources
    +   * Examples:
    +   * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +   * * bigquery:table.project_id.dataset_id.table_id
    +   * 
    + * + * string fully_qualified_name = 10; + * + * @return The fullyQualifiedName. + */ + @java.lang.Override + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullyQualifiedName_ = s; + return s; + } + } + /** + * + * + *
    +   * Fully Qualified Name of the resource.
    +   * There are two main forms of FQNs:
    +   * {system}:{project}.{dot-separated path to resource}
    +   *     for non-regionalized resources
    +   * {system}:{project}.{location id}.{dot-separated path to resource}
    +   *     for regionalized resources
    +   * Examples:
    +   * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +   * * bigquery:table.project_id.dataset_id.table_id
    +   * 
    + * + * string fully_qualified_name = 10; + * + * @return The bytes for fullyQualifiedName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullyQualifiedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -565,12 +699,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getLinkedResourceBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, linkedResource_); } + if (modifyTime_ != null) { + output.writeMessage(7, getModifyTime()); + } if (systemCase_ == 8) { output.writeEnum(8, ((java.lang.Integer) system_)); } if (systemCase_ == 9) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, system_); } + if (!getFullyQualifiedNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, fullyQualifiedName_); + } unknownFields.writeTo(output); } @@ -594,6 +734,9 @@ public int getSerializedSize() { if (!getLinkedResourceBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, linkedResource_); } + if (modifyTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getModifyTime()); + } if (systemCase_ == 8) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, ((java.lang.Integer) system_)); @@ -601,6 +744,9 @@ public int getSerializedSize() { if (systemCase_ == 9) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, system_); } + if (!getFullyQualifiedNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, fullyQualifiedName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -621,6 +767,11 @@ public boolean equals(final java.lang.Object obj) { if (!getSearchResultSubtype().equals(other.getSearchResultSubtype())) return false; if (!getRelativeResourceName().equals(other.getRelativeResourceName())) return false; if (!getLinkedResource().equals(other.getLinkedResource())) return false; + if (hasModifyTime() != other.hasModifyTime()) return false; + if (hasModifyTime()) { + if (!getModifyTime().equals(other.getModifyTime())) return false; + } + if (!getFullyQualifiedName().equals(other.getFullyQualifiedName())) return false; if (!getSystemCase().equals(other.getSystemCase())) return false; switch (systemCase_) { case 8: @@ -651,6 +802,12 @@ public int hashCode() { hash = (53 * hash) + getRelativeResourceName().hashCode(); hash = (37 * hash) + LINKED_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getLinkedResource().hashCode(); + if (hasModifyTime()) { + hash = (37 * hash) + MODIFY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getModifyTime().hashCode(); + } + hash = (37 * hash) + FULLY_QUALIFIED_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullyQualifiedName().hashCode(); switch (systemCase_) { case 8: hash = (37 * hash) + INTEGRATED_SYSTEM_FIELD_NUMBER; @@ -817,6 +974,14 @@ public Builder clear() { linkedResource_ = ""; + if (modifyTimeBuilder_ == null) { + modifyTime_ = null; + } else { + modifyTime_ = null; + modifyTimeBuilder_ = null; + } + fullyQualifiedName_ = ""; + systemCase_ = 0; system_ = null; return this; @@ -850,12 +1015,18 @@ public com.google.cloud.datacatalog.v1.SearchCatalogResult buildPartial() { result.searchResultSubtype_ = searchResultSubtype_; result.relativeResourceName_ = relativeResourceName_; result.linkedResource_ = linkedResource_; + if (modifyTimeBuilder_ == null) { + result.modifyTime_ = modifyTime_; + } else { + result.modifyTime_ = modifyTimeBuilder_.build(); + } if (systemCase_ == 8) { result.system_ = system_; } if (systemCase_ == 9) { result.system_ = system_; } + result.fullyQualifiedName_ = fullyQualifiedName_; result.systemCase_ = systemCase_; onBuilt(); return result; @@ -922,6 +1093,13 @@ public Builder mergeFrom(com.google.cloud.datacatalog.v1.SearchCatalogResult oth linkedResource_ = other.linkedResource_; onChanged(); } + if (other.hasModifyTime()) { + mergeModifyTime(other.getModifyTime()); + } + if (!other.getFullyQualifiedName().isEmpty()) { + fullyQualifiedName_ = other.fullyQualifiedName_; + onChanged(); + } switch (other.getSystemCase()) { case INTEGRATED_SYSTEM: { @@ -1445,6 +1623,189 @@ public Builder setLinkedResourceBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Timestamp modifyTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + modifyTimeBuilder_; + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + * + * @return Whether the modifyTime field is set. + */ + public boolean hasModifyTime() { + return modifyTimeBuilder_ != null || modifyTime_ != null; + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + * + * @return The modifyTime. + */ + public com.google.protobuf.Timestamp getModifyTime() { + if (modifyTimeBuilder_ == null) { + return modifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : modifyTime_; + } else { + return modifyTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + public Builder setModifyTime(com.google.protobuf.Timestamp value) { + if (modifyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modifyTime_ = value; + onChanged(); + } else { + modifyTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + public Builder setModifyTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (modifyTimeBuilder_ == null) { + modifyTime_ = builderForValue.build(); + onChanged(); + } else { + modifyTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + public Builder mergeModifyTime(com.google.protobuf.Timestamp value) { + if (modifyTimeBuilder_ == null) { + if (modifyTime_ != null) { + modifyTime_ = + com.google.protobuf.Timestamp.newBuilder(modifyTime_).mergeFrom(value).buildPartial(); + } else { + modifyTime_ = value; + } + onChanged(); + } else { + modifyTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + public Builder clearModifyTime() { + if (modifyTimeBuilder_ == null) { + modifyTime_ = null; + onChanged(); + } else { + modifyTime_ = null; + modifyTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getModifyTimeBuilder() { + + onChanged(); + return getModifyTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getModifyTimeOrBuilder() { + if (modifyTimeBuilder_ != null) { + return modifyTimeBuilder_.getMessageOrBuilder(); + } else { + return modifyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : modifyTime_; + } + } + /** + * + * + *
    +     * Last-modified timestamp of the entry from the managing system.
    +     * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getModifyTimeFieldBuilder() { + if (modifyTimeBuilder_ == null) { + modifyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getModifyTime(), getParentForChildren(), isClean()); + modifyTime_ = null; + } + return modifyTimeBuilder_; + } + /** * * @@ -1718,6 +2079,152 @@ public Builder setUserSpecifiedSystemBytes(com.google.protobuf.ByteString value) return this; } + private java.lang.Object fullyQualifiedName_ = ""; + /** + * + * + *
    +     * Fully Qualified Name of the resource.
    +     * There are two main forms of FQNs:
    +     * {system}:{project}.{dot-separated path to resource}
    +     *     for non-regionalized resources
    +     * {system}:{project}.{location id}.{dot-separated path to resource}
    +     *     for regionalized resources
    +     * Examples:
    +     * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +     * * bigquery:table.project_id.dataset_id.table_id
    +     * 
    + * + * string fully_qualified_name = 10; + * + * @return The fullyQualifiedName. + */ + public java.lang.String getFullyQualifiedName() { + java.lang.Object ref = fullyQualifiedName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullyQualifiedName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Fully Qualified Name of the resource.
    +     * There are two main forms of FQNs:
    +     * {system}:{project}.{dot-separated path to resource}
    +     *     for non-regionalized resources
    +     * {system}:{project}.{location id}.{dot-separated path to resource}
    +     *     for regionalized resources
    +     * Examples:
    +     * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +     * * bigquery:table.project_id.dataset_id.table_id
    +     * 
    + * + * string fully_qualified_name = 10; + * + * @return The bytes for fullyQualifiedName. + */ + public com.google.protobuf.ByteString getFullyQualifiedNameBytes() { + java.lang.Object ref = fullyQualifiedName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullyQualifiedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Fully Qualified Name of the resource.
    +     * There are two main forms of FQNs:
    +     * {system}:{project}.{dot-separated path to resource}
    +     *     for non-regionalized resources
    +     * {system}:{project}.{location id}.{dot-separated path to resource}
    +     *     for regionalized resources
    +     * Examples:
    +     * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +     * * bigquery:table.project_id.dataset_id.table_id
    +     * 
    + * + * string fully_qualified_name = 10; + * + * @param value The fullyQualifiedName to set. + * @return This builder for chaining. + */ + public Builder setFullyQualifiedName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullyQualifiedName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Fully Qualified Name of the resource.
    +     * There are two main forms of FQNs:
    +     * {system}:{project}.{dot-separated path to resource}
    +     *     for non-regionalized resources
    +     * {system}:{project}.{location id}.{dot-separated path to resource}
    +     *     for regionalized resources
    +     * Examples:
    +     * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +     * * bigquery:table.project_id.dataset_id.table_id
    +     * 
    + * + * string fully_qualified_name = 10; + * + * @return This builder for chaining. + */ + public Builder clearFullyQualifiedName() { + + fullyQualifiedName_ = getDefaultInstance().getFullyQualifiedName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Fully Qualified Name of the resource.
    +     * There are two main forms of FQNs:
    +     * {system}:{project}.{dot-separated path to resource}
    +     *     for non-regionalized resources
    +     * {system}:{project}.{location id}.{dot-separated path to resource}
    +     *     for regionalized resources
    +     * Examples:
    +     * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +     * * bigquery:table.project_id.dataset_id.table_id
    +     * 
    + * + * string fully_qualified_name = 10; + * + * @param value The bytes for fullyQualifiedName to set. + * @return This builder for chaining. + */ + public Builder setFullyQualifiedNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullyQualifiedName_ = 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-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java index 46149130..5f8e0d1b 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java @@ -143,6 +143,41 @@ public interface SearchCatalogResultOrBuilder */ com.google.protobuf.ByteString getLinkedResourceBytes(); + /** + * + * + *
    +   * Last-modified timestamp of the entry from the managing system.
    +   * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + * + * @return Whether the modifyTime field is set. + */ + boolean hasModifyTime(); + /** + * + * + *
    +   * Last-modified timestamp of the entry from the managing system.
    +   * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + * + * @return The modifyTime. + */ + com.google.protobuf.Timestamp getModifyTime(); + /** + * + * + *
    +   * Last-modified timestamp of the entry from the managing system.
    +   * 
    + * + * .google.protobuf.Timestamp modify_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getModifyTimeOrBuilder(); + /** * * @@ -229,5 +264,46 @@ public interface SearchCatalogResultOrBuilder */ com.google.protobuf.ByteString getUserSpecifiedSystemBytes(); + /** + * + * + *
    +   * Fully Qualified Name of the resource.
    +   * There are two main forms of FQNs:
    +   * {system}:{project}.{dot-separated path to resource}
    +   *     for non-regionalized resources
    +   * {system}:{project}.{location id}.{dot-separated path to resource}
    +   *     for regionalized resources
    +   * Examples:
    +   * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +   * * bigquery:table.project_id.dataset_id.table_id
    +   * 
    + * + * string fully_qualified_name = 10; + * + * @return The fullyQualifiedName. + */ + java.lang.String getFullyQualifiedName(); + /** + * + * + *
    +   * Fully Qualified Name of the resource.
    +   * There are two main forms of FQNs:
    +   * {system}:{project}.{dot-separated path to resource}
    +   *     for non-regionalized resources
    +   * {system}:{project}.{location id}.{dot-separated path to resource}
    +   *     for regionalized resources
    +   * Examples:
    +   * * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId
    +   * * bigquery:table.project_id.dataset_id.table_id
    +   * 
    + * + * string fully_qualified_name = 10; + * + * @return The bytes for fullyQualifiedName. + */ + com.google.protobuf.ByteString getFullyQualifiedNameBytes(); + public com.google.cloud.datacatalog.v1.SearchCatalogResult.SystemCase getSystemCase(); } diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTag.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTag.java new file mode 100644 index 00000000..837fd2e4 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTag.java @@ -0,0 +1,1526 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Message representing one policy tag, including all its descendant policy
    + * tags, as a nested proto.
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.SerializedPolicyTag} + */ +public final class SerializedPolicyTag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.SerializedPolicyTag) + SerializedPolicyTagOrBuilder { + private static final long serialVersionUID = 0L; + // Use SerializedPolicyTag.newBuilder() to construct. + private SerializedPolicyTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SerializedPolicyTag() { + policyTag_ = ""; + displayName_ = ""; + description_ = ""; + childPolicyTags_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SerializedPolicyTag(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SerializedPolicyTag( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + policyTag_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + childPolicyTags_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.SerializedPolicyTag.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = java.util.Collections.unmodifiableList(childPolicyTags_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SerializedPolicyTag.class, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder.class); + } + + public static final int POLICY_TAG_FIELD_NUMBER = 1; + private volatile java.lang.Object policyTag_; + /** + * + * + *
    +   * Resource name of the policy tag.
    +   * This field will be ignored when calling ImportTaxonomies.
    +   * 
    + * + * string policy_tag = 1; + * + * @return The policyTag. + */ + @java.lang.Override + public java.lang.String getPolicyTag() { + java.lang.Object ref = policyTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyTag_ = s; + return s; + } + } + /** + * + * + *
    +   * Resource name of the policy tag.
    +   * This field will be ignored when calling ImportTaxonomies.
    +   * 
    + * + * string policy_tag = 1; + * + * @return The bytes for policyTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyTagBytes() { + java.lang.Object ref = policyTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
    +   * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
    +   * Description of the serialized policy tag. The length of the description is
    +   * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +   * empty description.
    +   * 
    + * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
    +   * Description of the serialized policy tag. The length of the description is
    +   * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +   * empty description.
    +   * 
    + * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHILD_POLICY_TAGS_FIELD_NUMBER = 4; + private java.util.List childPolicyTags_; + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + @java.lang.Override + public java.util.List + getChildPolicyTagsList() { + return childPolicyTags_; + } + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + @java.lang.Override + public java.util.List + getChildPolicyTagsOrBuilderList() { + return childPolicyTags_; + } + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + @java.lang.Override + public int getChildPolicyTagsCount() { + return childPolicyTags_.size(); + } + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTag getChildPolicyTags(int index) { + return childPolicyTags_.get(index); + } + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder getChildPolicyTagsOrBuilder( + int index) { + return childPolicyTags_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getPolicyTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, policyTag_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < childPolicyTags_.size(); i++) { + output.writeMessage(4, childPolicyTags_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPolicyTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, policyTag_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < childPolicyTags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, childPolicyTags_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.SerializedPolicyTag)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.SerializedPolicyTag other = + (com.google.cloud.datacatalog.v1.SerializedPolicyTag) obj; + + if (!getPolicyTag().equals(other.getPolicyTag())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getChildPolicyTagsList().equals(other.getChildPolicyTagsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + POLICY_TAG_FIELD_NUMBER; + hash = (53 * hash) + getPolicyTag().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getChildPolicyTagsCount() > 0) { + hash = (37 * hash) + CHILD_POLICY_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getChildPolicyTagsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.SerializedPolicyTag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Message representing one policy tag, including all its descendant policy
    +   * tags, as a nested proto.
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.SerializedPolicyTag} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.SerializedPolicyTag) + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SerializedPolicyTag.class, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.SerializedPolicyTag.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChildPolicyTagsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + policyTag_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (childPolicyTagsBuilder_ == null) { + childPolicyTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + childPolicyTagsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedPolicyTag_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTag getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.SerializedPolicyTag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTag build() { + com.google.cloud.datacatalog.v1.SerializedPolicyTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTag buildPartial() { + com.google.cloud.datacatalog.v1.SerializedPolicyTag result = + new com.google.cloud.datacatalog.v1.SerializedPolicyTag(this); + int from_bitField0_ = bitField0_; + result.policyTag_ = policyTag_; + result.displayName_ = displayName_; + result.description_ = description_; + if (childPolicyTagsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = java.util.Collections.unmodifiableList(childPolicyTags_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.childPolicyTags_ = childPolicyTags_; + } else { + result.childPolicyTags_ = childPolicyTagsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.SerializedPolicyTag) { + return mergeFrom((com.google.cloud.datacatalog.v1.SerializedPolicyTag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.SerializedPolicyTag other) { + if (other == com.google.cloud.datacatalog.v1.SerializedPolicyTag.getDefaultInstance()) + return this; + if (!other.getPolicyTag().isEmpty()) { + policyTag_ = other.policyTag_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (childPolicyTagsBuilder_ == null) { + if (!other.childPolicyTags_.isEmpty()) { + if (childPolicyTags_.isEmpty()) { + childPolicyTags_ = other.childPolicyTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.addAll(other.childPolicyTags_); + } + onChanged(); + } + } else { + if (!other.childPolicyTags_.isEmpty()) { + if (childPolicyTagsBuilder_.isEmpty()) { + childPolicyTagsBuilder_.dispose(); + childPolicyTagsBuilder_ = null; + childPolicyTags_ = other.childPolicyTags_; + bitField0_ = (bitField0_ & ~0x00000001); + childPolicyTagsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChildPolicyTagsFieldBuilder() + : null; + } else { + childPolicyTagsBuilder_.addAllMessages(other.childPolicyTags_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.SerializedPolicyTag parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.SerializedPolicyTag) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object policyTag_ = ""; + /** + * + * + *
    +     * Resource name of the policy tag.
    +     * This field will be ignored when calling ImportTaxonomies.
    +     * 
    + * + * string policy_tag = 1; + * + * @return The policyTag. + */ + public java.lang.String getPolicyTag() { + java.lang.Object ref = policyTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Resource name of the policy tag.
    +     * This field will be ignored when calling ImportTaxonomies.
    +     * 
    + * + * string policy_tag = 1; + * + * @return The bytes for policyTag. + */ + public com.google.protobuf.ByteString getPolicyTagBytes() { + java.lang.Object ref = policyTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Resource name of the policy tag.
    +     * This field will be ignored when calling ImportTaxonomies.
    +     * 
    + * + * string policy_tag = 1; + * + * @param value The policyTag to set. + * @return This builder for chaining. + */ + public Builder setPolicyTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + policyTag_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Resource name of the policy tag.
    +     * This field will be ignored when calling ImportTaxonomies.
    +     * 
    + * + * string policy_tag = 1; + * + * @return This builder for chaining. + */ + public Builder clearPolicyTag() { + + policyTag_ = getDefaultInstance().getPolicyTag(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Resource name of the policy tag.
    +     * This field will be ignored when calling ImportTaxonomies.
    +     * 
    + * + * string policy_tag = 1; + * + * @param value The bytes for policyTag to set. + * @return This builder for chaining. + */ + public Builder setPolicyTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + policyTag_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
    +     * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
    +     * Description of the serialized policy tag. The length of the description is
    +     * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +     * empty description.
    +     * 
    + * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Description of the serialized policy tag. The length of the description is
    +     * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +     * empty description.
    +     * 
    + * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Description of the serialized policy tag. The length of the description is
    +     * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +     * empty description.
    +     * 
    + * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Description of the serialized policy tag. The length of the description is
    +     * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +     * empty description.
    +     * 
    + * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Description of the serialized policy tag. The length of the description is
    +     * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +     * empty description.
    +     * 
    + * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.util.List childPolicyTags_ = + java.util.Collections.emptyList(); + + private void ensureChildPolicyTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + childPolicyTags_ = + new java.util.ArrayList( + childPolicyTags_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedPolicyTag, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder, + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder> + childPolicyTagsBuilder_; + + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public java.util.List + getChildPolicyTagsList() { + if (childPolicyTagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(childPolicyTags_); + } else { + return childPolicyTagsBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public int getChildPolicyTagsCount() { + if (childPolicyTagsBuilder_ == null) { + return childPolicyTags_.size(); + } else { + return childPolicyTagsBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag getChildPolicyTags(int index) { + if (childPolicyTagsBuilder_ == null) { + return childPolicyTags_.get(index); + } else { + return childPolicyTagsBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder setChildPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag value) { + if (childPolicyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.set(index, value); + onChanged(); + } else { + childPolicyTagsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder setChildPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder builderForValue) { + if (childPolicyTagsBuilder_ == null) { + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.set(index, builderForValue.build()); + onChanged(); + } else { + childPolicyTagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder addChildPolicyTags(com.google.cloud.datacatalog.v1.SerializedPolicyTag value) { + if (childPolicyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.add(value); + onChanged(); + } else { + childPolicyTagsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder addChildPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag value) { + if (childPolicyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.add(index, value); + onChanged(); + } else { + childPolicyTagsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder addChildPolicyTags( + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder builderForValue) { + if (childPolicyTagsBuilder_ == null) { + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.add(builderForValue.build()); + onChanged(); + } else { + childPolicyTagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder addChildPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder builderForValue) { + if (childPolicyTagsBuilder_ == null) { + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.add(index, builderForValue.build()); + onChanged(); + } else { + childPolicyTagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder addAllChildPolicyTags( + java.lang.Iterable values) { + if (childPolicyTagsBuilder_ == null) { + ensureChildPolicyTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, childPolicyTags_); + onChanged(); + } else { + childPolicyTagsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder clearChildPolicyTags() { + if (childPolicyTagsBuilder_ == null) { + childPolicyTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + childPolicyTagsBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public Builder removeChildPolicyTags(int index) { + if (childPolicyTagsBuilder_ == null) { + ensureChildPolicyTagsIsMutable(); + childPolicyTags_.remove(index); + onChanged(); + } else { + childPolicyTagsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder getChildPolicyTagsBuilder( + int index) { + return getChildPolicyTagsFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder getChildPolicyTagsOrBuilder( + int index) { + if (childPolicyTagsBuilder_ == null) { + return childPolicyTags_.get(index); + } else { + return childPolicyTagsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public java.util.List + getChildPolicyTagsOrBuilderList() { + if (childPolicyTagsBuilder_ != null) { + return childPolicyTagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(childPolicyTags_); + } + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder addChildPolicyTagsBuilder() { + return getChildPolicyTagsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.SerializedPolicyTag.getDefaultInstance()); + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder addChildPolicyTagsBuilder( + int index) { + return getChildPolicyTagsFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.v1.SerializedPolicyTag.getDefaultInstance()); + } + /** + * + * + *
    +     * Children of the policy tag, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + public java.util.List + getChildPolicyTagsBuilderList() { + return getChildPolicyTagsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedPolicyTag, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder, + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder> + getChildPolicyTagsFieldBuilder() { + if (childPolicyTagsBuilder_ == null) { + childPolicyTagsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedPolicyTag, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder, + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder>( + childPolicyTags_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + childPolicyTags_ = null; + } + return childPolicyTagsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.SerializedPolicyTag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.SerializedPolicyTag) + private static final com.google.cloud.datacatalog.v1.SerializedPolicyTag DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.SerializedPolicyTag(); + } + + public static com.google.cloud.datacatalog.v1.SerializedPolicyTag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SerializedPolicyTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SerializedPolicyTag(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTagOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTagOrBuilder.java new file mode 100644 index 00000000..a9f4879c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTagOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface SerializedPolicyTagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SerializedPolicyTag) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Resource name of the policy tag.
    +   * This field will be ignored when calling ImportTaxonomies.
    +   * 
    + * + * string policy_tag = 1; + * + * @return The policyTag. + */ + java.lang.String getPolicyTag(); + /** + * + * + *
    +   * Resource name of the policy tag.
    +   * This field will be ignored when calling ImportTaxonomies.
    +   * 
    + * + * string policy_tag = 1; + * + * @return The bytes for policyTag. + */ + com.google.protobuf.ByteString getPolicyTagBytes(); + + /** + * + * + *
    +   * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
    +   * Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +   * Description of the serialized policy tag. The length of the description is
    +   * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +   * empty description.
    +   * 
    + * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
    +   * Description of the serialized policy tag. The length of the description is
    +   * limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an
    +   * empty description.
    +   * 
    + * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + java.util.List getChildPolicyTagsList(); + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + com.google.cloud.datacatalog.v1.SerializedPolicyTag getChildPolicyTags(int index); + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + int getChildPolicyTagsCount(); + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + java.util.List + getChildPolicyTagsOrBuilderList(); + /** + * + * + *
    +   * Children of the policy tag, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag child_policy_tags = 4; + */ + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder getChildPolicyTagsOrBuilder( + int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomy.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomy.java new file mode 100644 index 00000000..35b3501c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomy.java @@ -0,0 +1,1743 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Message representing a taxonomy, including its policy tags in hierarchy, as a
    + * nested proto. Used for taxonomy replacement, import, and export.
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.SerializedTaxonomy} + */ +public final class SerializedTaxonomy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.SerializedTaxonomy) + SerializedTaxonomyOrBuilder { + private static final long serialVersionUID = 0L; + // Use SerializedTaxonomy.newBuilder() to construct. + private SerializedTaxonomy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SerializedTaxonomy() { + displayName_ = ""; + description_ = ""; + policyTags_ = java.util.Collections.emptyList(); + activatedPolicyTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SerializedTaxonomy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SerializedTaxonomy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + policyTags_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + policyTags_.add( + input.readMessage( + com.google.cloud.datacatalog.v1.SerializedPolicyTag.parser(), + extensionRegistry)); + break; + } + case 32: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + activatedPolicyTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + activatedPolicyTypes_.add(rawValue); + break; + } + case 34: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + activatedPolicyTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + activatedPolicyTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + policyTags_ = java.util.Collections.unmodifiableList(policyTags_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + activatedPolicyTypes_ = java.util.Collections.unmodifiableList(activatedPolicyTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SerializedTaxonomy.class, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
    +   * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
    +   * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +   * UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
    +   * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +   * UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_TAGS_FIELD_NUMBER = 3; + private java.util.List policyTags_; + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + @java.lang.Override + public java.util.List getPolicyTagsList() { + return policyTags_; + } + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + @java.lang.Override + public java.util.List + getPolicyTagsOrBuilderList() { + return policyTags_; + } + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + @java.lang.Override + public int getPolicyTagsCount() { + return policyTags_.size(); + } + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTag getPolicyTags(int index) { + return policyTags_.get(index); + } + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder getPolicyTagsOrBuilder( + int index) { + return policyTags_.get(index); + } + + public static final int ACTIVATED_POLICY_TYPES_FIELD_NUMBER = 4; + private java.util.List activatedPolicyTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType> + activatedPolicyTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType>() { + public com.google.cloud.datacatalog.v1.Taxonomy.PolicyType convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType result = + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType.valueOf(from); + return result == null + ? com.google.cloud.datacatalog.v1.Taxonomy.PolicyType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return A list containing the activatedPolicyTypes. + */ + @java.lang.Override + public java.util.List + getActivatedPolicyTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType>( + activatedPolicyTypes_, activatedPolicyTypes_converter_); + } + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return The count of activatedPolicyTypes. + */ + @java.lang.Override + public int getActivatedPolicyTypesCount() { + return activatedPolicyTypes_.size(); + } + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index of the element to return. + * @return The activatedPolicyTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy.PolicyType getActivatedPolicyTypes(int index) { + return activatedPolicyTypes_converter_.convert(activatedPolicyTypes_.get(index)); + } + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return A list containing the enum numeric values on the wire for activatedPolicyTypes. + */ + @java.lang.Override + public java.util.List getActivatedPolicyTypesValueList() { + return activatedPolicyTypes_; + } + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + */ + @java.lang.Override + public int getActivatedPolicyTypesValue(int index) { + return activatedPolicyTypes_.get(index); + } + + private int activatedPolicyTypesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + for (int i = 0; i < policyTags_.size(); i++) { + output.writeMessage(3, policyTags_.get(i)); + } + if (getActivatedPolicyTypesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(activatedPolicyTypesMemoizedSerializedSize); + } + for (int i = 0; i < activatedPolicyTypes_.size(); i++) { + output.writeEnumNoTag(activatedPolicyTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + for (int i = 0; i < policyTags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, policyTags_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < activatedPolicyTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + activatedPolicyTypes_.get(i)); + } + size += dataSize; + if (!getActivatedPolicyTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + activatedPolicyTypesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.SerializedTaxonomy)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.SerializedTaxonomy other = + (com.google.cloud.datacatalog.v1.SerializedTaxonomy) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getPolicyTagsList().equals(other.getPolicyTagsList())) return false; + if (!activatedPolicyTypes_.equals(other.activatedPolicyTypes_)) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getPolicyTagsCount() > 0) { + hash = (37 * hash) + POLICY_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyTagsList().hashCode(); + } + if (getActivatedPolicyTypesCount() > 0) { + hash = (37 * hash) + ACTIVATED_POLICY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + activatedPolicyTypes_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.SerializedTaxonomy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Message representing a taxonomy, including its policy tags in hierarchy, as a
    +   * nested proto. Used for taxonomy replacement, import, and export.
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.SerializedTaxonomy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.SerializedTaxonomy) + com.google.cloud.datacatalog.v1.SerializedTaxonomyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.SerializedTaxonomy.class, + com.google.cloud.datacatalog.v1.SerializedTaxonomy.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.SerializedTaxonomy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPolicyTagsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + description_ = ""; + + if (policyTagsBuilder_ == null) { + policyTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyTagsBuilder_.clear(); + } + activatedPolicyTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerSerializationProto + .internal_static_google_cloud_datacatalog_v1_SerializedTaxonomy_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomy getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.SerializedTaxonomy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomy build() { + com.google.cloud.datacatalog.v1.SerializedTaxonomy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomy buildPartial() { + com.google.cloud.datacatalog.v1.SerializedTaxonomy result = + new com.google.cloud.datacatalog.v1.SerializedTaxonomy(this); + int from_bitField0_ = bitField0_; + result.displayName_ = displayName_; + result.description_ = description_; + if (policyTagsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyTags_ = java.util.Collections.unmodifiableList(policyTags_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyTags_ = policyTags_; + } else { + result.policyTags_ = policyTagsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + activatedPolicyTypes_ = java.util.Collections.unmodifiableList(activatedPolicyTypes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.activatedPolicyTypes_ = activatedPolicyTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.SerializedTaxonomy) { + return mergeFrom((com.google.cloud.datacatalog.v1.SerializedTaxonomy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.SerializedTaxonomy other) { + if (other == com.google.cloud.datacatalog.v1.SerializedTaxonomy.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (policyTagsBuilder_ == null) { + if (!other.policyTags_.isEmpty()) { + if (policyTags_.isEmpty()) { + policyTags_ = other.policyTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyTagsIsMutable(); + policyTags_.addAll(other.policyTags_); + } + onChanged(); + } + } else { + if (!other.policyTags_.isEmpty()) { + if (policyTagsBuilder_.isEmpty()) { + policyTagsBuilder_.dispose(); + policyTagsBuilder_ = null; + policyTags_ = other.policyTags_; + bitField0_ = (bitField0_ & ~0x00000001); + policyTagsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPolicyTagsFieldBuilder() + : null; + } else { + policyTagsBuilder_.addAllMessages(other.policyTags_); + } + } + } + if (!other.activatedPolicyTypes_.isEmpty()) { + if (activatedPolicyTypes_.isEmpty()) { + activatedPolicyTypes_ = other.activatedPolicyTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.addAll(other.activatedPolicyTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.SerializedTaxonomy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.SerializedTaxonomy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
    +     * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +     * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
    +     * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +     * UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +     * UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +     * UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +     * UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +     * UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.util.List policyTags_ = + java.util.Collections.emptyList(); + + private void ensurePolicyTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyTags_ = + new java.util.ArrayList( + policyTags_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedPolicyTag, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder, + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder> + policyTagsBuilder_; + + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public java.util.List getPolicyTagsList() { + if (policyTagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyTags_); + } else { + return policyTagsBuilder_.getMessageList(); + } + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public int getPolicyTagsCount() { + if (policyTagsBuilder_ == null) { + return policyTags_.size(); + } else { + return policyTagsBuilder_.getCount(); + } + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag getPolicyTags(int index) { + if (policyTagsBuilder_ == null) { + return policyTags_.get(index); + } else { + return policyTagsBuilder_.getMessage(index); + } + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder setPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag value) { + if (policyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyTagsIsMutable(); + policyTags_.set(index, value); + onChanged(); + } else { + policyTagsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder setPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder builderForValue) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.set(index, builderForValue.build()); + onChanged(); + } else { + policyTagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder addPolicyTags(com.google.cloud.datacatalog.v1.SerializedPolicyTag value) { + if (policyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyTagsIsMutable(); + policyTags_.add(value); + onChanged(); + } else { + policyTagsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder addPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag value) { + if (policyTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyTagsIsMutable(); + policyTags_.add(index, value); + onChanged(); + } else { + policyTagsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder addPolicyTags( + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder builderForValue) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.add(builderForValue.build()); + onChanged(); + } else { + policyTagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder addPolicyTags( + int index, com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder builderForValue) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.add(index, builderForValue.build()); + onChanged(); + } else { + policyTagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder addAllPolicyTags( + java.lang.Iterable values) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyTags_); + onChanged(); + } else { + policyTagsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder clearPolicyTags() { + if (policyTagsBuilder_ == null) { + policyTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyTagsBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public Builder removePolicyTags(int index) { + if (policyTagsBuilder_ == null) { + ensurePolicyTagsIsMutable(); + policyTags_.remove(index); + onChanged(); + } else { + policyTagsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder getPolicyTagsBuilder( + int index) { + return getPolicyTagsFieldBuilder().getBuilder(index); + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder getPolicyTagsOrBuilder( + int index) { + if (policyTagsBuilder_ == null) { + return policyTags_.get(index); + } else { + return policyTagsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public java.util.List + getPolicyTagsOrBuilderList() { + if (policyTagsBuilder_ != null) { + return policyTagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyTags_); + } + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder addPolicyTagsBuilder() { + return getPolicyTagsFieldBuilder() + .addBuilder(com.google.cloud.datacatalog.v1.SerializedPolicyTag.getDefaultInstance()); + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder addPolicyTagsBuilder( + int index) { + return getPolicyTagsFieldBuilder() + .addBuilder( + index, com.google.cloud.datacatalog.v1.SerializedPolicyTag.getDefaultInstance()); + } + /** + * + * + *
    +     * Top level policy tags associated with the taxonomy, if any.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + public java.util.List + getPolicyTagsBuilderList() { + return getPolicyTagsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedPolicyTag, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder, + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder> + getPolicyTagsFieldBuilder() { + if (policyTagsBuilder_ == null) { + policyTagsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datacatalog.v1.SerializedPolicyTag, + com.google.cloud.datacatalog.v1.SerializedPolicyTag.Builder, + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder>( + policyTags_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policyTags_ = null; + } + return policyTagsBuilder_; + } + + private java.util.List activatedPolicyTypes_ = + java.util.Collections.emptyList(); + + private void ensureActivatedPolicyTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + activatedPolicyTypes_ = new java.util.ArrayList(activatedPolicyTypes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return A list containing the activatedPolicyTypes. + */ + public java.util.List + getActivatedPolicyTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType>( + activatedPolicyTypes_, activatedPolicyTypes_converter_); + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return The count of activatedPolicyTypes. + */ + public int getActivatedPolicyTypesCount() { + return activatedPolicyTypes_.size(); + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index of the element to return. + * @return The activatedPolicyTypes at the given index. + */ + public com.google.cloud.datacatalog.v1.Taxonomy.PolicyType getActivatedPolicyTypes(int index) { + return activatedPolicyTypes_converter_.convert(activatedPolicyTypes_.get(index)); + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index to set the value at. + * @param value The activatedPolicyTypes to set. + * @return This builder for chaining. + */ + public Builder setActivatedPolicyTypes( + int index, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param value The activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addActivatedPolicyTypes( + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param values The activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addAllActivatedPolicyTypes( + java.lang.Iterable values) { + ensureActivatedPolicyTypesIsMutable(); + for (com.google.cloud.datacatalog.v1.Taxonomy.PolicyType value : values) { + activatedPolicyTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearActivatedPolicyTypes() { + activatedPolicyTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return A list containing the enum numeric values on the wire for activatedPolicyTypes. + */ + public java.util.List getActivatedPolicyTypesValueList() { + return java.util.Collections.unmodifiableList(activatedPolicyTypes_); + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + */ + public int getActivatedPolicyTypesValue(int index) { + return activatedPolicyTypes_.get(index); + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + * @return This builder for chaining. + */ + public Builder setActivatedPolicyTypesValue(int index, int value) { + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param value The enum numeric value on the wire for activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addActivatedPolicyTypesValue(int value) { + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
    +     * A list of policy types that are activated per taxonomy.
    +     * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param values The enum numeric values on the wire for activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addAllActivatedPolicyTypesValue(java.lang.Iterable values) { + ensureActivatedPolicyTypesIsMutable(); + for (int value : values) { + activatedPolicyTypes_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.SerializedTaxonomy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.SerializedTaxonomy) + private static final com.google.cloud.datacatalog.v1.SerializedTaxonomy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.SerializedTaxonomy(); + } + + public static com.google.cloud.datacatalog.v1.SerializedTaxonomy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SerializedTaxonomy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SerializedTaxonomy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.SerializedTaxonomy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomyOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomyOrBuilder.java new file mode 100644 index 00000000..e2d1c977 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomyOrBuilder.java @@ -0,0 +1,197 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto + +package com.google.cloud.datacatalog.v1; + +public interface SerializedTaxonomyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.SerializedTaxonomy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
    +   * Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8.
    +   * 
    + * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +   * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +   * UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
    +   * Description of the serialized taxonomy. At most 2000 bytes when encoded in
    +   * UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + java.util.List getPolicyTagsList(); + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + com.google.cloud.datacatalog.v1.SerializedPolicyTag getPolicyTags(int index); + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + int getPolicyTagsCount(); + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + java.util.List + getPolicyTagsOrBuilderList(); + /** + * + * + *
    +   * Top level policy tags associated with the taxonomy, if any.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.SerializedPolicyTag policy_tags = 3; + */ + com.google.cloud.datacatalog.v1.SerializedPolicyTagOrBuilder getPolicyTagsOrBuilder(int index); + + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return A list containing the activatedPolicyTypes. + */ + java.util.List getActivatedPolicyTypesList(); + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return The count of activatedPolicyTypes. + */ + int getActivatedPolicyTypesCount(); + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index of the element to return. + * @return The activatedPolicyTypes at the given index. + */ + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType getActivatedPolicyTypes(int index); + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @return A list containing the enum numeric values on the wire for activatedPolicyTypes. + */ + java.util.List getActivatedPolicyTypesValueList(); + /** + * + * + *
    +   * A list of policy types that are activated per taxonomy.
    +   * 
    + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 4; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + */ + int getActivatedPolicyTypesValue(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java index 00562ea0..23271a76 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java @@ -58,6 +58,16 @@ public enum TableSourceType implements com.google.protobuf.ProtocolMessageEnum { * BIGQUERY_TABLE = 5; */ BIGQUERY_TABLE(5), + /** + * + * + *
    +   * BigQuery materialized view.
    +   * 
    + * + * BIGQUERY_MATERIALIZED_VIEW = 7; + */ + BIGQUERY_MATERIALIZED_VIEW(7), UNRECOGNIZED(-1), ; @@ -91,6 +101,16 @@ public enum TableSourceType implements com.google.protobuf.ProtocolMessageEnum { * BIGQUERY_TABLE = 5; */ public static final int BIGQUERY_TABLE_VALUE = 5; + /** + * + * + *
    +   * BigQuery materialized view.
    +   * 
    + * + * BIGQUERY_MATERIALIZED_VIEW = 7; + */ + public static final int BIGQUERY_MATERIALIZED_VIEW_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -122,6 +142,8 @@ public static TableSourceType forNumber(int value) { return BIGQUERY_VIEW; case 5: return BIGQUERY_TABLE; + case 7: + return BIGQUERY_MATERIALIZED_VIEW; default: return null; } diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java index 263dd331..dac4f012 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSpecOuterClass.java @@ -67,15 +67,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Entry\"\211\001\n\027BigQueryDateShardedSpec\0229\n\007dat" + "aset\030\001 \001(\tB(\340A\003\372A\"\n datacatalog.googleap" + "is.com/Entry\022\031\n\014table_prefix\030\002 \001(\tB\003\340A\003\022" - + "\030\n\013shard_count\030\003 \001(\003B\003\340A\003*[\n\017TableSource" + + "\030\n\013shard_count\030\003 \001(\003B\003\340A\003*{\n\017TableSource" + "Type\022!\n\035TABLE_SOURCE_TYPE_UNSPECIFIED\020\000\022" - + "\021\n\rBIGQUERY_VIEW\020\002\022\022\n\016BIGQUERY_TABLE\020\005B\313" - + "\001\n\037com.google.cloud.datacatalog.v1P\001ZFgo" - + "ogle.golang.org/genproto/googleapis/clou" - + "d/datacatalog/v1;datacatalog\370\001\001\252\002\033Google" - + ".Cloud.DataCatalog.V1\312\002\033Google\\Cloud\\Dat" - + "aCatalog\\V1\352\002\036Google::Cloud::DataCatalog" - + "::V1b\006proto3" + + "\021\n\rBIGQUERY_VIEW\020\002\022\022\n\016BIGQUERY_TABLE\020\005\022\036" + + "\n\032BIGQUERY_MATERIALIZED_VIEW\020\007B\313\001\n\037com.g" + + "oogle.cloud.datacatalog.v1P\001ZFgoogle.gol" + + "ang.org/genproto/googleapis/cloud/dataca" + + "talog/v1;datacatalog\370\001\001\252\002\033Google.Cloud.D" + + "ataCatalog.V1\312\002\033Google\\Cloud\\DataCatalog" + + "\\V1\352\002\036Google::Cloud::DataCatalog::V1b\006pr" + + "oto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java index dd551bb9..238591ba 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tag.java @@ -217,9 +217,10 @@ public ScopeCase getScopeCase() { * *
        * The resource name of the tag in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
        * where `tag_id` is a system-generated identifier.
    -   * Note that this Tag may not actually be stored in the location in this name.
    +   * Note: The tag itself might not be stored in the location specified in its
    +   * name.
        * 
    * * string name = 1; @@ -243,9 +244,10 @@ public java.lang.String getName() { * *
        * The resource name of the tag in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
        * where `tag_id` is a system-generated identifier.
    -   * Note that this Tag may not actually be stored in the location in this name.
    +   * Note: The tag itself might not be stored in the location specified in its
    +   * name.
        * 
    * * string name = 1; @@ -272,7 +274,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
        * Required. The resource name of the tag template that this tag uses. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
        * This field cannot be modified after creation.
        * 
    * @@ -297,7 +299,7 @@ public java.lang.String getTemplate() { * *
        * Required. The resource name of the tag template that this tag uses. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
        * This field cannot be modified after creation.
        * 
    * @@ -372,11 +374,10 @@ public com.google.protobuf.ByteString getTemplateDisplayNameBytes() { * * *
    -   * Resources like Entry can have schemas associated with them. This scope
    +   * Resources like entry can have schemas associated with them. This scope
        * allows users to attach tags to an individual column based on that schema.
    -   * For attaching a tag to a nested column, use `.` to separate the column
    -   * names. Example:
    -   * * `outer_column.inner_column`
    +   * To attach a tag to a nested column, separate column names with a dot
    +   * (`.`). Example: `column.nested_column`.
        * 
    * * string column = 4; @@ -390,11 +391,10 @@ public boolean hasColumn() { * * *
    -   * Resources like Entry can have schemas associated with them. This scope
    +   * Resources like entry can have schemas associated with them. This scope
        * allows users to attach tags to an individual column based on that schema.
    -   * For attaching a tag to a nested column, use `.` to separate the column
    -   * names. Example:
    -   * * `outer_column.inner_column`
    +   * To attach a tag to a nested column, separate column names with a dot
    +   * (`.`). Example: `column.nested_column`.
        * 
    * * string column = 4; @@ -421,11 +421,10 @@ public java.lang.String getColumn() { * * *
    -   * Resources like Entry can have schemas associated with them. This scope
    +   * Resources like entry can have schemas associated with them. This scope
        * allows users to attach tags to an individual column based on that schema.
    -   * For attaching a tag to a nested column, use `.` to separate the column
    -   * names. Example:
    -   * * `outer_column.inner_column`
    +   * To attach a tag to a nested column, separate column names with a dot
    +   * (`.`). Example: `column.nested_column`.
        * 
    * * string column = 4; @@ -1026,9 +1025,10 @@ public Builder clearScope() { * *
          * The resource name of the tag in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
          * where `tag_id` is a system-generated identifier.
    -     * Note that this Tag may not actually be stored in the location in this name.
    +     * Note: The tag itself might not be stored in the location specified in its
    +     * name.
          * 
    * * string name = 1; @@ -1051,9 +1051,10 @@ public java.lang.String getName() { * *
          * The resource name of the tag in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
          * where `tag_id` is a system-generated identifier.
    -     * Note that this Tag may not actually be stored in the location in this name.
    +     * Note: The tag itself might not be stored in the location specified in its
    +     * name.
          * 
    * * string name = 1; @@ -1076,9 +1077,10 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * The resource name of the tag in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
          * where `tag_id` is a system-generated identifier.
    -     * Note that this Tag may not actually be stored in the location in this name.
    +     * Note: The tag itself might not be stored in the location specified in its
    +     * name.
          * 
    * * string name = 1; @@ -1100,9 +1102,10 @@ public Builder setName(java.lang.String value) { * *
          * The resource name of the tag in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
          * where `tag_id` is a system-generated identifier.
    -     * Note that this Tag may not actually be stored in the location in this name.
    +     * Note: The tag itself might not be stored in the location specified in its
    +     * name.
          * 
    * * string name = 1; @@ -1120,9 +1123,10 @@ public Builder clearName() { * *
          * The resource name of the tag in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +     * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
          * where `tag_id` is a system-generated identifier.
    -     * Note that this Tag may not actually be stored in the location in this name.
    +     * Note: The tag itself might not be stored in the location specified in its
    +     * name.
          * 
    * * string name = 1; @@ -1147,7 +1151,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * *
          * Required. The resource name of the tag template that this tag uses. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
          * This field cannot be modified after creation.
          * 
    * @@ -1171,7 +1175,7 @@ public java.lang.String getTemplate() { * *
          * Required. The resource name of the tag template that this tag uses. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
          * This field cannot be modified after creation.
          * 
    * @@ -1195,7 +1199,7 @@ public com.google.protobuf.ByteString getTemplateBytes() { * *
          * Required. The resource name of the tag template that this tag uses. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
          * This field cannot be modified after creation.
          * 
    * @@ -1218,7 +1222,7 @@ public Builder setTemplate(java.lang.String value) { * *
          * Required. The resource name of the tag template that this tag uses. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
          * This field cannot be modified after creation.
          * 
    * @@ -1237,7 +1241,7 @@ public Builder clearTemplate() { * *
          * Required. The resource name of the tag template that this tag uses. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
          * This field cannot be modified after creation.
          * 
    * @@ -1367,11 +1371,10 @@ public Builder setTemplateDisplayNameBytes(com.google.protobuf.ByteString value) * * *
    -     * Resources like Entry can have schemas associated with them. This scope
    +     * Resources like entry can have schemas associated with them. This scope
          * allows users to attach tags to an individual column based on that schema.
    -     * For attaching a tag to a nested column, use `.` to separate the column
    -     * names. Example:
    -     * * `outer_column.inner_column`
    +     * To attach a tag to a nested column, separate column names with a dot
    +     * (`.`). Example: `column.nested_column`.
          * 
    * * string column = 4; @@ -1386,11 +1389,10 @@ public boolean hasColumn() { * * *
    -     * Resources like Entry can have schemas associated with them. This scope
    +     * Resources like entry can have schemas associated with them. This scope
          * allows users to attach tags to an individual column based on that schema.
    -     * For attaching a tag to a nested column, use `.` to separate the column
    -     * names. Example:
    -     * * `outer_column.inner_column`
    +     * To attach a tag to a nested column, separate column names with a dot
    +     * (`.`). Example: `column.nested_column`.
          * 
    * * string column = 4; @@ -1418,11 +1420,10 @@ public java.lang.String getColumn() { * * *
    -     * Resources like Entry can have schemas associated with them. This scope
    +     * Resources like entry can have schemas associated with them. This scope
          * allows users to attach tags to an individual column based on that schema.
    -     * For attaching a tag to a nested column, use `.` to separate the column
    -     * names. Example:
    -     * * `outer_column.inner_column`
    +     * To attach a tag to a nested column, separate column names with a dot
    +     * (`.`). Example: `column.nested_column`.
          * 
    * * string column = 4; @@ -1450,11 +1451,10 @@ public com.google.protobuf.ByteString getColumnBytes() { * * *
    -     * Resources like Entry can have schemas associated with them. This scope
    +     * Resources like entry can have schemas associated with them. This scope
          * allows users to attach tags to an individual column based on that schema.
    -     * For attaching a tag to a nested column, use `.` to separate the column
    -     * names. Example:
    -     * * `outer_column.inner_column`
    +     * To attach a tag to a nested column, separate column names with a dot
    +     * (`.`). Example: `column.nested_column`.
          * 
    * * string column = 4; @@ -1475,11 +1475,10 @@ public Builder setColumn(java.lang.String value) { * * *
    -     * Resources like Entry can have schemas associated with them. This scope
    +     * Resources like entry can have schemas associated with them. This scope
          * allows users to attach tags to an individual column based on that schema.
    -     * For attaching a tag to a nested column, use `.` to separate the column
    -     * names. Example:
    -     * * `outer_column.inner_column`
    +     * To attach a tag to a nested column, separate column names with a dot
    +     * (`.`). Example: `column.nested_column`.
          * 
    * * string column = 4; @@ -1498,11 +1497,10 @@ public Builder clearColumn() { * * *
    -     * Resources like Entry can have schemas associated with them. This scope
    +     * Resources like entry can have schemas associated with them. This scope
          * allows users to attach tags to an individual column based on that schema.
    -     * For attaching a tag to a nested column, use `.` to separate the column
    -     * names. Example:
    -     * * `outer_column.inner_column`
    +     * To attach a tag to a nested column, separate column names with a dot
    +     * (`.`). Example: `column.nested_column`.
          * 
    * * string column = 4; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java index 52a16edc..92073156 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagField.java @@ -966,6 +966,7 @@ public double getDoubleValue() { * *
        * Holds the value for a tag field with string type.
    +   * The maximum length is 2000 UTF-8 characters.
        * 
    * * string string_value = 3; @@ -980,6 +981,7 @@ public boolean hasStringValue() { * *
        * Holds the value for a tag field with string type.
    +   * The maximum length is 2000 UTF-8 characters.
        * 
    * * string string_value = 3; @@ -1007,6 +1009,7 @@ public java.lang.String getStringValue() { * *
        * Holds the value for a tag field with string type.
    +   * The maximum length is 2000 UTF-8 characters.
        * 
    * * string string_value = 3; @@ -1862,6 +1865,7 @@ public Builder clearDoubleValue() { * *
          * Holds the value for a tag field with string type.
    +     * The maximum length is 2000 UTF-8 characters.
          * 
    * * string string_value = 3; @@ -1877,6 +1881,7 @@ public boolean hasStringValue() { * *
          * Holds the value for a tag field with string type.
    +     * The maximum length is 2000 UTF-8 characters.
          * 
    * * string string_value = 3; @@ -1905,6 +1910,7 @@ public java.lang.String getStringValue() { * *
          * Holds the value for a tag field with string type.
    +     * The maximum length is 2000 UTF-8 characters.
          * 
    * * string string_value = 3; @@ -1933,6 +1939,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { * *
          * Holds the value for a tag field with string type.
    +     * The maximum length is 2000 UTF-8 characters.
          * 
    * * string string_value = 3; @@ -1954,6 +1961,7 @@ public Builder setStringValue(java.lang.String value) { * *
          * Holds the value for a tag field with string type.
    +     * The maximum length is 2000 UTF-8 characters.
          * 
    * * string string_value = 3; @@ -1973,6 +1981,7 @@ public Builder clearStringValue() { * *
          * Holds the value for a tag field with string type.
    +     * The maximum length is 2000 UTF-8 characters.
          * 
    * * string string_value = 3; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java index a277017d..6b94d3c6 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagFieldOrBuilder.java @@ -78,6 +78,7 @@ public interface TagFieldOrBuilder * *
        * Holds the value for a tag field with string type.
    +   * The maximum length is 2000 UTF-8 characters.
        * 
    * * string string_value = 3; @@ -90,6 +91,7 @@ public interface TagFieldOrBuilder * *
        * Holds the value for a tag field with string type.
    +   * The maximum length is 2000 UTF-8 characters.
        * 
    * * string string_value = 3; @@ -102,6 +104,7 @@ public interface TagFieldOrBuilder * *
        * Holds the value for a tag field with string type.
    +   * The maximum length is 2000 UTF-8 characters.
        * 
    * * string string_value = 3; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java index d09e17ec..4c2ed3f8 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java @@ -28,9 +28,10 @@ public interface TagOrBuilder * *
        * The resource name of the tag in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
        * where `tag_id` is a system-generated identifier.
    -   * Note that this Tag may not actually be stored in the location in this name.
    +   * Note: The tag itself might not be stored in the location specified in its
    +   * name.
        * 
    * * string name = 1; @@ -43,9 +44,10 @@ public interface TagOrBuilder * *
        * The resource name of the tag in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
    +   * `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}`
        * where `tag_id` is a system-generated identifier.
    -   * Note that this Tag may not actually be stored in the location in this name.
    +   * Note: The tag itself might not be stored in the location specified in its
    +   * name.
        * 
    * * string name = 1; @@ -59,7 +61,7 @@ public interface TagOrBuilder * *
        * Required. The resource name of the tag template that this tag uses. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
        * This field cannot be modified after creation.
        * 
    * @@ -73,7 +75,7 @@ public interface TagOrBuilder * *
        * Required. The resource name of the tag template that this tag uses. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
        * This field cannot be modified after creation.
        * 
    * @@ -112,11 +114,10 @@ public interface TagOrBuilder * * *
    -   * Resources like Entry can have schemas associated with them. This scope
    +   * Resources like entry can have schemas associated with them. This scope
        * allows users to attach tags to an individual column based on that schema.
    -   * For attaching a tag to a nested column, use `.` to separate the column
    -   * names. Example:
    -   * * `outer_column.inner_column`
    +   * To attach a tag to a nested column, separate column names with a dot
    +   * (`.`). Example: `column.nested_column`.
        * 
    * * string column = 4; @@ -128,11 +129,10 @@ public interface TagOrBuilder * * *
    -   * Resources like Entry can have schemas associated with them. This scope
    +   * Resources like entry can have schemas associated with them. This scope
        * allows users to attach tags to an individual column based on that schema.
    -   * For attaching a tag to a nested column, use `.` to separate the column
    -   * names. Example:
    -   * * `outer_column.inner_column`
    +   * To attach a tag to a nested column, separate column names with a dot
    +   * (`.`). Example: `column.nested_column`.
        * 
    * * string column = 4; @@ -144,11 +144,10 @@ public interface TagOrBuilder * * *
    -   * Resources like Entry can have schemas associated with them. This scope
    +   * Resources like entry can have schemas associated with them. This scope
        * allows users to attach tags to an individual column based on that schema.
    -   * For attaching a tag to a nested column, use `.` to separate the column
    -   * names. Example:
    -   * * `outer_column.inner_column`
    +   * To attach a tag to a nested column, separate column names with a dot
    +   * (`.`). Example: `column.nested_column`.
        * 
    * * string column = 4; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java index ca5d51c1..250fb7aa 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java @@ -161,9 +161,9 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * *
        * The resource name of the tag template in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -   * Note that this TagTemplate and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +   * Note: The tag template itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -187,9 +187,9 @@ public java.lang.String getName() { * *
        * The resource name of the tag template in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -   * Note that this TagTemplate and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +   * Note: The tag template itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -215,7 +215,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
    -   * The display name for this template. Defaults to an empty string.
    +   * Display name for this template. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 2; @@ -238,7 +241,10 @@ public java.lang.String getDisplayName() { * * *
    -   * The display name for this template. Defaults to an empty string.
    +   * Display name for this template. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 2; @@ -792,9 +798,9 @@ public Builder mergeFrom( * *
          * The resource name of the tag template in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -     * Note that this TagTemplate and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +     * Note: The tag template itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -817,9 +823,9 @@ public java.lang.String getName() { * *
          * The resource name of the tag template in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -     * Note that this TagTemplate and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +     * Note: The tag template itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -842,9 +848,9 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * The resource name of the tag template in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -     * Note that this TagTemplate and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +     * Note: The tag template itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -866,9 +872,9 @@ public Builder setName(java.lang.String value) { * *
          * The resource name of the tag template in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -     * Note that this TagTemplate and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +     * Note: The tag template itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -886,9 +892,9 @@ public Builder clearName() { * *
          * The resource name of the tag template in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -     * Note that this TagTemplate and its child resources may not actually be
    -     * stored in the location in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +     * Note: The tag template itself and its child resources might not be
    +     * stored in the location specified in its name.
          * 
    * * string name = 1; @@ -912,7 +918,10 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
    -     * The display name for this template. Defaults to an empty string.
    +     * Display name for this template. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 2; @@ -934,7 +943,10 @@ public java.lang.String getDisplayName() { * * *
    -     * The display name for this template. Defaults to an empty string.
    +     * Display name for this template. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 2; @@ -956,7 +968,10 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
    -     * The display name for this template. Defaults to an empty string.
    +     * Display name for this template. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 2; @@ -977,7 +992,10 @@ public Builder setDisplayName(java.lang.String value) { * * *
    -     * The display name for this template. Defaults to an empty string.
    +     * Display name for this template. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 2; @@ -994,7 +1012,10 @@ public Builder clearDisplayName() { * * *
    -     * The display name for this template. Defaults to an empty string.
    +     * Display name for this template. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java index 29a64d6d..a8e33b2f 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java @@ -40,6 +40,7 @@ private TagTemplateField(com.google.protobuf.GeneratedMessageV3.Builder build private TagTemplateField() { name_ = ""; displayName_ = ""; + description_ = ""; } @java.lang.Override @@ -99,6 +100,13 @@ private TagTemplateField( isRequired_ = input.readBool(); break; } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } case 40: { order_ = input.readInt32(); @@ -152,9 +160,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
        * Output only. The resource name of the tag template field in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -   * Note that this TagTemplateField may not actually be stored in the location
    -   * in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +   * Note: The `TagTemplateField` itself might not be stored in the location
    +   * specified in its name.
    +   * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum length is 64 characters.
        * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -178,9 +189,12 @@ public java.lang.String getName() { * *
        * Output only. The resource name of the tag template field in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -   * Note that this TagTemplateField may not actually be stored in the location
    -   * in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +   * Note: The `TagTemplateField` itself might not be stored in the location
    +   * specified in its name.
    +   * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum length is 64 characters.
        * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -207,6 +221,9 @@ public com.google.protobuf.ByteString getNameBytes() { * *
        * The display name for this field. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 1; @@ -230,6 +247,9 @@ public java.lang.String getDisplayName() { * *
        * The display name for this field. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 1; @@ -319,6 +339,55 @@ public boolean getIsRequired() { return isRequired_; } + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * + * + *
    +   * The description for this field. Defaults to an empty string.
    +   * 
    + * + * string description = 4; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
    +   * The description for this field. Defaults to an empty string.
    +   * 
    + * + * string description = 4; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int ORDER_FIELD_NUMBER = 5; private int order_; /** @@ -363,6 +432,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (isRequired_ != false) { output.writeBool(3, isRequired_); } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } if (order_ != 0) { output.writeInt32(5, order_); } @@ -387,6 +459,9 @@ public int getSerializedSize() { if (isRequired_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isRequired_); } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } if (order_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, order_); } @@ -416,6 +491,7 @@ public boolean equals(final java.lang.Object obj) { if (!getType().equals(other.getType())) return false; } if (getIsRequired() != other.getIsRequired()) return false; + if (!getDescription().equals(other.getDescription())) return false; if (getOrder() != other.getOrder()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -438,6 +514,8 @@ public int hashCode() { } hash = (37 * hash) + IS_REQUIRED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsRequired()); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + ORDER_FIELD_NUMBER; hash = (53 * hash) + getOrder(); hash = (29 * hash) + unknownFields.hashCode(); @@ -597,6 +675,8 @@ public Builder clear() { } isRequired_ = false; + description_ = ""; + order_ = 0; return this; @@ -634,6 +714,7 @@ public com.google.cloud.datacatalog.v1.TagTemplateField buildPartial() { result.type_ = typeBuilder_.build(); } result.isRequired_ = isRequired_; + result.description_ = description_; result.order_ = order_; onBuilt(); return result; @@ -699,6 +780,10 @@ public Builder mergeFrom(com.google.cloud.datacatalog.v1.TagTemplateField other) if (other.getIsRequired() != false) { setIsRequired(other.getIsRequired()); } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } if (other.getOrder() != 0) { setOrder(other.getOrder()); } @@ -737,9 +822,12 @@ public Builder mergeFrom( * *
          * Output only. The resource name of the tag template field in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -     * Note that this TagTemplateField may not actually be stored in the location
    -     * in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +     * Note: The `TagTemplateField` itself might not be stored in the location
    +     * specified in its name.
    +     * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum length is 64 characters.
          * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -762,9 +850,12 @@ public java.lang.String getName() { * *
          * Output only. The resource name of the tag template field in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -     * Note that this TagTemplateField may not actually be stored in the location
    -     * in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +     * Note: The `TagTemplateField` itself might not be stored in the location
    +     * specified in its name.
    +     * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum length is 64 characters.
          * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -787,9 +878,12 @@ public com.google.protobuf.ByteString getNameBytes() { * *
          * Output only. The resource name of the tag template field in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -     * Note that this TagTemplateField may not actually be stored in the location
    -     * in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +     * Note: The `TagTemplateField` itself might not be stored in the location
    +     * specified in its name.
    +     * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum length is 64 characters.
          * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -811,9 +905,12 @@ public Builder setName(java.lang.String value) { * *
          * Output only. The resource name of the tag template field in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -     * Note that this TagTemplateField may not actually be stored in the location
    -     * in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +     * Note: The `TagTemplateField` itself might not be stored in the location
    +     * specified in its name.
    +     * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum length is 64 characters.
          * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -831,9 +928,12 @@ public Builder clearName() { * *
          * Output only. The resource name of the tag template field in URL format. Example:
    -     * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -     * Note that this TagTemplateField may not actually be stored in the location
    -     * in this name.
    +     * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +     * Note: The `TagTemplateField` itself might not be stored in the location
    +     * specified in its name.
    +     * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +     * or underscores (_), and must start with a letter or underscore.
    +     * The maximum length is 64 characters.
          * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -858,6 +958,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * *
          * The display name for this field. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 1; @@ -880,6 +983,9 @@ public java.lang.String getDisplayName() { * *
          * The display name for this field. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 1; @@ -902,6 +1008,9 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
          * The display name for this field. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 1; @@ -923,6 +1032,9 @@ public Builder setDisplayName(java.lang.String value) { * *
          * The display name for this field. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 1; @@ -940,6 +1052,9 @@ public Builder clearDisplayName() { * *
          * The display name for this field. Defaults to an empty string.
    +     * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +     * dashes (-), spaces ( ), and can't start or end with spaces.
    +     * The maximum length is 200 characters.
          * 
    * * string display_name = 1; @@ -1213,6 +1328,112 @@ public Builder clearIsRequired() { return this; } + private java.lang.Object description_ = ""; + /** + * + * + *
    +     * The description for this field. Defaults to an empty string.
    +     * 
    + * + * string description = 4; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The description for this field. Defaults to an empty string.
    +     * 
    + * + * string description = 4; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The description for this field. Defaults to an empty string.
    +     * 
    + * + * string description = 4; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The description for this field. Defaults to an empty string.
    +     * 
    + * + * string description = 4; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The description for this field. Defaults to an empty string.
    +     * 
    + * + * string description = 4; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + private int order_; /** * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldEnumValueName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldEnumValueName.java new file mode 100644 index 00000000..9b62144b --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldEnumValueName.java @@ -0,0 +1,309 @@ +/* + * 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.datacatalog.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 TagTemplateFieldEnumValueName implements ResourceName { + private static final PathTemplate + PROJECT_LOCATION_TAG_TEMPLATE_TAG_TEMPLATE_FIELD_ID_ENUM_VALUE_DISPLAY_NAME = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String tagTemplate; + private final String tagTemplateFieldId; + private final String enumValueDisplayName; + + @Deprecated + protected TagTemplateFieldEnumValueName() { + project = null; + location = null; + tagTemplate = null; + tagTemplateFieldId = null; + enumValueDisplayName = null; + } + + private TagTemplateFieldEnumValueName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + tagTemplate = Preconditions.checkNotNull(builder.getTagTemplate()); + tagTemplateFieldId = Preconditions.checkNotNull(builder.getTagTemplateFieldId()); + enumValueDisplayName = Preconditions.checkNotNull(builder.getEnumValueDisplayName()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTagTemplate() { + return tagTemplate; + } + + public String getTagTemplateFieldId() { + return tagTemplateFieldId; + } + + public String getEnumValueDisplayName() { + return enumValueDisplayName; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TagTemplateFieldEnumValueName of( + String project, + String location, + String tagTemplate, + String tagTemplateFieldId, + String enumValueDisplayName) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTagTemplate(tagTemplate) + .setTagTemplateFieldId(tagTemplateFieldId) + .setEnumValueDisplayName(enumValueDisplayName) + .build(); + } + + public static String format( + String project, + String location, + String tagTemplate, + String tagTemplateFieldId, + String enumValueDisplayName) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTagTemplate(tagTemplate) + .setTagTemplateFieldId(tagTemplateFieldId) + .setEnumValueDisplayName(enumValueDisplayName) + .build() + .toString(); + } + + public static TagTemplateFieldEnumValueName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TAG_TEMPLATE_TAG_TEMPLATE_FIELD_ID_ENUM_VALUE_DISPLAY_NAME.validatedMatch( + formattedString, + "TagTemplateFieldEnumValueName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("tag_template"), + matchMap.get("tag_template_field_id"), + matchMap.get("enum_value_display_name")); + } + + 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 (TagTemplateFieldEnumValueName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TAG_TEMPLATE_TAG_TEMPLATE_FIELD_ID_ENUM_VALUE_DISPLAY_NAME.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 (tagTemplate != null) { + fieldMapBuilder.put("tag_template", tagTemplate); + } + if (tagTemplateFieldId != null) { + fieldMapBuilder.put("tag_template_field_id", tagTemplateFieldId); + } + if (enumValueDisplayName != null) { + fieldMapBuilder.put("enum_value_display_name", enumValueDisplayName); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TAG_TEMPLATE_TAG_TEMPLATE_FIELD_ID_ENUM_VALUE_DISPLAY_NAME.instantiate( + "project", + project, + "location", + location, + "tag_template", + tagTemplate, + "tag_template_field_id", + tagTemplateFieldId, + "enum_value_display_name", + enumValueDisplayName); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TagTemplateFieldEnumValueName that = ((TagTemplateFieldEnumValueName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.tagTemplate, that.tagTemplate) + && Objects.equals(this.tagTemplateFieldId, that.tagTemplateFieldId) + && Objects.equals(this.enumValueDisplayName, that.enumValueDisplayName); + } + 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(tagTemplate); + h *= 1000003; + h ^= Objects.hashCode(tagTemplateFieldId); + h *= 1000003; + h ^= Objects.hashCode(enumValueDisplayName); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}. + */ + public static class Builder { + private String project; + private String location; + private String tagTemplate; + private String tagTemplateFieldId; + private String enumValueDisplayName; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTagTemplate() { + return tagTemplate; + } + + public String getTagTemplateFieldId() { + return tagTemplateFieldId; + } + + public String getEnumValueDisplayName() { + return enumValueDisplayName; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTagTemplate(String tagTemplate) { + this.tagTemplate = tagTemplate; + return this; + } + + public Builder setTagTemplateFieldId(String tagTemplateFieldId) { + this.tagTemplateFieldId = tagTemplateFieldId; + return this; + } + + public Builder setEnumValueDisplayName(String enumValueDisplayName) { + this.enumValueDisplayName = enumValueDisplayName; + return this; + } + + private Builder(TagTemplateFieldEnumValueName tagTemplateFieldEnumValueName) { + project = tagTemplateFieldEnumValueName.project; + location = tagTemplateFieldEnumValueName.location; + tagTemplate = tagTemplateFieldEnumValueName.tagTemplate; + tagTemplateFieldId = tagTemplateFieldEnumValueName.tagTemplateFieldId; + enumValueDisplayName = tagTemplateFieldEnumValueName.enumValueDisplayName; + } + + public TagTemplateFieldEnumValueName build() { + return new TagTemplateFieldEnumValueName(this); + } + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java index 9346f8bc..0da4590b 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java @@ -28,9 +28,12 @@ public interface TagTemplateFieldOrBuilder * *
        * Output only. The resource name of the tag template field in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -   * Note that this TagTemplateField may not actually be stored in the location
    -   * in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +   * Note: The `TagTemplateField` itself might not be stored in the location
    +   * specified in its name.
    +   * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum length is 64 characters.
        * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -43,9 +46,12 @@ public interface TagTemplateFieldOrBuilder * *
        * Output only. The resource name of the tag template field in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}
    -   * Note that this TagTemplateField may not actually be stored in the location
    -   * in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}`
    +   * Note: The `TagTemplateField` itself might not be stored in the location
    +   * specified in its name.
    +   * The name must contain only letters (a-z, A-Z), numbers (0-9),
    +   * or underscores (_), and must start with a letter or underscore.
    +   * The maximum length is 64 characters.
        * 
    * * string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -59,6 +65,9 @@ public interface TagTemplateFieldOrBuilder * *
        * The display name for this field. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 1; @@ -71,6 +80,9 @@ public interface TagTemplateFieldOrBuilder * *
        * The display name for this field. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 1; @@ -133,6 +145,31 @@ public interface TagTemplateFieldOrBuilder */ boolean getIsRequired(); + /** + * + * + *
    +   * The description for this field. Defaults to an empty string.
    +   * 
    + * + * string description = 4; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
    +   * The description for this field. Defaults to an empty string.
    +   * 
    + * + * string description = 4; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + /** * * diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java index 4917d039..daf7dfb6 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java @@ -28,9 +28,9 @@ public interface TagTemplateOrBuilder * *
        * The resource name of the tag template in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -   * Note that this TagTemplate and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +   * Note: The tag template itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -43,9 +43,9 @@ public interface TagTemplateOrBuilder * *
        * The resource name of the tag template in URL format. Example:
    -   * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    -   * Note that this TagTemplate and its child resources may not actually be
    -   * stored in the location in this name.
    +   * `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}`
    +   * Note: The tag template itself and its child resources might not be
    +   * stored in the location specified in its name.
        * 
    * * string name = 1; @@ -58,7 +58,10 @@ public interface TagTemplateOrBuilder * * *
    -   * The display name for this template. Defaults to an empty string.
    +   * Display name for this template. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 2; @@ -70,7 +73,10 @@ public interface TagTemplateOrBuilder * * *
    -   * The display name for this template. Defaults to an empty string.
    +   * Display name for this template. Defaults to an empty string.
    +   * The name must contain only Unicode letters, numbers (0-9), underscores (_),
    +   * dashes (-), spaces ( ), and can't start or end with spaces.
    +   * The maximum length is 200 characters.
        * 
    * * string display_name = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java index fc620c84..2ca8ffea 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java @@ -105,30 +105,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "datacatalog.v1.TagTemplateField:\0028\001:p\352Am" + "\n&datacatalog.googleapis.com/TagTemplate" + "\022Cprojects/{project}/locations/{location" - + "}/tagTemplates/{tag_template}\"\242\002\n\020TagTem" + + "}/tagTemplates/{tag_template}\"\267\002\n\020TagTem" + "plateField\022\021\n\004name\030\006 \001(\tB\003\340A\003\022\024\n\014display" + "_name\030\001 \001(\t\0229\n\004type\030\002 \001(\0132&.google.cloud" + ".datacatalog.v1.FieldTypeB\003\340A\002\022\023\n\013is_req" - + "uired\030\003 \001(\010\022\r\n\005order\030\005 \001(\005:\205\001\352A\201\001\n+datac" - + "atalog.googleapis.com/TagTemplateField\022R" - + "projects/{project}/locations/{location}/" - + "tagTemplates/{tag_template}/fields/{fiel" - + "d}\"\230\003\n\tFieldType\022N\n\016primitive_type\030\001 \001(\016" - + "24.google.cloud.datacatalog.v1.FieldType" - + ".PrimitiveTypeH\000\022D\n\tenum_type\030\002 \001(\0132/.go" - + "ogle.cloud.datacatalog.v1.FieldType.Enum" - + "TypeH\000\032\205\001\n\010EnumType\022Q\n\016allowed_values\030\001 " - + "\003(\01329.google.cloud.datacatalog.v1.FieldT" - + "ype.EnumType.EnumValue\032&\n\tEnumValue\022\031\n\014d" - + "isplay_name\030\001 \001(\tB\003\340A\002\"`\n\rPrimitiveType\022" - + "\036\n\032PRIMITIVE_TYPE_UNSPECIFIED\020\000\022\n\n\006DOUBL" - + "E\020\001\022\n\n\006STRING\020\002\022\010\n\004BOOL\020\003\022\r\n\tTIMESTAMP\020\004" - + "B\013\n\ttype_declB\313\001\n\037com.google.cloud.datac" - + "atalog.v1P\001ZFgoogle.golang.org/genproto/" - + "googleapis/cloud/datacatalog/v1;datacata" - + "log\370\001\001\252\002\033Google.Cloud.DataCatalog.V1\312\002\033G" - + "oogle\\Cloud\\DataCatalog\\V1\352\002\036Google::Clo" - + "ud::DataCatalog::V1b\006proto3" + + "uired\030\003 \001(\010\022\023\n\013description\030\004 \001(\t\022\r\n\005orde" + + "r\030\005 \001(\005:\205\001\352A\201\001\n+datacatalog.googleapis.c" + + "om/TagTemplateField\022Rprojects/{project}/" + + "locations/{location}/tagTemplates/{tag_t" + + "emplate}/fields/{field}\"\230\003\n\tFieldType\022N\n" + + "\016primitive_type\030\001 \001(\01624.google.cloud.dat" + + "acatalog.v1.FieldType.PrimitiveTypeH\000\022D\n" + + "\tenum_type\030\002 \001(\0132/.google.cloud.datacata" + + "log.v1.FieldType.EnumTypeH\000\032\205\001\n\010EnumType" + + "\022Q\n\016allowed_values\030\001 \003(\01329.google.cloud." + + "datacatalog.v1.FieldType.EnumType.EnumVa" + + "lue\032&\n\tEnumValue\022\031\n\014display_name\030\001 \001(\tB\003" + + "\340A\002\"`\n\rPrimitiveType\022\036\n\032PRIMITIVE_TYPE_U" + + "NSPECIFIED\020\000\022\n\n\006DOUBLE\020\001\022\n\n\006STRING\020\002\022\010\n\004" + + "BOOL\020\003\022\r\n\tTIMESTAMP\020\004B\013\n\ttype_declB\313\001\n\037c" + + "om.google.cloud.datacatalog.v1P\001ZFgoogle" + + ".golang.org/genproto/googleapis/cloud/da" + + "tacatalog/v1;datacatalog\370\001\001\252\002\033Google.Clo" + + "ud.DataCatalog.V1\312\002\033Google\\Cloud\\DataCat" + + "alog\\V1\352\002\036Google::Cloud::DataCatalog::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -199,7 +200,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_datacatalog_v1_TagTemplateField_descriptor, new java.lang.String[] { - "Name", "DisplayName", "Type", "IsRequired", "Order", + "Name", "DisplayName", "Type", "IsRequired", "Description", "Order", }); internal_static_google_cloud_datacatalog_v1_FieldType_descriptor = getDescriptor().getMessageTypes().get(4); diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Taxonomy.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Taxonomy.java new file mode 100644 index 00000000..ebb7c2a1 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Taxonomy.java @@ -0,0 +1,2045 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * A taxonomy is a collection of hierarchical policy tags that classify data
    + * along a common axis. For instance a "data sensitivity" taxonomy could contain
    + * the following policy tags:
    + * + PII
    + *   + Account number
    + *   + Age
    + *   + SSN
    + *   + Zipcode
    + * + Financials
    + *   + Revenue
    + * A "data origin" taxonomy could contain the following policy tags:
    + * + User data
    + * + Employee data
    + * + Partner data
    + * + Public data
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.Taxonomy} + */ +public final class Taxonomy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.Taxonomy) + TaxonomyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Taxonomy.newBuilder() to construct. + private Taxonomy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Taxonomy() { + name_ = ""; + displayName_ = ""; + description_ = ""; + activatedPolicyTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Taxonomy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Taxonomy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 32: + { + policyTagCount_ = input.readInt32(); + break; + } + case 42: + { + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder subBuilder = null; + if (taxonomyTimestamps_ != null) { + subBuilder = taxonomyTimestamps_.toBuilder(); + } + taxonomyTimestamps_ = + input.readMessage( + com.google.cloud.datacatalog.v1.SystemTimestamps.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(taxonomyTimestamps_); + taxonomyTimestamps_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + activatedPolicyTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + activatedPolicyTypes_.add(rawValue); + break; + } + case 50: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + activatedPolicyTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + activatedPolicyTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + activatedPolicyTypes_ = java.util.Collections.unmodifiableList(activatedPolicyTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_Taxonomy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_Taxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Taxonomy.class, + com.google.cloud.datacatalog.v1.Taxonomy.Builder.class); + } + + /** + * + * + *
    +   * Defines policy types where the policy tags can be used for.
    +   * 
    + * + * Protobuf enum {@code google.cloud.datacatalog.v1.Taxonomy.PolicyType} + */ + public enum PolicyType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Unspecified policy type.
    +     * 
    + * + * POLICY_TYPE_UNSPECIFIED = 0; + */ + POLICY_TYPE_UNSPECIFIED(0), + /** + * + * + *
    +     * Fine-grained access control policy, which enables access control on
    +     * tagged sub-resources.
    +     * 
    + * + * FINE_GRAINED_ACCESS_CONTROL = 1; + */ + FINE_GRAINED_ACCESS_CONTROL(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * Unspecified policy type.
    +     * 
    + * + * POLICY_TYPE_UNSPECIFIED = 0; + */ + public static final int POLICY_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * Fine-grained access control policy, which enables access control on
    +     * tagged sub-resources.
    +     * 
    + * + * FINE_GRAINED_ACCESS_CONTROL = 1; + */ + public static final int FINE_GRAINED_ACCESS_CONTROL_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 PolicyType 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 PolicyType forNumber(int value) { + switch (value) { + case 0: + return POLICY_TYPE_UNSPECIFIED; + case 1: + return FINE_GRAINED_ACCESS_CONTROL; + 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 PolicyType findValueByNumber(int number) { + return PolicyType.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.datacatalog.v1.Taxonomy.getDescriptor().getEnumTypes().get(0); + } + + private static final PolicyType[] VALUES = values(); + + public static PolicyType 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 PolicyType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1.Taxonomy.PolicyType) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * Output only. Resource name of this taxonomy in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +   * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * Output only. Resource name of this taxonomy in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +   * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
    +   * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +   * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +   * be at most 200 bytes long when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
    +   * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +   * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +   * be at most 200 bytes long when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
    +   * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
    +   * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_TAG_COUNT_FIELD_NUMBER = 4; + private int policyTagCount_; + /** + * + * + *
    +   * Output only. Number of policy tags contained in this taxonomy.
    +   * 
    + * + * int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyTagCount. + */ + @java.lang.Override + public int getPolicyTagCount() { + return policyTagCount_; + } + + public static final int TAXONOMY_TIMESTAMPS_FIELD_NUMBER = 5; + private com.google.cloud.datacatalog.v1.SystemTimestamps taxonomyTimestamps_; + /** + * + * + *
    +   * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the taxonomyTimestamps field is set. + */ + @java.lang.Override + public boolean hasTaxonomyTimestamps() { + return taxonomyTimestamps_ != null; + } + /** + * + * + *
    +   * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The taxonomyTimestamps. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SystemTimestamps getTaxonomyTimestamps() { + return taxonomyTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : taxonomyTimestamps_; + } + /** + * + * + *
    +   * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder + getTaxonomyTimestampsOrBuilder() { + return getTaxonomyTimestamps(); + } + + public static final int ACTIVATED_POLICY_TYPES_FIELD_NUMBER = 6; + private java.util.List activatedPolicyTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType> + activatedPolicyTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType>() { + public com.google.cloud.datacatalog.v1.Taxonomy.PolicyType convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType result = + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType.valueOf(from); + return result == null + ? com.google.cloud.datacatalog.v1.Taxonomy.PolicyType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the activatedPolicyTypes. + */ + @java.lang.Override + public java.util.List + getActivatedPolicyTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType>( + activatedPolicyTypes_, activatedPolicyTypes_converter_); + } + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of activatedPolicyTypes. + */ + @java.lang.Override + public int getActivatedPolicyTypesCount() { + return activatedPolicyTypes_.size(); + } + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The activatedPolicyTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy.PolicyType getActivatedPolicyTypes(int index) { + return activatedPolicyTypes_converter_.convert(activatedPolicyTypes_.get(index)); + } + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for activatedPolicyTypes. + */ + @java.lang.Override + public java.util.List getActivatedPolicyTypesValueList() { + return activatedPolicyTypes_; + } + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + */ + @java.lang.Override + public int getActivatedPolicyTypesValue(int index) { + return activatedPolicyTypes_.get(index); + } + + private int activatedPolicyTypesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (policyTagCount_ != 0) { + output.writeInt32(4, policyTagCount_); + } + if (taxonomyTimestamps_ != null) { + output.writeMessage(5, getTaxonomyTimestamps()); + } + if (getActivatedPolicyTypesList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(activatedPolicyTypesMemoizedSerializedSize); + } + for (int i = 0; i < activatedPolicyTypes_.size(); i++) { + output.writeEnumNoTag(activatedPolicyTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (policyTagCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, policyTagCount_); + } + if (taxonomyTimestamps_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTaxonomyTimestamps()); + } + { + int dataSize = 0; + for (int i = 0; i < activatedPolicyTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + activatedPolicyTypes_.get(i)); + } + size += dataSize; + if (!getActivatedPolicyTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + activatedPolicyTypesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.Taxonomy)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.Taxonomy other = (com.google.cloud.datacatalog.v1.Taxonomy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getPolicyTagCount() != other.getPolicyTagCount()) return false; + if (hasTaxonomyTimestamps() != other.hasTaxonomyTimestamps()) return false; + if (hasTaxonomyTimestamps()) { + if (!getTaxonomyTimestamps().equals(other.getTaxonomyTimestamps())) return false; + } + if (!activatedPolicyTypes_.equals(other.activatedPolicyTypes_)) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + POLICY_TAG_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPolicyTagCount(); + if (hasTaxonomyTimestamps()) { + hash = (37 * hash) + TAXONOMY_TIMESTAMPS_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomyTimestamps().hashCode(); + } + if (getActivatedPolicyTypesCount() > 0) { + hash = (37 * hash) + ACTIVATED_POLICY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + activatedPolicyTypes_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datacatalog.v1.Taxonomy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * A taxonomy is a collection of hierarchical policy tags that classify data
    +   * along a common axis. For instance a "data sensitivity" taxonomy could contain
    +   * the following policy tags:
    +   * + PII
    +   *   + Account number
    +   *   + Age
    +   *   + SSN
    +   *   + Zipcode
    +   * + Financials
    +   *   + Revenue
    +   * A "data origin" taxonomy could contain the following policy tags:
    +   * + User data
    +   * + Employee data
    +   * + Partner data
    +   * + Public data
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.Taxonomy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.Taxonomy) + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_Taxonomy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_Taxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.Taxonomy.class, + com.google.cloud.datacatalog.v1.Taxonomy.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.Taxonomy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + policyTagCount_ = 0; + + if (taxonomyTimestampsBuilder_ == null) { + taxonomyTimestamps_ = null; + } else { + taxonomyTimestamps_ = null; + taxonomyTimestampsBuilder_ = null; + } + activatedPolicyTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_Taxonomy_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy build() { + com.google.cloud.datacatalog.v1.Taxonomy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy buildPartial() { + com.google.cloud.datacatalog.v1.Taxonomy result = + new com.google.cloud.datacatalog.v1.Taxonomy(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.policyTagCount_ = policyTagCount_; + if (taxonomyTimestampsBuilder_ == null) { + result.taxonomyTimestamps_ = taxonomyTimestamps_; + } else { + result.taxonomyTimestamps_ = taxonomyTimestampsBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + activatedPolicyTypes_ = java.util.Collections.unmodifiableList(activatedPolicyTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.activatedPolicyTypes_ = activatedPolicyTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.Taxonomy) { + return mergeFrom((com.google.cloud.datacatalog.v1.Taxonomy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.Taxonomy other) { + if (other == com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getPolicyTagCount() != 0) { + setPolicyTagCount(other.getPolicyTagCount()); + } + if (other.hasTaxonomyTimestamps()) { + mergeTaxonomyTimestamps(other.getTaxonomyTimestamps()); + } + if (!other.activatedPolicyTypes_.isEmpty()) { + if (activatedPolicyTypes_.isEmpty()) { + activatedPolicyTypes_ = other.activatedPolicyTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.addAll(other.activatedPolicyTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.Taxonomy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datacatalog.v1.Taxonomy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * Output only. Resource name of this taxonomy in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +     * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Output only. Resource name of this taxonomy in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +     * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Output only. Resource name of this taxonomy in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +     * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource name of this taxonomy in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +     * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Resource name of this taxonomy in format:
    +     * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +     * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +     * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
    +     * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +     * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +     * be at most 200 bytes long when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +     * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +     * be at most 200 bytes long when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +     * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +     * be at most 200 bytes long when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +     * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +     * be at most 200 bytes long when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +     * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +     * be at most 200 bytes long when encoded in UTF-8.
    +     * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
    +     * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +     * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +     * long when encoded in UTF-8. If not set, defaults to an empty description.
    +     * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int policyTagCount_; + /** + * + * + *
    +     * Output only. Number of policy tags contained in this taxonomy.
    +     * 
    + * + * int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyTagCount. + */ + @java.lang.Override + public int getPolicyTagCount() { + return policyTagCount_; + } + /** + * + * + *
    +     * Output only. Number of policy tags contained in this taxonomy.
    +     * 
    + * + * int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The policyTagCount to set. + * @return This builder for chaining. + */ + public Builder setPolicyTagCount(int value) { + + policyTagCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Number of policy tags contained in this taxonomy.
    +     * 
    + * + * int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyTagCount() { + + policyTagCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.datacatalog.v1.SystemTimestamps taxonomyTimestamps_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + taxonomyTimestampsBuilder_; + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the taxonomyTimestamps field is set. + */ + public boolean hasTaxonomyTimestamps() { + return taxonomyTimestampsBuilder_ != null || taxonomyTimestamps_ != null; + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The taxonomyTimestamps. + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps getTaxonomyTimestamps() { + if (taxonomyTimestampsBuilder_ == null) { + return taxonomyTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : taxonomyTimestamps_; + } else { + return taxonomyTimestampsBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTaxonomyTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (taxonomyTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taxonomyTimestamps_ = value; + onChanged(); + } else { + taxonomyTimestampsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTaxonomyTimestamps( + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder builderForValue) { + if (taxonomyTimestampsBuilder_ == null) { + taxonomyTimestamps_ = builderForValue.build(); + onChanged(); + } else { + taxonomyTimestampsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTaxonomyTimestamps(com.google.cloud.datacatalog.v1.SystemTimestamps value) { + if (taxonomyTimestampsBuilder_ == null) { + if (taxonomyTimestamps_ != null) { + taxonomyTimestamps_ = + com.google.cloud.datacatalog.v1.SystemTimestamps.newBuilder(taxonomyTimestamps_) + .mergeFrom(value) + .buildPartial(); + } else { + taxonomyTimestamps_ = value; + } + onChanged(); + } else { + taxonomyTimestampsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTaxonomyTimestamps() { + if (taxonomyTimestampsBuilder_ == null) { + taxonomyTimestamps_ = null; + onChanged(); + } else { + taxonomyTimestamps_ = null; + taxonomyTimestampsBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestamps.Builder getTaxonomyTimestampsBuilder() { + + onChanged(); + return getTaxonomyTimestampsFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder + getTaxonomyTimestampsOrBuilder() { + if (taxonomyTimestampsBuilder_ != null) { + return taxonomyTimestampsBuilder_.getMessageOrBuilder(); + } else { + return taxonomyTimestamps_ == null + ? com.google.cloud.datacatalog.v1.SystemTimestamps.getDefaultInstance() + : taxonomyTimestamps_; + } + } + /** + * + * + *
    +     * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +     * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder> + getTaxonomyTimestampsFieldBuilder() { + if (taxonomyTimestampsBuilder_ == null) { + taxonomyTimestampsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.SystemTimestamps, + com.google.cloud.datacatalog.v1.SystemTimestamps.Builder, + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder>( + getTaxonomyTimestamps(), getParentForChildren(), isClean()); + taxonomyTimestamps_ = null; + } + return taxonomyTimestampsBuilder_; + } + + private java.util.List activatedPolicyTypes_ = + java.util.Collections.emptyList(); + + private void ensureActivatedPolicyTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + activatedPolicyTypes_ = new java.util.ArrayList(activatedPolicyTypes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the activatedPolicyTypes. + */ + public java.util.List + getActivatedPolicyTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType>( + activatedPolicyTypes_, activatedPolicyTypes_converter_); + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of activatedPolicyTypes. + */ + public int getActivatedPolicyTypesCount() { + return activatedPolicyTypes_.size(); + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The activatedPolicyTypes at the given index. + */ + public com.google.cloud.datacatalog.v1.Taxonomy.PolicyType getActivatedPolicyTypes(int index) { + return activatedPolicyTypes_converter_.convert(activatedPolicyTypes_.get(index)); + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The activatedPolicyTypes to set. + * @return This builder for chaining. + */ + public Builder setActivatedPolicyTypes( + int index, com.google.cloud.datacatalog.v1.Taxonomy.PolicyType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addActivatedPolicyTypes( + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addAllActivatedPolicyTypes( + java.lang.Iterable values) { + ensureActivatedPolicyTypesIsMutable(); + for (com.google.cloud.datacatalog.v1.Taxonomy.PolicyType value : values) { + activatedPolicyTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearActivatedPolicyTypes() { + activatedPolicyTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for activatedPolicyTypes. + */ + public java.util.List getActivatedPolicyTypesValueList() { + return java.util.Collections.unmodifiableList(activatedPolicyTypes_); + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + */ + public int getActivatedPolicyTypesValue(int index) { + return activatedPolicyTypes_.get(index); + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + * @return This builder for chaining. + */ + public Builder setActivatedPolicyTypesValue(int index, int value) { + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addActivatedPolicyTypesValue(int value) { + ensureActivatedPolicyTypesIsMutable(); + activatedPolicyTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +     * defaults to an empty list.
    +     * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for activatedPolicyTypes to add. + * @return This builder for chaining. + */ + public Builder addAllActivatedPolicyTypesValue(java.lang.Iterable values) { + ensureActivatedPolicyTypesIsMutable(); + for (int value : values) { + activatedPolicyTypes_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.Taxonomy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.Taxonomy) + private static final com.google.cloud.datacatalog.v1.Taxonomy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.Taxonomy(); + } + + public static com.google.cloud.datacatalog.v1.Taxonomy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Taxonomy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Taxonomy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyName.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyName.java new file mode 100644 index 00000000..3953280f --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyName.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.datacatalog.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 TaxonomyName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_TAXONOMY = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/taxonomies/{taxonomy}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String taxonomy; + + @Deprecated + protected TaxonomyName() { + project = null; + location = null; + taxonomy = null; + } + + private TaxonomyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + taxonomy = Preconditions.checkNotNull(builder.getTaxonomy()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTaxonomy() { + return taxonomy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TaxonomyName of(String project, String location, String taxonomy) { + return newBuilder().setProject(project).setLocation(location).setTaxonomy(taxonomy).build(); + } + + public static String format(String project, String location, String taxonomy) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTaxonomy(taxonomy) + .build() + .toString(); + } + + public static TaxonomyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TAXONOMY.validatedMatch( + formattedString, "TaxonomyName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("taxonomy")); + } + + 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 (TaxonomyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TAXONOMY.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 (taxonomy != null) { + fieldMapBuilder.put("taxonomy", taxonomy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TAXONOMY.instantiate( + "project", project, "location", location, "taxonomy", taxonomy); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TaxonomyName that = ((TaxonomyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.taxonomy, that.taxonomy); + } + 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(taxonomy); + return h; + } + + /** Builder for projects/{project}/locations/{location}/taxonomies/{taxonomy}. */ + public static class Builder { + private String project; + private String location; + private String taxonomy; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTaxonomy() { + return taxonomy; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTaxonomy(String taxonomy) { + this.taxonomy = taxonomy; + return this; + } + + private Builder(TaxonomyName taxonomyName) { + project = taxonomyName.project; + location = taxonomyName.location; + taxonomy = taxonomyName.taxonomy; + } + + public TaxonomyName build() { + return new TaxonomyName(this); + } + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyOrBuilder.java new file mode 100644 index 00000000..f5a1a883 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyOrBuilder.java @@ -0,0 +1,244 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface TaxonomyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.Taxonomy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Output only. Resource name of this taxonomy in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +   * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * Output only. Resource name of this taxonomy in format:
    +   * "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}".
    +   * Note that taxonomy_id's are unique and generated by Policy Tag Manager.
    +   * 
    + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +   * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +   * be at most 200 bytes long when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
    +   * Required. User-defined name of this taxonomy. It must: contain only unicode letters,
    +   * numbers, underscores, dashes and spaces; not start or end with spaces; and
    +   * be at most 200 bytes long when encoded in UTF-8.
    +   * 
    + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
    +   * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
    +   * Optional. Description of this taxonomy. It must: contain only unicode characters,
    +   * tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes
    +   * long when encoded in UTF-8. If not set, defaults to an empty description.
    +   * 
    + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
    +   * Output only. Number of policy tags contained in this taxonomy.
    +   * 
    + * + * int32 policy_tag_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyTagCount. + */ + int getPolicyTagCount(); + + /** + * + * + *
    +   * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the taxonomyTimestamps field is set. + */ + boolean hasTaxonomyTimestamps(); + /** + * + * + *
    +   * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The taxonomyTimestamps. + */ + com.google.cloud.datacatalog.v1.SystemTimestamps getTaxonomyTimestamps(); + /** + * + * + *
    +   * Output only. Timestamps about this taxonomy. Only create_time and update_time are used.
    +   * 
    + * + * + * .google.cloud.datacatalog.v1.SystemTimestamps taxonomy_timestamps = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.datacatalog.v1.SystemTimestampsOrBuilder getTaxonomyTimestampsOrBuilder(); + + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the activatedPolicyTypes. + */ + java.util.List getActivatedPolicyTypesList(); + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of activatedPolicyTypes. + */ + int getActivatedPolicyTypesCount(); + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The activatedPolicyTypes at the given index. + */ + com.google.cloud.datacatalog.v1.Taxonomy.PolicyType getActivatedPolicyTypes(int index); + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for activatedPolicyTypes. + */ + java.util.List getActivatedPolicyTypesValueList(); + /** + * + * + *
    +   * Optional. A list of policy types that are activated for this taxonomy. If not set,
    +   * defaults to an empty list.
    +   * 
    + * + * + * repeated .google.cloud.datacatalog.v1.Taxonomy.PolicyType activated_policy_types = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of activatedPolicyTypes at the given index. + */ + int getActivatedPolicyTypesValue(int index); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java index 21e9ef4e..c1325599 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java @@ -194,8 +194,10 @@ public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilde * * *
    -   * The fields to update on the entry group. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry group.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -210,8 +212,10 @@ public boolean hasUpdateMask() { * * *
    -   * The fields to update on the entry group. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry group.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -226,8 +230,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -   * The fields to update on the entry group. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry group.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -811,8 +817,10 @@ public com.google.cloud.datacatalog.v1.EntryGroupOrBuilder getEntryGroupOrBuilde * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -826,8 +834,10 @@ public boolean hasUpdateMask() { * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -847,8 +857,10 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -870,8 +882,10 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -890,8 +904,10 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -915,8 +931,10 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -936,8 +954,10 @@ public Builder clearUpdateMask() { * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -951,8 +971,10 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -970,8 +992,10 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
    -     * The fields to update on the entry group. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry group.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java index 2f94e45f..ae88ffff 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java @@ -68,8 +68,10 @@ public interface UpdateEntryGroupRequestOrBuilder * * *
    -   * The fields to update on the entry group. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry group.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -81,8 +83,10 @@ public interface UpdateEntryGroupRequestOrBuilder * * *
    -   * The fields to update on the entry group. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry group.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -94,8 +98,10 @@ public interface UpdateEntryGroupRequestOrBuilder * * *
    -   * The fields to update on the entry group. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry group.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java index fc76167e..77982ed4 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java @@ -189,25 +189,27 @@ public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder() { * * *
    -   * The fields to update on the entry. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * The following fields are modifiable:
        * * For entries with type `DATA_STREAM`:
        *    * `schema`
    -   * * For entries with type `FILESET`
    +   * * For entries with type `FILESET`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
        *    * `gcs_fileset_spec`
        *    * `gcs_fileset_spec.file_patterns`
    -   * * For entries with `user_specified_type`
    +   * * For entries with `user_specified_type`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
    -   *    * user_specified_type
    -   *    * user_specified_system
    -   *    * linked_resource
    -   *    * source_system_timestamps
    +   *    * `user_specified_type`
    +   *    * `user_specified_system`
    +   *    * `linked_resource`
    +   *    * `source_system_timestamps`
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -222,25 +224,27 @@ public boolean hasUpdateMask() { * * *
    -   * The fields to update on the entry. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * The following fields are modifiable:
        * * For entries with type `DATA_STREAM`:
        *    * `schema`
    -   * * For entries with type `FILESET`
    +   * * For entries with type `FILESET`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
        *    * `gcs_fileset_spec`
        *    * `gcs_fileset_spec.file_patterns`
    -   * * For entries with `user_specified_type`
    +   * * For entries with `user_specified_type`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
    -   *    * user_specified_type
    -   *    * user_specified_system
    -   *    * linked_resource
    -   *    * source_system_timestamps
    +   *    * `user_specified_type`
    +   *    * `user_specified_system`
    +   *    * `linked_resource`
    +   *    * `source_system_timestamps`
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -255,25 +259,27 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -   * The fields to update on the entry. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * The following fields are modifiable:
        * * For entries with type `DATA_STREAM`:
        *    * `schema`
    -   * * For entries with type `FILESET`
    +   * * For entries with type `FILESET`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
        *    * `gcs_fileset_spec`
        *    * `gcs_fileset_spec.file_patterns`
    -   * * For entries with `user_specified_type`
    +   * * For entries with `user_specified_type`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
    -   *    * user_specified_type
    -   *    * user_specified_system
    -   *    * linked_resource
    -   *    * source_system_timestamps
    +   *    * `user_specified_type`
    +   *    * `user_specified_system`
    +   *    * `linked_resource`
    +   *    * `source_system_timestamps`
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -842,25 +848,27 @@ public com.google.cloud.datacatalog.v1.EntryOrBuilder getEntryOrBuilder() { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -874,25 +882,27 @@ public boolean hasUpdateMask() { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -912,25 +922,27 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -952,25 +964,27 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -989,25 +1003,27 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -1031,25 +1047,27 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -1069,25 +1087,27 @@ public Builder clearUpdateMask() { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -1101,25 +1121,27 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -1137,25 +1159,27 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
    -     * The fields to update on the entry. If absent or empty, all modifiable
    -     * fields are updated.
    +     * Names of fields whose values to overwrite on an entry.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * The following fields are modifiable:
          * * For entries with type `DATA_STREAM`:
          *    * `schema`
    -     * * For entries with type `FILESET`
    +     * * For entries with type `FILESET`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
          *    * `gcs_fileset_spec`
          *    * `gcs_fileset_spec.file_patterns`
    -     * * For entries with `user_specified_type`
    +     * * For entries with `user_specified_type`:
          *    * `schema`
          *    * `display_name`
          *    * `description`
    -     *    * user_specified_type
    -     *    * user_specified_system
    -     *    * linked_resource
    -     *    * source_system_timestamps
    +     *    * `user_specified_type`
    +     *    * `user_specified_system`
    +     *    * `linked_resource`
    +     *    * `source_system_timestamps`
          * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java index 7dc726c2..284f9fc0 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java @@ -65,25 +65,27 @@ public interface UpdateEntryRequestOrBuilder * * *
    -   * The fields to update on the entry. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * The following fields are modifiable:
        * * For entries with type `DATA_STREAM`:
        *    * `schema`
    -   * * For entries with type `FILESET`
    +   * * For entries with type `FILESET`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
        *    * `gcs_fileset_spec`
        *    * `gcs_fileset_spec.file_patterns`
    -   * * For entries with `user_specified_type`
    +   * * For entries with `user_specified_type`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
    -   *    * user_specified_type
    -   *    * user_specified_system
    -   *    * linked_resource
    -   *    * source_system_timestamps
    +   *    * `user_specified_type`
    +   *    * `user_specified_system`
    +   *    * `linked_resource`
    +   *    * `source_system_timestamps`
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -95,25 +97,27 @@ public interface UpdateEntryRequestOrBuilder * * *
    -   * The fields to update on the entry. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * The following fields are modifiable:
        * * For entries with type `DATA_STREAM`:
        *    * `schema`
    -   * * For entries with type `FILESET`
    +   * * For entries with type `FILESET`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
        *    * `gcs_fileset_spec`
        *    * `gcs_fileset_spec.file_patterns`
    -   * * For entries with `user_specified_type`
    +   * * For entries with `user_specified_type`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
    -   *    * user_specified_type
    -   *    * user_specified_system
    -   *    * linked_resource
    -   *    * source_system_timestamps
    +   *    * `user_specified_type`
    +   *    * `user_specified_system`
    +   *    * `linked_resource`
    +   *    * `source_system_timestamps`
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -125,25 +129,27 @@ public interface UpdateEntryRequestOrBuilder * * *
    -   * The fields to update on the entry. If absent or empty, all modifiable
    -   * fields are updated.
    +   * Names of fields whose values to overwrite on an entry.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * The following fields are modifiable:
        * * For entries with type `DATA_STREAM`:
        *    * `schema`
    -   * * For entries with type `FILESET`
    +   * * For entries with type `FILESET`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
        *    * `gcs_fileset_spec`
        *    * `gcs_fileset_spec.file_patterns`
    -   * * For entries with `user_specified_type`
    +   * * For entries with `user_specified_type`:
        *    * `schema`
        *    * `display_name`
        *    * `description`
    -   *    * user_specified_type
    -   *    * user_specified_system
    -   *    * linked_resource
    -   *    * source_system_timestamps
    +   *    * `user_specified_type`
    +   *    * `user_specified_system`
    +   *    * `linked_resource`
    +   *    * `source_system_timestamps`
        * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequest.java new file mode 100644 index 00000000..d52cfd54 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequest.java @@ -0,0 +1,1092 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [UpdatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTag].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdatePolicyTagRequest} + */ +public final class UpdatePolicyTagRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UpdatePolicyTagRequest) + UpdatePolicyTagRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePolicyTagRequest.newBuilder() to construct. + private UpdatePolicyTagRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePolicyTagRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePolicyTagRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdatePolicyTagRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datacatalog.v1.PolicyTag.Builder subBuilder = null; + if (policyTag_ != null) { + subBuilder = policyTag_.toBuilder(); + } + policyTag_ = + input.readMessage( + com.google.cloud.datacatalog.v1.PolicyTag.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policyTag_); + policyTag_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.class, + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.Builder.class); + } + + public static final int POLICY_TAG_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.v1.PolicyTag policyTag_; + /** + * + * + *
    +   * The policy tag to update. Only the description, display_name, and
    +   * parent_policy_tag fields can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * + * @return Whether the policyTag field is set. + */ + @java.lang.Override + public boolean hasPolicyTag() { + return policyTag_ != null; + } + /** + * + * + *
    +   * The policy tag to update. Only the description, display_name, and
    +   * parent_policy_tag fields can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * + * @return The policyTag. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTag getPolicyTag() { + return policyTag_ == null + ? com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance() + : policyTag_; + } + /** + * + * + *
    +   * The policy tag to update. Only the description, display_name, and
    +   * parent_policy_tag fields can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagOrBuilder() { + return getPolicyTag(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
    +   * The update mask applies to the resource. Only display_name, description and
    +   * parent_policy_tag can be updated and thus can be listed in the mask. If
    +   * update_mask is not provided, all allowed fields (i.e. display_name,
    +   * description and parent) will be updated. For more information including the
    +   * `FieldMask` definition, see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
    +   * The update mask applies to the resource. Only display_name, description and
    +   * parent_policy_tag can be updated and thus can be listed in the mask. If
    +   * update_mask is not provided, all allowed fields (i.e. display_name,
    +   * description and parent) will be updated. For more information including the
    +   * `FieldMask` definition, see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
    +   * The update mask applies to the resource. Only display_name, description and
    +   * parent_policy_tag can be updated and thus can be listed in the mask. If
    +   * update_mask is not provided, all allowed fields (i.e. display_name,
    +   * description and parent) will be updated. For more information including the
    +   * `FieldMask` definition, see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (policyTag_ != null) { + output.writeMessage(1, getPolicyTag()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (policyTag_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicyTag()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest other = + (com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest) obj; + + if (hasPolicyTag() != other.hasPolicyTag()) return false; + if (hasPolicyTag()) { + if (!getPolicyTag().equals(other.getPolicyTag())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyTag()) { + hash = (37 * hash) + POLICY_TAG_FIELD_NUMBER; + hash = (53 * hash) + getPolicyTag().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [UpdatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTag].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdatePolicyTagRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UpdatePolicyTagRequest) + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.class, + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyTagBuilder_ == null) { + policyTag_ = null; + } else { + policyTag_ = null; + policyTagBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdatePolicyTagRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest build() { + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest buildPartial() { + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest result = + new com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest(this); + if (policyTagBuilder_ == null) { + result.policyTag_ = policyTag_; + } else { + result.policyTag_ = policyTagBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest other) { + if (other == com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest.getDefaultInstance()) + return this; + if (other.hasPolicyTag()) { + mergePolicyTag(other.getPolicyTag()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datacatalog.v1.PolicyTag policyTag_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder> + policyTagBuilder_; + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * + * @return Whether the policyTag field is set. + */ + public boolean hasPolicyTag() { + return policyTagBuilder_ != null || policyTag_ != null; + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * + * @return The policyTag. + */ + public com.google.cloud.datacatalog.v1.PolicyTag getPolicyTag() { + if (policyTagBuilder_ == null) { + return policyTag_ == null + ? com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance() + : policyTag_; + } else { + return policyTagBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + public Builder setPolicyTag(com.google.cloud.datacatalog.v1.PolicyTag value) { + if (policyTagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyTag_ = value; + onChanged(); + } else { + policyTagBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + public Builder setPolicyTag(com.google.cloud.datacatalog.v1.PolicyTag.Builder builderForValue) { + if (policyTagBuilder_ == null) { + policyTag_ = builderForValue.build(); + onChanged(); + } else { + policyTagBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + public Builder mergePolicyTag(com.google.cloud.datacatalog.v1.PolicyTag value) { + if (policyTagBuilder_ == null) { + if (policyTag_ != null) { + policyTag_ = + com.google.cloud.datacatalog.v1.PolicyTag.newBuilder(policyTag_) + .mergeFrom(value) + .buildPartial(); + } else { + policyTag_ = value; + } + onChanged(); + } else { + policyTagBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + public Builder clearPolicyTag() { + if (policyTagBuilder_ == null) { + policyTag_ = null; + onChanged(); + } else { + policyTag_ = null; + policyTagBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + public com.google.cloud.datacatalog.v1.PolicyTag.Builder getPolicyTagBuilder() { + + onChanged(); + return getPolicyTagFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + public com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagOrBuilder() { + if (policyTagBuilder_ != null) { + return policyTagBuilder_.getMessageOrBuilder(); + } else { + return policyTag_ == null + ? com.google.cloud.datacatalog.v1.PolicyTag.getDefaultInstance() + : policyTag_; + } + } + /** + * + * + *
    +     * The policy tag to update. Only the description, display_name, and
    +     * parent_policy_tag fields can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder> + getPolicyTagFieldBuilder() { + if (policyTagBuilder_ == null) { + policyTagBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.PolicyTag, + com.google.cloud.datacatalog.v1.PolicyTag.Builder, + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder>( + getPolicyTag(), getParentForChildren(), isClean()); + policyTag_ = null; + } + return policyTagBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
    +     * The update mask applies to the resource. Only display_name, description and
    +     * parent_policy_tag can be updated and thus can be listed in the mask. If
    +     * update_mask is not provided, all allowed fields (i.e. display_name,
    +     * description and parent) will be updated. For more information including the
    +     * `FieldMask` definition, see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.UpdatePolicyTagRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UpdatePolicyTagRequest) + private static final com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest(); + } + + public static com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePolicyTagRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdatePolicyTagRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdatePolicyTagRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequestOrBuilder.java new file mode 100644 index 00000000..dd0e55ed --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface UpdatePolicyTagRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.UpdatePolicyTagRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The policy tag to update. Only the description, display_name, and
    +   * parent_policy_tag fields can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * + * @return Whether the policyTag field is set. + */ + boolean hasPolicyTag(); + /** + * + * + *
    +   * The policy tag to update. Only the description, display_name, and
    +   * parent_policy_tag fields can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + * + * @return The policyTag. + */ + com.google.cloud.datacatalog.v1.PolicyTag getPolicyTag(); + /** + * + * + *
    +   * The policy tag to update. Only the description, display_name, and
    +   * parent_policy_tag fields can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.PolicyTag policy_tag = 1; + */ + com.google.cloud.datacatalog.v1.PolicyTagOrBuilder getPolicyTagOrBuilder(); + + /** + * + * + *
    +   * The update mask applies to the resource. Only display_name, description and
    +   * parent_policy_tag can be updated and thus can be listed in the mask. If
    +   * update_mask is not provided, all allowed fields (i.e. display_name,
    +   * description and parent) will be updated. For more information including the
    +   * `FieldMask` definition, see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
    +   * The update mask applies to the resource. Only display_name, description and
    +   * parent_policy_tag can be updated and thus can be listed in the mask. If
    +   * update_mask is not provided, all allowed fields (i.e. display_name,
    +   * description and parent) will be updated. For more information including the
    +   * `FieldMask` definition, see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
    +   * The update mask applies to the resource. Only display_name, description and
    +   * parent_policy_tag can be updated and thus can be listed in the mask. If
    +   * update_mask is not provided, all allowed fields (i.e. display_name,
    +   * description and parent) will be updated. For more information including the
    +   * `FieldMask` definition, see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java index 2dc67eb2..4052ccca 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java @@ -189,8 +189,11 @@ public com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder() { * * *
    -   * The fields to update on the Tag. If absent or empty, all modifiable fields
    -   * are updated. Currently the only modifiable field is the field `fields`.
    +   * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +   * the only modifiable field with the name `fields`.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -205,8 +208,11 @@ public boolean hasUpdateMask() { * * *
    -   * The fields to update on the Tag. If absent or empty, all modifiable fields
    -   * are updated. Currently the only modifiable field is the field `fields`.
    +   * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +   * the only modifiable field with the name `fields`.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -221,8 +227,11 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -   * The fields to update on the Tag. If absent or empty, all modifiable fields
    -   * are updated. Currently the only modifiable field is the field `fields`.
    +   * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +   * the only modifiable field with the name `fields`.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -788,8 +797,11 @@ public com.google.cloud.datacatalog.v1.TagOrBuilder getTagOrBuilder() { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -803,8 +815,11 @@ public boolean hasUpdateMask() { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -824,8 +839,11 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -847,8 +865,11 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -867,8 +888,11 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -892,8 +916,11 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -913,8 +940,11 @@ public Builder clearUpdateMask() { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -928,8 +958,11 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -947,8 +980,11 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
    -     * The fields to update on the Tag. If absent or empty, all modifiable fields
    -     * are updated. Currently the only modifiable field is the field `fields`.
    +     * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +     * the only modifiable field with the name `fields`.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java index 88f69acf..5f97b031 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java @@ -65,8 +65,11 @@ public interface UpdateTagRequestOrBuilder * * *
    -   * The fields to update on the Tag. If absent or empty, all modifiable fields
    -   * are updated. Currently the only modifiable field is the field `fields`.
    +   * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +   * the only modifiable field with the name `fields`.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -78,8 +81,11 @@ public interface UpdateTagRequestOrBuilder * * *
    -   * The fields to update on the Tag. If absent or empty, all modifiable fields
    -   * are updated. Currently the only modifiable field is the field `fields`.
    +   * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +   * the only modifiable field with the name `fields`.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -91,8 +97,11 @@ public interface UpdateTagRequestOrBuilder * * *
    -   * The fields to update on the Tag. If absent or empty, all modifiable fields
    -   * are updated. Currently the only modifiable field is the field `fields`.
    +   * Names of fields whose values to overwrite on a tag. Currently, a tag has
    +   * the only modifiable field with the name `fields`.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java index ca5c4f56..4b1e31e7 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java @@ -258,17 +258,19 @@ public com.google.cloud.datacatalog.v1.TagTemplateFieldOrBuilder getTagTemplateF * * *
    -   * Optional. The field mask specifies the parts of the template to be updated.
    -   * Allowed fields:
    +   * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +   * template. The following fields are modifiable:
        *   * `display_name`
        *   * `type.enum_type`
        *   * `is_required`
    -   * If `update_mask` is not set or empty, all of the allowed fields above will
    -   * be updated.
    -   * When updating an enum type, the provided values will be merged with the
    -   * existing values. Therefore, enum values can only be added, existing enum
    -   * values cannot be deleted nor renamed. Updating a template field from
    -   * optional to required is NOT allowed.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the request
    +   * body, their values are emptied with one exception: when updating an enum
    +   * type, the provided values are merged with the existing values. Therefore,
    +   * enum values can only be added, existing enum values cannot be deleted or
    +   * renamed.
    +   * Additionally, updating a template field from optional to required is
    +   * *not* allowed.
        * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -284,17 +286,19 @@ public boolean hasUpdateMask() { * * *
    -   * Optional. The field mask specifies the parts of the template to be updated.
    -   * Allowed fields:
    +   * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +   * template. The following fields are modifiable:
        *   * `display_name`
        *   * `type.enum_type`
        *   * `is_required`
    -   * If `update_mask` is not set or empty, all of the allowed fields above will
    -   * be updated.
    -   * When updating an enum type, the provided values will be merged with the
    -   * existing values. Therefore, enum values can only be added, existing enum
    -   * values cannot be deleted nor renamed. Updating a template field from
    -   * optional to required is NOT allowed.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the request
    +   * body, their values are emptied with one exception: when updating an enum
    +   * type, the provided values are merged with the existing values. Therefore,
    +   * enum values can only be added, existing enum values cannot be deleted or
    +   * renamed.
    +   * Additionally, updating a template field from optional to required is
    +   * *not* allowed.
        * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -310,17 +314,19 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -   * Optional. The field mask specifies the parts of the template to be updated.
    -   * Allowed fields:
    +   * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +   * template. The following fields are modifiable:
        *   * `display_name`
        *   * `type.enum_type`
        *   * `is_required`
    -   * If `update_mask` is not set or empty, all of the allowed fields above will
    -   * be updated.
    -   * When updating an enum type, the provided values will be merged with the
    -   * existing values. Therefore, enum values can only be added, existing enum
    -   * values cannot be deleted nor renamed. Updating a template field from
    -   * optional to required is NOT allowed.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the request
    +   * body, their values are emptied with one exception: when updating an enum
    +   * type, the provided values are merged with the existing values. Therefore,
    +   * enum values can only be added, existing enum values cannot be deleted or
    +   * renamed.
    +   * Additionally, updating a template field from optional to required is
    +   * *not* allowed.
        * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1046,17 +1052,19 @@ public com.google.cloud.datacatalog.v1.TagTemplateField.Builder getTagTemplateFi * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1071,17 +1079,19 @@ public boolean hasUpdateMask() { * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1102,17 +1112,19 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1135,17 +1147,19 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1165,17 +1179,19 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1200,17 +1216,19 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1231,17 +1249,19 @@ public Builder clearUpdateMask() { * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1256,17 +1276,19 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1285,17 +1307,19 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
    -     * Optional. The field mask specifies the parts of the template to be updated.
    -     * Allowed fields:
    +     * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +     * template. The following fields are modifiable:
          *   * `display_name`
          *   * `type.enum_type`
          *   * `is_required`
    -     * If `update_mask` is not set or empty, all of the allowed fields above will
    -     * be updated.
    -     * When updating an enum type, the provided values will be merged with the
    -     * existing values. Therefore, enum values can only be added, existing enum
    -     * values cannot be deleted nor renamed. Updating a template field from
    -     * optional to required is NOT allowed.
    +     * If this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the request
    +     * body, their values are emptied with one exception: when updating an enum
    +     * type, the provided values are merged with the existing values. Therefore,
    +     * enum values can only be added, existing enum values cannot be deleted or
    +     * renamed.
    +     * Additionally, updating a template field from optional to required is
    +     * *not* allowed.
          * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java index 86a58bc4..346961b6 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java @@ -99,17 +99,19 @@ public interface UpdateTagTemplateFieldRequestOrBuilder * * *
    -   * Optional. The field mask specifies the parts of the template to be updated.
    -   * Allowed fields:
    +   * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +   * template. The following fields are modifiable:
        *   * `display_name`
        *   * `type.enum_type`
        *   * `is_required`
    -   * If `update_mask` is not set or empty, all of the allowed fields above will
    -   * be updated.
    -   * When updating an enum type, the provided values will be merged with the
    -   * existing values. Therefore, enum values can only be added, existing enum
    -   * values cannot be deleted nor renamed. Updating a template field from
    -   * optional to required is NOT allowed.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the request
    +   * body, their values are emptied with one exception: when updating an enum
    +   * type, the provided values are merged with the existing values. Therefore,
    +   * enum values can only be added, existing enum values cannot be deleted or
    +   * renamed.
    +   * Additionally, updating a template field from optional to required is
    +   * *not* allowed.
        * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -122,17 +124,19 @@ public interface UpdateTagTemplateFieldRequestOrBuilder * * *
    -   * Optional. The field mask specifies the parts of the template to be updated.
    -   * Allowed fields:
    +   * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +   * template. The following fields are modifiable:
        *   * `display_name`
        *   * `type.enum_type`
        *   * `is_required`
    -   * If `update_mask` is not set or empty, all of the allowed fields above will
    -   * be updated.
    -   * When updating an enum type, the provided values will be merged with the
    -   * existing values. Therefore, enum values can only be added, existing enum
    -   * values cannot be deleted nor renamed. Updating a template field from
    -   * optional to required is NOT allowed.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the request
    +   * body, their values are emptied with one exception: when updating an enum
    +   * type, the provided values are merged with the existing values. Therefore,
    +   * enum values can only be added, existing enum values cannot be deleted or
    +   * renamed.
    +   * Additionally, updating a template field from optional to required is
    +   * *not* allowed.
        * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -145,17 +149,19 @@ public interface UpdateTagTemplateFieldRequestOrBuilder * * *
    -   * Optional. The field mask specifies the parts of the template to be updated.
    -   * Allowed fields:
    +   * Optional. Names of fields whose values to overwrite on an individual field of a tag
    +   * template. The following fields are modifiable:
        *   * `display_name`
        *   * `type.enum_type`
        *   * `is_required`
    -   * If `update_mask` is not set or empty, all of the allowed fields above will
    -   * be updated.
    -   * When updating an enum type, the provided values will be merged with the
    -   * existing values. Therefore, enum values can only be added, existing enum
    -   * values cannot be deleted nor renamed. Updating a template field from
    -   * optional to required is NOT allowed.
    +   * If this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the request
    +   * body, their values are emptied with one exception: when updating an enum
    +   * type, the provided values are merged with the existing values. Therefore,
    +   * enum values can only be added, existing enum values cannot be deleted or
    +   * renamed.
    +   * Additionally, updating a template field from optional to required is
    +   * *not* allowed.
        * 
    * * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java index 01bde153..c4f3f4cb 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java @@ -194,10 +194,11 @@ public com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuil * * *
    -   * The field mask specifies the parts of the template to overwrite.
    -   * Allowed fields:
    -   *   * `display_name`
    -   * If absent or empty, all of the allowed fields above will be updated.
    +   * Names of fields whose values to overwrite on a tag template. Currently,
    +   * only `display_name` can be overwritten.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -212,10 +213,11 @@ public boolean hasUpdateMask() { * * *
    -   * The field mask specifies the parts of the template to overwrite.
    -   * Allowed fields:
    -   *   * `display_name`
    -   * If absent or empty, all of the allowed fields above will be updated.
    +   * Names of fields whose values to overwrite on a tag template. Currently,
    +   * only `display_name` can be overwritten.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -230,10 +232,11 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -   * The field mask specifies the parts of the template to overwrite.
    -   * Allowed fields:
    -   *   * `display_name`
    -   * If absent or empty, all of the allowed fields above will be updated.
    +   * Names of fields whose values to overwrite on a tag template. Currently,
    +   * only `display_name` can be overwritten.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -817,10 +820,11 @@ public com.google.cloud.datacatalog.v1.TagTemplateOrBuilder getTagTemplateOrBuil * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -834,10 +838,11 @@ public boolean hasUpdateMask() { * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -857,10 +862,11 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -882,10 +888,11 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -904,10 +911,11 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -931,10 +939,11 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -954,10 +963,11 @@ public Builder clearUpdateMask() { * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -971,10 +981,11 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -992,10 +1003,11 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
    -     * The field mask specifies the parts of the template to overwrite.
    -     * Allowed fields:
    -     *   * `display_name`
    -     * If absent or empty, all of the allowed fields above will be updated.
    +     * Names of fields whose values to overwrite on a tag template. Currently,
    +     * only `display_name` can be overwritten.
    +     * In general, if this parameter is absent or empty, all modifiable fields
    +     * are overwritten. If such fields are non-required and omitted in the
    +     * request body, their values are emptied.
          * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java index 4dff865c..6eef4acd 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java @@ -68,10 +68,11 @@ public interface UpdateTagTemplateRequestOrBuilder * * *
    -   * The field mask specifies the parts of the template to overwrite.
    -   * Allowed fields:
    -   *   * `display_name`
    -   * If absent or empty, all of the allowed fields above will be updated.
    +   * Names of fields whose values to overwrite on a tag template. Currently,
    +   * only `display_name` can be overwritten.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -83,10 +84,11 @@ public interface UpdateTagTemplateRequestOrBuilder * * *
    -   * The field mask specifies the parts of the template to overwrite.
    -   * Allowed fields:
    -   *   * `display_name`
    -   * If absent or empty, all of the allowed fields above will be updated.
    +   * Names of fields whose values to overwrite on a tag template. Currently,
    +   * only `display_name` can be overwritten.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; @@ -98,10 +100,11 @@ public interface UpdateTagTemplateRequestOrBuilder * * *
    -   * The field mask specifies the parts of the template to overwrite.
    -   * Allowed fields:
    -   *   * `display_name`
    -   * If absent or empty, all of the allowed fields above will be updated.
    +   * Names of fields whose values to overwrite on a tag template. Currently,
    +   * only `display_name` can be overwritten.
    +   * In general, if this parameter is absent or empty, all modifiable fields
    +   * are overwritten. If such fields are non-required and omitted in the
    +   * request body, their values are emptied.
        * 
    * * .google.protobuf.FieldMask update_mask = 2; diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequest.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequest.java new file mode 100644 index 00000000..4b9cd37c --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequest.java @@ -0,0 +1,1056 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +/** + * + * + *
    + * Request message for
    + * [UpdateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomy].
    + * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTaxonomyRequest} + */ +public final class UpdateTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1.UpdateTaxonomyRequest) + UpdateTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTaxonomyRequest.newBuilder() to construct. + private UpdateTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTaxonomyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTaxonomyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTaxonomyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datacatalog.v1.Taxonomy.Builder subBuilder = null; + if (taxonomy_ != null) { + subBuilder = taxonomy_.toBuilder(); + } + taxonomy_ = + input.readMessage( + com.google.cloud.datacatalog.v1.Taxonomy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(taxonomy_); + taxonomy_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.Builder.class); + } + + public static final int TAXONOMY_FIELD_NUMBER = 1; + private com.google.cloud.datacatalog.v1.Taxonomy taxonomy_; + /** + * + * + *
    +   * The taxonomy to update. Only description, display_name, and activated
    +   * policy types can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * + * @return Whether the taxonomy field is set. + */ + @java.lang.Override + public boolean hasTaxonomy() { + return taxonomy_ != null; + } + /** + * + * + *
    +   * The taxonomy to update. Only description, display_name, and activated
    +   * policy types can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * + * @return The taxonomy. + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomy() { + return taxonomy_ == null + ? com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance() + : taxonomy_; + } + /** + * + * + *
    +   * The taxonomy to update. Only description, display_name, and activated
    +   * policy types can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + @java.lang.Override + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomyOrBuilder() { + return getTaxonomy(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
    +   * The update mask applies to the resource. For the `FieldMask` definition,
    +   * see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
    +   * The update mask applies to the resource. For the `FieldMask` definition,
    +   * see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
    +   * The update mask applies to the resource. For the `FieldMask` definition,
    +   * see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (taxonomy_ != null) { + output.writeMessage(1, getTaxonomy()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (taxonomy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTaxonomy()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest other = + (com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest) obj; + + if (hasTaxonomy() != other.hasTaxonomy()) return false; + if (hasTaxonomy()) { + if (!getTaxonomy().equals(other.getTaxonomy())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTaxonomy()) { + hash = (37 * hash) + TAXONOMY_FIELD_NUMBER; + hash = (53 * hash) + getTaxonomy().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Request message for
    +   * [UpdateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomy].
    +   * 
    + * + * Protobuf type {@code google.cloud.datacatalog.v1.UpdateTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1.UpdateTaxonomyRequest) + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.class, + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (taxonomyBuilder_ == null) { + taxonomy_ = null; + } else { + taxonomy_ = null; + taxonomyBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datacatalog.v1.PolicyTagManagerProto + .internal_static_google_cloud_datacatalog_v1_UpdateTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest build() { + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest buildPartial() { + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest result = + new com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest(this); + if (taxonomyBuilder_ == null) { + result.taxonomy_ = taxonomy_; + } else { + result.taxonomy_ = taxonomyBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest) { + return mergeFrom((com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest other) { + if (other == com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest.getDefaultInstance()) + return this; + if (other.hasTaxonomy()) { + mergeTaxonomy(other.getTaxonomy()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datacatalog.v1.Taxonomy taxonomy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + taxonomyBuilder_; + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * + * @return Whether the taxonomy field is set. + */ + public boolean hasTaxonomy() { + return taxonomyBuilder_ != null || taxonomy_ != null; + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * + * @return The taxonomy. + */ + public com.google.cloud.datacatalog.v1.Taxonomy getTaxonomy() { + if (taxonomyBuilder_ == null) { + return taxonomy_ == null + ? com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance() + : taxonomy_; + } else { + return taxonomyBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + public Builder setTaxonomy(com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taxonomy_ = value; + onChanged(); + } else { + taxonomyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + public Builder setTaxonomy(com.google.cloud.datacatalog.v1.Taxonomy.Builder builderForValue) { + if (taxonomyBuilder_ == null) { + taxonomy_ = builderForValue.build(); + onChanged(); + } else { + taxonomyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + public Builder mergeTaxonomy(com.google.cloud.datacatalog.v1.Taxonomy value) { + if (taxonomyBuilder_ == null) { + if (taxonomy_ != null) { + taxonomy_ = + com.google.cloud.datacatalog.v1.Taxonomy.newBuilder(taxonomy_) + .mergeFrom(value) + .buildPartial(); + } else { + taxonomy_ = value; + } + onChanged(); + } else { + taxonomyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + public Builder clearTaxonomy() { + if (taxonomyBuilder_ == null) { + taxonomy_ = null; + onChanged(); + } else { + taxonomy_ = null; + taxonomyBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + public com.google.cloud.datacatalog.v1.Taxonomy.Builder getTaxonomyBuilder() { + + onChanged(); + return getTaxonomyFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + public com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomyOrBuilder() { + if (taxonomyBuilder_ != null) { + return taxonomyBuilder_.getMessageOrBuilder(); + } else { + return taxonomy_ == null + ? com.google.cloud.datacatalog.v1.Taxonomy.getDefaultInstance() + : taxonomy_; + } + } + /** + * + * + *
    +     * The taxonomy to update. Only description, display_name, and activated
    +     * policy types can be updated.
    +     * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder> + getTaxonomyFieldBuilder() { + if (taxonomyBuilder_ == null) { + taxonomyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datacatalog.v1.Taxonomy, + com.google.cloud.datacatalog.v1.Taxonomy.Builder, + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder>( + getTaxonomy(), getParentForChildren(), isClean()); + taxonomy_ = null; + } + return taxonomyBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
    +     * The update mask applies to the resource. For the `FieldMask` definition,
    +     * see
    +     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +     * If not set, defaults to all of the fields that are allowed to update.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datacatalog.v1.UpdateTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1.UpdateTaxonomyRequest) + private static final com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest(); + } + + public static com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTaxonomyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTaxonomyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datacatalog.v1.UpdateTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequestOrBuilder.java b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequestOrBuilder.java new file mode 100644 index 00000000..3df37361 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datacatalog/v1/policytagmanager.proto + +package com.google.cloud.datacatalog.v1; + +public interface UpdateTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1.UpdateTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The taxonomy to update. Only description, display_name, and activated
    +   * policy types can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * + * @return Whether the taxonomy field is set. + */ + boolean hasTaxonomy(); + /** + * + * + *
    +   * The taxonomy to update. Only description, display_name, and activated
    +   * policy types can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + * + * @return The taxonomy. + */ + com.google.cloud.datacatalog.v1.Taxonomy getTaxonomy(); + /** + * + * + *
    +   * The taxonomy to update. Only description, display_name, and activated
    +   * policy types can be updated.
    +   * 
    + * + * .google.cloud.datacatalog.v1.Taxonomy taxonomy = 1; + */ + com.google.cloud.datacatalog.v1.TaxonomyOrBuilder getTaxonomyOrBuilder(); + + /** + * + * + *
    +   * The update mask applies to the resource. For the `FieldMask` definition,
    +   * see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
    +   * The update mask applies to the resource. For the `FieldMask` definition,
    +   * see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
    +   * The update mask applies to the resource. For the `FieldMask` definition,
    +   * see
    +   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
    +   * If not set, defaults to all of the fields that are allowed to update.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto index bb31bceb..f8d4817c 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -35,4 +35,7 @@ enum IntegratedSystem { // Cloud Pub/Sub. CLOUD_PUBSUB = 2; + + // Dataproc Metastore. + DATAPROC_METASTORE = 3; } diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/data_source.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/data_source.proto new file mode 100644 index 00000000..a4696a01 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/data_source.proto @@ -0,0 +1,50 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_outer_classname = "DataSourceProto"; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Describes the physical location of an entry. +message DataSource { + // Service name where the data is stored. + enum Service { + // Default unknown service. + SERVICE_UNSPECIFIED = 0; + + // Google Cloud Storage service. + CLOUD_STORAGE = 1; + + // BigQuery service. + BIGQUERY = 2; + } + + // Service in which the data is physically stored. + Service service = 1; + + // Full name of the resource as defined by the service, e.g. + // //bigquery.googleapis.com/projects/{project_id}/locations/{location}/datasets/{dataset_id}/tables/{table_id} + string resource = 2; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto index c5b700dd..3f356587 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/datacatalog/v1/common.proto"; +import "google/cloud/datacatalog/v1/data_source.proto"; import "google/cloud/datacatalog/v1/gcs_fileset_spec.proto"; import "google/cloud/datacatalog/v1/schema.proto"; import "google/cloud/datacatalog/v1/search.proto"; @@ -31,6 +32,7 @@ import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.DataCatalog.V1"; @@ -39,13 +41,16 @@ option java_multiple_files = true; option java_package = "com.google.cloud.datacatalog.v1"; option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; option ruby_package = "Google::Cloud::DataCatalog::V1"; +option (google.api.resource_definition) = { + type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue" + pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}" +}; // Data Catalog API service allows clients to discover, understand, and manage // their data. service DataCatalog { option (google.api.default_host) = "datacatalog.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"; // Searches Data Catalog for multiple resources like entries, tags that // match a query. @@ -53,7 +58,7 @@ service DataCatalog { // This is a custom method // (https://cloud.google.com/apis/design/custom_methods) and does not return // the complete resource, only the resource identifier and high level - // fields. Clients can subsequentally call `Get` methods. + // fields. Clients can subsequently call `Get` methods. // // Note that Data Catalog search queries do not guarantee full recall. Query // results that match your query may not be returned, even in subsequent @@ -126,8 +131,7 @@ service DataCatalog { // identified by the `name` parameter (see [Data Catalog Resource Project] // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for // more information). - rpc DeleteEntryGroup(DeleteEntryGroupRequest) - returns (google.protobuf.Empty) { + rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" }; @@ -135,16 +139,15 @@ service DataCatalog { } // Lists entry groups. - rpc ListEntryGroups(ListEntryGroupsRequest) - returns (ListEntryGroupsResponse) { + rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/entryGroups" }; option (google.api.method_signature) = "parent"; } - // Creates an entry. Only entries of 'FILESET' type or user-specified type can - // be created. + // Creates an entry. Only entries of types 'FILESET', 'CLUSTER', 'DATA_STREAM' + // or with a user-specified type can be created. // // Users should enable the Data Catalog API in the project identified by // the `parent` parameter (see [Data Catalog Resource Project] @@ -223,8 +226,7 @@ service DataCatalog { post: "/v1/{parent=projects/*/locations/*}/tagTemplates" body: "tag_template" }; - option (google.api.method_signature) = - "parent,tag_template_id,tag_template"; + option (google.api.method_signature) = "parent,tag_template_id,tag_template"; } // Gets a tag template. @@ -256,8 +258,7 @@ service DataCatalog { // the `name` parameter (see [Data Catalog Resource Project] // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for // more information). - rpc DeleteTagTemplate(DeleteTagTemplateRequest) - returns (google.protobuf.Empty) { + rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}" }; @@ -269,14 +270,12 @@ service DataCatalog { // [Data Catalog Resource // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) // for more information). - rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) - returns (TagTemplateField) { + rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields" body: "tag_template_field" }; - option (google.api.method_signature) = - "parent,tag_template_field_id,tag_template_field"; + option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; } // Updates a field in a tag template. This method cannot be used to update the @@ -284,15 +283,13 @@ service DataCatalog { // identified by the `name` parameter (see [Data Catalog Resource Project] // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for // more information). - rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) - returns (TagTemplateField) { + rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" body: "tag_template_field" }; option (google.api.method_signature) = "name,tag_template_field"; - option (google.api.method_signature) = - "name,tag_template_field,update_mask"; + option (google.api.method_signature) = "name,tag_template_field,update_mask"; } // Renames a field in a tag template. The user should enable the Data Catalog @@ -300,8 +297,7 @@ service DataCatalog { // Resource // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) // for more information). - rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) - returns (TagTemplateField) { + rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" body: "*" @@ -309,13 +305,22 @@ service DataCatalog { option (google.api.method_signature) = "name,new_tag_template_field_id"; } + // Renames an enum value in a tag template. The enum values have to be unique + // within one enum field. + rpc RenameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest) returns (TagTemplateField) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename" + body: "*" + }; + option (google.api.method_signature) = "name,new_enum_value_display_name"; + } + // Deletes a field in a tag template and all uses of that field. // Users should enable the Data Catalog API in the project identified by // the `name` parameter (see [Data Catalog Resource Project] // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for // more information). - rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) - returns (google.protobuf.Empty) { + rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" }; @@ -391,8 +396,7 @@ service DataCatalog { // templates. // - `datacatalog.entries.setIamPolicy` to set policies on entries. // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" body: "*" @@ -420,8 +424,7 @@ service DataCatalog { // templates. // - `datacatalog.entries.getIamPolicy` to get policies on entries. // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" body: "*" @@ -450,8 +453,7 @@ service DataCatalog { // // A caller is not required to have Google IAM permission to make this // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" body: "*" @@ -490,41 +492,15 @@ message SearchCatalogRequest { // Optional. The list of locations to search within. // 1. If empty, search will be performed in all locations; - // 2. If any of the locations are NOT in the valid locations list, error - // will be returned; + // 2. If any of the locations are NOT [supported + // regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions), + // error will be returned; // 3. Otherwise, search only the given locations for matching results. // Typical usage is to leave this field empty. When a location is // unreachable as returned in the `SearchCatalogResponse.unreachable` field, // users can repeat the search request with this parameter set to get // additional information on the error. - // - // Valid locations: - // * asia-east1 - // * asia-east2 - // * asia-northeast1 - // * asia-northeast2 - // * asia-northeast3 - // * asia-south1 - // * asia-southeast1 - // * australia-southeast1 - // * eu - // * europe-north1 - // * europe-west1 - // * europe-west2 - // * europe-west3 - // * europe-west4 - // * europe-west6 - // * global - // * northamerica-northeast1 - // * southamerica-east1 - // * us - // * us-central1 - // * us-east1 - // * us-east4 - // * us-west1 - // * us-west2 - repeated string restricted_locations = 16 - [(google.api.field_behavior) = OPTIONAL]; + repeated string restricted_locations = 16 [(google.api.field_behavior) = OPTIONAL]; } // Required. The scope of this search request. A `scope` that has empty @@ -533,8 +509,8 @@ message SearchCatalogRequest { // return an error in such a case. Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; - // Required. The query string in search query syntax. The query must be - // non-empty. + // Optional. The query string in search query syntax. An empty query string will result + // in all data assets (in the specified scope) that the user has access to. // // Query strings can be simple as "x" or more qualified as: // @@ -546,15 +522,15 @@ message SearchCatalogRequest { // matching to work correctly. See [Data Catalog Search // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) // for more information. - string query = 1 [(google.api.field_behavior) = REQUIRED]; + string query = 1 [(google.api.field_behavior) = OPTIONAL]; // Number of results in the search page. If <=0 then defaults to 10. Max limit // for page_size is 1000. Throws an invalid argument for page_size > 1000. int32 page_size = 2; // Optional. Pagination token returned in an earlier - // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], - // which indicates that this is a continuation of a prior + // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], which + // indicates that this is a continuation of a prior // [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] // call, and that the system should return the next page of data. If empty, // the first page is returned. @@ -583,19 +559,19 @@ message SearchCatalogResponse { // Unreachable locations. Search result does not include data from those // locations. Users can get additional information on the error by repeating // the search request with a more restrictive parameter -- setting the value - // for `SearchDataCatalogRequest.scope.include_locations`. + // for `SearchDataCatalogRequest.scope.restricted_locations`. repeated string unreachable = 6; } // Request message for // [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. message CreateEntryGroupRequest { - // Required. The name of the project this entry group is in. Example: + // Required. The name of the project this entry group belongs to. Example: // - // * projects/{project_id}/locations/{location} + // `projects/{project_id}/locations/{location}` // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. + // Note: The entry group itself and its child resources might not be + // stored in the location specified in its name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -603,9 +579,11 @@ message CreateEntryGroupRequest { } ]; - // Required. The id of the entry group to create. - // The id must begin with a letter or underscore, contain only English - // letters, numbers and underscores, and be at most 64 characters. + // Required. The ID of the entry group to create. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), and must start with a letter or underscore. + // The maximum size is 64 bytes when encoded in UTF-8. string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; // The entry group to create. Defaults to an empty entry group. @@ -618,8 +596,11 @@ message UpdateEntryGroupRequest { // Required. The updated entry group. "name" field must be set. EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; - // The fields to update on the entry group. If absent or empty, all modifiable - // fields are updated. + // Names of fields whose values to overwrite on an entry group. + // + // If this parameter is absent or empty, all modifiable fields + // are overwritten. If such fields are non-required and omitted in the + // request body, their values are emptied. google.protobuf.FieldMask update_mask = 2; } @@ -658,8 +639,8 @@ message DeleteEntryGroupRequest { // Request message for // [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. message ListEntryGroupsRequest { - // Required. The name of the location that contains the entry groups, which - // can be provided in URL format. Example: + // Required. The name of the location that contains the entry groups, which can be + // provided in URL format. Example: // // * projects/{project_id}/locations/{location} string parent = 1 [ @@ -669,12 +650,12 @@ message ListEntryGroupsRequest { } ]; - // Optional. The maximum number of items to return. Default is 10. Max limit - // is 1000. Throws an invalid argument for `page_size > 1000`. + // Optional. The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Token that specifies which page is requested. If empty, the first - // page is returned. + // Optional. Token that specifies which page is requested. If empty, the first page is + // returned. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -692,12 +673,12 @@ message ListEntryGroupsResponse { // Request message for // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. message CreateEntryRequest { - // Required. The name of the entry group this entry is in. Example: + // Required. The name of the entry group this entry belongs to. Example: // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}` // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. + // Note: The entry itself and its child resources might not be stored in + // the location specified in its name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -705,7 +686,11 @@ message CreateEntryRequest { } ]; - // Required. The id of the entry to create. + // Required. The ID of the entry to create. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), + // and underscores (_). + // The maximum size is 64 bytes when encoded in UTF-8. string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The entry to create. @@ -718,26 +703,30 @@ message UpdateEntryRequest { // Required. The updated entry. The "name" field must be set. Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; - // The fields to update on the entry. If absent or empty, all modifiable - // fields are updated. + // Names of fields whose values to overwrite on an entry. + // + // If this parameter is absent or empty, all modifiable fields + // are overwritten. If such fields are non-required and omitted in the + // request body, their values are emptied. // // The following fields are modifiable: + // // * For entries with type `DATA_STREAM`: // * `schema` - // * For entries with type `FILESET` + // * For entries with type `FILESET`: // * `schema` // * `display_name` // * `description` // * `gcs_fileset_spec` // * `gcs_fileset_spec.file_patterns` - // * For entries with `user_specified_type` + // * For entries with `user_specified_type`: // * `schema` // * `display_name` // * `description` - // * user_specified_type - // * user_specified_system - // * linked_resource - // * source_system_timestamps + // * `user_specified_type` + // * `user_specified_system` + // * `linked_resource` + // * `source_system_timestamps` google.protobuf.FieldMask update_mask = 2; } @@ -796,9 +785,26 @@ message LookupEntryRequest { // * `bigquery.dataset.project_id.dataset_id` // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` // - // `*_id`s shoud satisfy the standard SQL rules for identifiers. + // `*_id`s should satisfy the standard SQL rules for identifiers. // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. string sql_resource = 3; + + // Fully qualified name (FQN) of the resource. + // + // FQNs take two forms: + // + // * For non-regionalized resources: + // + // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + // + // * For regionalized resources: + // + // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + // + // Example for a DPMS table: + // + // `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id` + string fully_qualified_name = 5; } } @@ -818,15 +824,19 @@ message Entry { pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" }; - // The Data Catalog resource name of the entry in URL format. Example: + // Output only. The resource name of an entry in URL format. + // Example: // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}` // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. - string name = 1 [(google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - }]; + // Note: The entry itself and its child resources might not be + // stored in the location specified in its name. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/EntryGroup" + } + ]; // The resource this metadata entry refers to. // @@ -835,13 +845,39 @@ message Entry { // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). // For example, the `linked_resource` for a table resource from BigQuery is: // - // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // `//bigquery.googleapis.com/projects/{projectId}/datasets/{datasetId}/tables/{tableId}` // - // Output only when Entry is of type in the EntryType enum. For entries with - // user_specified_type, this field is optional and defaults to an empty - // string. + // Output only when entry is one of the types in the `EntryType` enum. + // + // For entries with a `user_specified_type`, this field is optional and + // defaults to an empty string. + // + // The resource string must contain only letters (a-z, A-Z), numbers (0-9), + // underscores (_), periods (.), colons (:), slashes (/), dashes (-), + // and hashes (#). + // The maximum size is 200 bytes when encoded in UTF-8. string linked_resource = 9; + // Fully qualified name (FQN) of the resource. Set automatically for entries + // representing resources from synced systems. Settable only during creation + // and read-only afterwards. Can be used for search and lookup of the entries. + // + // + // FQNs take two forms: + // + // * For non-regionalized resources: + // + // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + // + // * For regionalized resources: + // + // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` + // + // Example for a DPMS table: + // + // `dataproc_metastore:project_id.location_id.instance_id.database_id.table_id` + string fully_qualified_name = 29; + // Required. Entry type. oneof entry_type { // The type of the entry. @@ -863,10 +899,9 @@ message Entry { // The source system of the entry. oneof system { - // Output only. This field indicates the entry's source system that Data - // Catalog integrates with, such as BigQuery or Pub/Sub. - IntegratedSystem integrated_system = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. This field indicates the entry's source system that Data Catalog + // integrates with, such as BigQuery or Pub/Sub. + IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // This field indicates the entry's source system that Data Catalog does not // integrate with. `user_specified_system` strings must begin with a letter @@ -892,13 +927,33 @@ message Entry { BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; } - // Display information such as title and description. A short name to identify - // the entry, for example, "Analytics Data - Jan 2011". Default value is an - // empty string. + // Type- and system- specific information. Specifications for types contain + // fields common to all entries of a given type, and sub-specs with fields + // specific to a given source system. + // When extending the API with new types and systems please use this instead + // of legacy type_spec field. + oneof spec { + // Specification that applies to a table resource. Only valid + // for entries of `TABLE` type. + DatabaseTableSpec database_table_spec = 24; + } + + // Display name of an entry. + // + // The name must contain only Unicode letters, numbers (0-9), underscores (_), + // dashes (-), spaces ( ), and can't start or end with spaces. + // The maximum size is 200 bytes when encoded in UTF-8. + // Default value is an empty string. string display_name = 3; - // Entry description, which can consist of several sentences or paragraphs - // that describe entry contents. Default value is an empty string. + // Entry description that can consist of several sentences or paragraphs + // that describe entry contents. + // + // The description must not contain Unicode non-characters as well as C0 + // and C1 control codes except tabs (HT), new lines (LF), carriage returns + // (CR), and page breaks (FF). + // The maximum size is 2000 bytes when encoded in UTF-8. + // Default value is an empty string. string description = 4; // Schema of the entry. An entry might not have any schema attached to it. @@ -909,6 +964,28 @@ message Entry { // with user_specified_type, this field is optional and defaults to an empty // timestamp. SystemTimestamps source_system_timestamps = 7; + + // Output only. Physical location of the entry. + DataSource data_source = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specification that applies to a table resource. Only valid +// for entries of `TABLE` type. +message DatabaseTableSpec { + // Type of the table. + enum TableType { + // Default unknown table type. + TABLE_TYPE_UNSPECIFIED = 0; + + // Native table. + NATIVE = 1; + + // External table. + EXTERNAL = 2; + } + + // Type of this table. + TableType type = 1; } // EntryGroup Metadata. @@ -922,10 +999,10 @@ message EntryGroup { // The resource name of the entry group in URL format. Example: // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}` // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. + // Note: The entry group itself and its child resources might not be + // stored in the location specified in its name. string name = 1; // A short name to identify the entry group, for example, @@ -937,10 +1014,8 @@ message EntryGroup { // string. string description = 3; - // Output only. Timestamps about this EntryGroup. Default value is empty - // timestamps. - SystemTimestamps data_catalog_timestamps = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamps about this EntryGroup. Default value is empty timestamps. + SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for @@ -959,7 +1034,11 @@ message CreateTagTemplateRequest { } ]; - // Required. The id of the tag template to create. + // Required. The ID of the tag template to create. + // + // The ID must contain only lowercase letters (a-z), numbers (0-9), + // or underscores (_), and must start with a letter or underscore. + // The maximum size is 64 bytes when encoded in UTF-8. string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The tag template to create. @@ -986,13 +1065,12 @@ message UpdateTagTemplateRequest { // Required. The template to update. The "name" field must be set. TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; - // The field mask specifies the parts of the template to overwrite. - // - // Allowed fields: - // - // * `display_name` + // Names of fields whose values to overwrite on a tag template. Currently, + // only `display_name` can be overwritten. // - // If absent or empty, all of the allowed fields above will be updated. + // In general, if this parameter is absent or empty, all modifiable fields + // are overwritten. If such fields are non-required and omitted in the + // request body, their values are emptied. google.protobuf.FieldMask update_mask = 2; } @@ -1018,16 +1096,18 @@ message DeleteTagTemplateRequest { // Request message for // [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. message CreateTagRequest { - // Required. The name of the resource to attach this tag to. Tags can be - // attached to Entries. Example: + // Required. The name of the resource to attach this tag to. Tags can be attached to + // entries. An entry can have up to 1000 attached tags. Example: // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}` // - // Note that this Tag and its child resources may not actually be stored in - // the location in this name. + // Note: The tag and its child resources might not be stored in + // the location specified in its name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "datacatalog.googleapis.com/Tag" } + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Tag" + } ]; // Required. The tag to create. @@ -1040,8 +1120,12 @@ message UpdateTagRequest { // Required. The updated tag. The "name" field must be set. Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; - // The fields to update on the Tag. If absent or empty, all modifiable fields - // are updated. Currently the only modifiable field is the field `fields`. + // Names of fields whose values to overwrite on a tag. Currently, a tag has + // the only modifiable field with the name `fields`. + // + // In general, if this parameter is absent or empty, all modifiable fields + // are overwritten. If such fields are non-required and omitted in the + // request body, their values are emptied. google.protobuf.FieldMask update_mask = 2; } @@ -1076,15 +1160,17 @@ message CreateTagTemplateFieldRequest { ]; // Required. The ID of the tag template field to create. - // Field ids can contain letters (both uppercase and lowercase), numbers + // + // Note: Adding a required field to an existing template is *not* allowed. + // + // Field IDs can contain letters (both uppercase and lowercase), numbers // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 // character long and at most 128 characters long. Field IDs must also be // unique within their template. string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The tag template field to create. - TagTemplateField tag_template_field = 3 - [(google.api.field_behavior) = REQUIRED]; + TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for @@ -1101,25 +1187,25 @@ message UpdateTagTemplateFieldRequest { ]; // Required. The template to update. - TagTemplateField tag_template_field = 2 - [(google.api.field_behavior) = REQUIRED]; + TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The field mask specifies the parts of the template to be updated. - // Allowed fields: + // Optional. Names of fields whose values to overwrite on an individual field of a tag + // template. The following fields are modifiable: // // * `display_name` // * `type.enum_type` // * `is_required` // - // If `update_mask` is not set or empty, all of the allowed fields above will - // be updated. + // If this parameter is absent or empty, all modifiable fields + // are overwritten. If such fields are non-required and omitted in the request + // body, their values are emptied with one exception: when updating an enum + // type, the provided values are merged with the existing values. Therefore, + // enum values can only be added, existing enum values cannot be deleted or + // renamed. // - // When updating an enum type, the provided values will be merged with the - // existing values. Therefore, enum values can only be added, existing enum - // values cannot be deleted nor renamed. Updating a template field from - // optional to required is NOT allowed. - google.protobuf.FieldMask update_mask = 3 - [(google.api.field_behavior) = OPTIONAL]; + // Additionally, updating a template field from optional to required is + // *not* allowed. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for @@ -1135,11 +1221,27 @@ message RenameTagTemplateFieldRequest { } ]; - // Required. The new ID of this tag template field. For example, - // `my_new_field`. + // Required. The new ID of this tag template field. For example, `my_new_field`. string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; } +// Request message for +// [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue]. +message RenameTagTemplateFieldEnumValueRequest { + // Required. The name of the enum field value. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue" + } + ]; + + // Required. The new display name of the enum value. For example, `my_new_enum_value`. + string new_enum_value_display_name = 2 [(google.api.field_behavior) = REQUIRED]; +} + // Request message for // [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. message DeleteTagTemplateFieldRequest { @@ -1162,8 +1264,8 @@ message DeleteTagTemplateFieldRequest { // Request message for // [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. message ListTagsRequest { - // Required. The name of the Data Catalog resource to list the tags of. The - // resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an + // Required. The name of the Data Catalog resource to list the tags of. The resource + // could be an [Entry][google.cloud.datacatalog.v1.Entry] or an // [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. // // Examples: @@ -1251,11 +1353,17 @@ enum EntryType { // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro MODEL = 5; - // Output only. An entry type which is used for streaming entries. Example: + // An entry type which is used for streaming entries. Example: // Pub/Sub topic. DATA_STREAM = 3; // An entry type which is a set of files or objects. Example: // Cloud Storage fileset. FILESET = 4; + + // A database. + DATABASE = 7; + + // A service, for example, a Dataproc Metastore service. + SERVICE = 14; } diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto index bcf0ead6..01436429 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanager.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanager.proto new file mode 100644 index 00000000..cc52f7d1 --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanager.proto @@ -0,0 +1,452 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1/timestamps.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTagManagerProto"; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Policy Tag Manager API service allows clients to manage their policy tags and +// taxonomies. +// +// Policy tags are used to tag BigQuery columns and apply additional access +// control policies. A taxonomy is a hierarchical grouping of policy tags that +// classify data along a common axis. +service PolicyTagManager { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a taxonomy in a specified project. The taxonomy is initially empty, + // i.e., does not contain policy tags. + rpc CreateTaxonomy(CreateTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/taxonomies" + body: "taxonomy" + }; + option (google.api.method_signature) = "parent,taxonomy"; + } + + // Deletes a taxonomy. This method will also delete all policy tags in this + // taxonomy, their associated policies, and the policy tags references from + // BigQuery columns. + rpc DeleteTaxonomy(DeleteTaxonomyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/taxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a taxonomy. This method can update the taxonomy's display name, + // description, and activated policy types. + rpc UpdateTaxonomy(UpdateTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + patch: "/v1/{taxonomy.name=projects/*/locations/*/taxonomies/*}" + body: "taxonomy" + }; + option (google.api.method_signature) = "taxonomy"; + } + + // Lists all taxonomies in a project in a particular location that the caller + // has permission to view. + rpc ListTaxonomies(ListTaxonomiesRequest) returns (ListTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/taxonomies" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a taxonomy. + rpc GetTaxonomy(GetTaxonomyRequest) returns (Taxonomy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/taxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a policy tag in a taxonomy. + rpc CreatePolicyTag(CreatePolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" + body: "policy_tag" + }; + option (google.api.method_signature) = "parent,policy_tag"; + } + + // Deletes a policy tag. This method also deletes + // - all of its descendant policy tags, if any, + // - the policies associated with the policy tag and its descendants, and + // - references from BigQuery table schema of the policy tag and its + // descendants. + rpc DeletePolicyTag(DeletePolicyTagRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a policy tag. This method can update the policy tag's display + // name, description, and parent policy tag. + rpc UpdatePolicyTag(UpdatePolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + patch: "/v1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}" + body: "policy_tag" + }; + option (google.api.method_signature) = "policy_tag"; + } + + // Lists all policy tags in a taxonomy. + rpc ListPolicyTags(ListPolicyTagsRequest) returns (ListPolicyTagsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a policy tag. + rpc GetPolicyTag(GetPolicyTagRequest) returns (PolicyTag) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the IAM policy for a policy tag or a taxonomy. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy" + body: "*" + } + }; + } + + // Sets the IAM policy for a policy tag or a taxonomy. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy" + body: "*" + } + }; + } + + // Returns the permissions that a caller has on a specified policy tag or + // taxonomy. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions" + body: "*" + } + }; + } +} + +// A taxonomy is a collection of hierarchical policy tags that classify data +// along a common axis. For instance a "data sensitivity" taxonomy could contain +// the following policy tags: +// + PII +// + Account number +// + Age +// + SSN +// + Zipcode +// + Financials +// + Revenue +// A "data origin" taxonomy could contain the following policy tags: +// + User data +// + Employee data +// + Partner data +// + Public data +message Taxonomy { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/Taxonomy" + pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}" + }; + + // Defines policy types where the policy tags can be used for. + enum PolicyType { + // Unspecified policy type. + POLICY_TYPE_UNSPECIFIED = 0; + + // Fine-grained access control policy, which enables access control on + // tagged sub-resources. + FINE_GRAINED_ACCESS_CONTROL = 1; + } + + // Output only. Resource name of this taxonomy in format: + // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}". + // Note that taxonomy_id's are unique and generated by Policy Tag Manager. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. User-defined name of this taxonomy. It must: contain only unicode letters, + // numbers, underscores, dashes and spaces; not start or end with spaces; and + // be at most 200 bytes long when encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description of this taxonomy. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Number of policy tags contained in this taxonomy. + int32 policy_tag_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamps about this taxonomy. Only create_time and update_time are used. + SystemTimestamps taxonomy_timestamps = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A list of policy types that are activated for this taxonomy. If not set, + // defaults to an empty list. + repeated PolicyType activated_policy_types = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Denotes one policy tag in a taxonomy (e.g. ssn). Policy tags can be defined +// in a hierarchy. For example, consider the following hierarchy: +// + Geolocation +// + LatLong +// + City +// + ZipCode +// Policy tag "Geolocation" contains 3 child policy tags: "LatLong", "City", and +// "ZipCode". +message PolicyTag { + option (google.api.resource) = { + type: "datacatalog.googleapis.com/PolicyTag" + pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" + }; + + // Output only. Resource name of this policy tag in format: + // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policy_tag_id}". + // Both taxonomy_ids and policy_tag_ids are unique and generated by Policy Tag + // Manager. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. User-defined name of this policy tag. It must: be unique within the parent + // taxonomy; contain only unicode letters, numbers, underscores, dashes and + // spaces; not start or end with spaces; and be at most 200 bytes long when + // encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Description of this policy tag. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + // If not set, defaults to an empty description. + string description = 3; + + // Resource name of this policy tag's parent policy tag (e.g. for the + // "LatLong" policy tag in the example above, this field contains the + // resource name of the "Geolocation" policy tag). If empty, it means this + // policy tag is a top level policy tag (e.g. this field is empty for the + // "Geolocation" policy tag in the example above). If not set, defaults to an + // empty string. + string parent_policy_tag = 4; + + // Output only. Resource names of child policy tags of this policy tag. + repeated string child_policy_tags = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CreateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomy]. +message CreateTaxonomyRequest { + // Required. Resource name of the project that the taxonomy will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // The taxonomy to be created. + Taxonomy taxonomy = 2; +} + +// Request message for +// [DeleteTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomy]. +message DeleteTaxonomyRequest { + // Required. Resource name of the taxonomy to be deleted. All policy tags in + // this taxonomy will also be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; +} + +// Request message for +// [UpdateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomy]. +message UpdateTaxonomyRequest { + // The taxonomy to update. Only description, display_name, and activated + // policy types can be updated. + Taxonomy taxonomy = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies]. +message ListTaxonomiesRequest { + // Required. Resource name of the project to list the taxonomies of. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request, if any. If + // not set, defaults to an empty string. + string page_token = 3; +} + +// Response message for +// [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies]. +message ListTaxonomiesResponse { + // Taxonomies that the project contains. + repeated Taxonomy taxonomies = 1; + + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for +// [GetTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomy]. +message GetTaxonomyRequest { + // Required. Resource name of the requested taxonomy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; +} + +// Request message for +// [CreatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTag]. +message CreatePolicyTagRequest { + // Required. Resource name of the taxonomy that the policy tag will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/PolicyTag" + } + ]; + + // The policy tag to be created. + PolicyTag policy_tag = 2; +} + +// Request message for +// [DeletePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTag]. +message DeletePolicyTagRequest { + // Required. Resource name of the policy tag to be deleted. All of its descendant + // policy tags will also be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/PolicyTag" + } + ]; +} + +// Request message for +// [UpdatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTag]. +message UpdatePolicyTagRequest { + // The policy tag to update. Only the description, display_name, and + // parent_policy_tag fields can be updated. + PolicyTag policy_tag = 1; + + // The update mask applies to the resource. Only display_name, description and + // parent_policy_tag can be updated and thus can be listed in the mask. If + // update_mask is not provided, all allowed fields (i.e. display_name, + // description and parent) will be updated. For more information including the + // `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for +// [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags]. +message ListPolicyTagsRequest { + // Required. Resource name of the taxonomy to list the policy tags of. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/PolicyTag" + } + ]; + + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. If + // not set, defaults to an empty string. + string page_token = 3; +} + +// Response message for +// [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags]. +message ListPolicyTagsResponse { + // The policy tags that are in the requested taxonomy. + repeated PolicyTag policy_tags = 1; + + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for +// [GetPolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTag]. +message GetPolicyTagRequest { + // Required. Resource name of the requested policy tag. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/PolicyTag" + } + ]; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanagerserialization.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanagerserialization.proto new file mode 100644 index 00000000..29b1d3df --- /dev/null +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanagerserialization.proto @@ -0,0 +1,186 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.datacatalog.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/datacatalog/v1/policytagmanager.proto"; +import "google/iam/v1/policy.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.DataCatalog.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; +option java_multiple_files = true; +option java_outer_classname = "PolicyTagManagerSerializationProto"; +option java_package = "com.google.cloud.datacatalog.v1"; +option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; +option ruby_package = "Google::Cloud::DataCatalog::V1"; + +// Policy Tag Manager serialization API service allows clients to manipulate +// their policy tags and taxonomies in serialized format, where taxonomy is a +// hierarchical group of policy tags. +service PolicyTagManagerSerialization { + option (google.api.default_host) = "datacatalog.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates new taxonomies (including their policy tags) by importing from + // inlined source or cross-regional source. New taxonomies will be created in + // a given parent project. + // + // If using the cross-regional source, a new taxonomy is created by copying + // from a source in another region. + // + // If using the inlined source, this method provides a way to bulk create + // taxonomies and policy tags using nested proto structure. + rpc ImportTaxonomies(ImportTaxonomiesRequest) returns (ImportTaxonomiesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/taxonomies:import" + body: "*" + }; + } + + // Exports taxonomies as the requested type and returns the taxonomies + // including their policy tags. The requested taxonomies must belong to one + // project. + // + // SerializedTaxonomy protos with nested policy tags that are generated by + // this method can be used as input for future ImportTaxonomies calls. + rpc ExportTaxonomies(ExportTaxonomiesRequest) returns (ExportTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/taxonomies:export" + }; + } +} + +// Message representing a taxonomy, including its policy tags in hierarchy, as a +// nested proto. Used for taxonomy replacement, import, and export. +message SerializedTaxonomy { + // Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Description of the serialized taxonomy. At most 2000 bytes when encoded in + // UTF-8. If not set, defaults to an empty description. + string description = 2; + + // Top level policy tags associated with the taxonomy, if any. + repeated SerializedPolicyTag policy_tags = 3; + + // A list of policy types that are activated per taxonomy. + repeated Taxonomy.PolicyType activated_policy_types = 4; +} + +// Message representing one policy tag, including all its descendant policy +// tags, as a nested proto. +message SerializedPolicyTag { + // Resource name of the policy tag. + // + // This field will be ignored when calling ImportTaxonomies. + string policy_tag = 1; + + // Required. Display name of the policy tag. At most 200 bytes when encoded in UTF-8. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Description of the serialized policy tag. The length of the description is + // limited to 2000 bytes when encoded in UTF-8. If not set, defaults to an + // empty description. + string description = 3; + + // Children of the policy tag, if any. + repeated SerializedPolicyTag child_policy_tags = 4; +} + +// Request message for +// [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies]. +message ImportTaxonomiesRequest { + // Required. Resource name of project that the imported taxonomies will belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Source taxonomies to be imported. + oneof source { + // Inline source used for taxonomies import. + InlineSource inline_source = 2; + + // Cross-regional source taxonomy to be imported. + CrossRegionalSource cross_regional_source = 3; + } +} + +// Inline source containing taxonomies to import. +message InlineSource { + // Required. Taxonomies to be imported. + repeated SerializedTaxonomy taxonomies = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Cross-regional source used to import an existing taxonomy into a different +// region. +message CrossRegionalSource { + // Required. The resource name of the source taxonomy to be imported. + string taxonomy = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; +} + +// Response message for +// [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies]. +message ImportTaxonomiesResponse { + // Taxonomies that were imported. + repeated Taxonomy taxonomies = 1; +} + +// Request message for +// [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies]. +message ExportTaxonomiesRequest { + // Required. Resource name of the project that the exported taxonomies belong to. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Resource names of the taxonomies to be exported. + repeated string taxonomies = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/Taxonomy" + } + ]; + + // Required. Taxonomies export destination. + oneof destination { + // Export taxonomies as serialized taxonomies, which contain all the policy + // tags as nested protos. + bool serialized_taxonomies = 3; + } +} + +// Response message for +// [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies]. +message ExportTaxonomiesResponse { + // List of taxonomies and policy tags as nested protos. + repeated SerializedTaxonomy taxonomies = 1; +} diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto index c34d99e2..24f7fb88 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -28,25 +28,37 @@ option ruby_package = "Google::Cloud::DataCatalog::V1"; // Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). message Schema { - // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be - // specified. - repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; + // The unified GoogleSQL-like schema of columns. + // + // The overall maximum number of columns and nested columns is 10,000. + // The maximum nested depth is 15 levels. + repeated ColumnSchema columns = 2; } // Representation of a column within a schema. Columns could be nested inside // other columns. message ColumnSchema { // Required. Name of the column. + // + // Must be a UTF-8 string without dots (.). + // The maximum size is 64 bytes. string column = 6 [(google.api.field_behavior) = REQUIRED]; // Required. Type of the column. + // + // Must be a UTF-8 string with the maximum size of 128 bytes. string type = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Description of the column. Default value is an empty string. + // + // The description must be a UTF-8 string with the maximum size of 2000 + // bytes. string description = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A column's mode indicates whether the values in this column are required, - // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. + // Optional. A column's mode indicates if values in this column are required, + // nullable, or repeated. + // + // Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. // Default mode is `NULLABLE`. string mode = 3 [(google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto index 37f6923b..09373923 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -55,6 +55,9 @@ message SearchCatalogResult { // * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` string linked_resource = 4; + // Last-modified timestamp of the entry from the managing system. + google.protobuf.Timestamp modify_time = 7; + // The source system of the entry. Only applicable when `search_result_type` // is ENTRY. oneof system { @@ -66,6 +69,17 @@ message SearchCatalogResult { // integrate with. string user_specified_system = 9; } + + // Fully Qualified Name of the resource. + // There are two main forms of FQNs: + // {system}:{project}.{dot-separated path to resource} + // for non-regionalized resources + // {system}:{project}.{location id}.{dot-separated path to resource} + // for regionalized resources + // Examples: + // * dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId + // * bigquery:table.project_id.dataset_id.table_id + string fully_qualified_name = 10; } // The different types of resources that can be returned in search. diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto index c87afc54..43ce0df1 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -54,6 +54,9 @@ enum TableSourceType { // BigQuery native table. BIGQUERY_TABLE = 5; + + // BigQuery materialized view. + BIGQUERY_MATERIALIZED_VIEW = 7; } // Table view specification. diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto index 4efefa52..9ef2e452 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/tags.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -42,15 +42,17 @@ message Tag { // The resource name of the tag in URL format. Example: // - // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}` // // where `tag_id` is a system-generated identifier. - // Note that this Tag may not actually be stored in the location in this name. + // + // Note: The tag itself might not be stored in the location specified in its + // name. string name = 1; // Required. The resource name of the tag template that this tag uses. Example: // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}` // // This field cannot be modified after creation. string template = 2 [(google.api.field_behavior) = REQUIRED]; @@ -63,13 +65,11 @@ message Tag { // Deleting the scope from the parent resource will delete all tags attached // to that scope. These fields cannot be updated after creation. oneof scope { - // Resources like Entry can have schemas associated with them. This scope + // Resources like entry can have schemas associated with them. This scope // allows users to attach tags to an individual column based on that schema. // - // For attaching a tag to a nested column, use `.` to separate the column - // names. Example: - // - // * `outer_column.inner_column` + // To attach a tag to a nested column, separate column names with a dot + // (`.`). Example: `column.nested_column`. string column = 4; } @@ -97,6 +97,7 @@ message TagField { double double_value = 2; // Holds the value for a tag field with string type. + // The maximum length is 2000 UTF-8 characters. string string_value = 3; // Holds the value for a tag field with boolean type. @@ -134,13 +135,17 @@ message TagTemplate { // The resource name of the tag template in URL format. Example: // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // `projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}` // - // Note that this TagTemplate and its child resources may not actually be - // stored in the location in this name. + // Note: The tag template itself and its child resources might not be + // stored in the location specified in its name. string name = 1; - // The display name for this template. Defaults to an empty string. + // Display name for this template. Defaults to an empty string. + // + // The name must contain only Unicode letters, numbers (0-9), underscores (_), + // dashes (-), spaces ( ), and can't start or end with spaces. + // The maximum length is 200 characters. string display_name = 2; // Required. Map of tag template field IDs to the settings for the field. @@ -163,13 +168,21 @@ message TagTemplateField { // Output only. The resource name of the tag template field in URL format. Example: // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + // `projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field}` + // + // Note: The `TagTemplateField` itself might not be stored in the location + // specified in its name. // - // Note that this TagTemplateField may not actually be stored in the location - // in this name. + // The name must contain only letters (a-z, A-Z), numbers (0-9), + // or underscores (_), and must start with a letter or underscore. + // The maximum length is 64 characters. string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // The display name for this field. Defaults to an empty string. + // + // The name must contain only Unicode letters, numbers (0-9), underscores (_), + // dashes (-), spaces ( ), and can't start or end with spaces. + // The maximum length is 200 characters. string display_name = 1; // Required. The type of value this tag field can contain. @@ -178,6 +191,9 @@ message TagTemplateField { // Whether this is a required field. Defaults to false. bool is_required = 3; + // The description for this field. Defaults to an empty string. + string description = 4; + // The order of this field with respect to other fields in this tag // template. For example, a higher value can indicate a more important field. // The value can be negative. Multiple fields can have the same order, and @@ -189,15 +205,22 @@ message FieldType { message EnumType { message EnumValue { // Required. The display name of the enum value. Must not be an empty string. + // + // The name must contain only Unicode letters, numbers (0-9), underscores + // (_), dashes (-), spaces ( ), and can't start or end with spaces. The + // maximum length is 200 characters. string display_name = 1 [(google.api.field_behavior) = REQUIRED]; } - // Required on create; optional on update. The set of allowed values for - // this enum. This set must not be empty, the display names of the values in - // this set must not be empty and the display names of the values must be - // case-insensitively unique within this set. Currently, enum values can - // only be added to the list of allowed values. Deletion and renaming of - // enum values are not supported. Can have up to 500 allowed values. + // The set of allowed values for this enum. + // + // This set must not be empty and can include up to 100 allowed values. + // The display names of the values in this set must not be empty and must + // be case-insensitively unique within this set. + // + // The order of items in this set is preserved. This field can be used to + // create, remove and reorder enum values. To rename enum values, use the + // `RenameTagTemplateFieldEnumValue` method. repeated EnumValue allowed_values = 1; } diff --git a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto index a4372ae3..6566ce68 100644 --- a/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto +++ b/proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/timestamps.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/synth.metadata b/synth.metadata index b5556513..8472efd8 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1305ca41d554eb0725237561e34129373bb8cbc1", - "internalRef": "362856902" + "sha": "a1ab4d44db02d59ff58810c6d4182d84e4b9abaa", + "internalRef": "365620142" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1305ca41d554eb0725237561e34129373bb8cbc1", - "internalRef": "362856902" + "sha": "a1ab4d44db02d59ff58810c6d4182d84e4b9abaa", + "internalRef": "365620142" } }, { @@ -120,12 +120,24 @@ "codecov.yaml", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogSettings.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClient.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClient.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationSettings.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSettings.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/gapic_metadata.json", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStub.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/DataCatalogStubSettings.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogCallableFactory.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcDataCatalogStub.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerCallableFactory.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationCallableFactory.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerSerializationStub.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/GrpcPolicyTagManagerStub.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStub.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerSerializationStubSettings.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStub.java", + "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/stub/PolicyTagManagerStubSettings.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogSettings.java", "google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClient.java", @@ -149,6 +161,12 @@ "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/DataCatalogClientTest.java", "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalog.java", "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockDataCatalogImpl.java", + "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManager.java", + "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerImpl.java", + "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerialization.java", + "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/MockPolicyTagManagerSerializationImpl.java", + "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerClientTest.java", + "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationClientTest.java", "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClientTest.java", "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalog.java", "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/MockDataCatalogImpl.java", @@ -159,6 +177,8 @@ "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClientTest.java", "google-cloud-datacatalog/src/test/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSerializationClientTest.java", "grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogGrpc.java", + "grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerGrpc.java", + "grpc-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationGrpc.java", "grpc-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogGrpc.java", "grpc-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerGrpc.java", "grpc-google-cloud-datacatalog-v1beta1/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSerializationGrpc.java", @@ -175,23 +195,38 @@ "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryGroupRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateEntryRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreatePolicyTagRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateFieldRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTagTemplateRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CreateTaxonomyRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSource.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/CrossRegionalSourceOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSource.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DataSourceProto.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpec.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DatabaseTableSpecOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Datacatalog.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryGroupRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteEntryRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeletePolicyTagRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateFieldRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTagTemplateRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/DeleteTaxonomyRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Entry.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroup.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryGroupName.java", @@ -199,6 +234,10 @@ "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryName.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/EntryType.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponse.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ExportTaxonomiesResponseOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldType.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/FieldTypeOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GcsFileSpec.java", @@ -210,8 +249,18 @@ "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryGroupRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetEntryRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetPolicyTagRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTagTemplateRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/GetTaxonomyRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponse.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ImportTaxonomiesResponseOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSource.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/InlineSourceOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/IntegratedSystem.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntriesRequestOrBuilder.java", @@ -221,13 +270,28 @@ "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponse.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListEntryGroupsResponseOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponse.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListPolicyTagsResponseOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponse.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTagsResponseOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponse.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ListTaxonomiesResponseOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LocationName.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/LookupEntryRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTag.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerProto.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagManagerSerializationProto.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagName.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/PolicyTagOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldEnumValueRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/RenameTagTemplateFieldRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Schema.java", @@ -241,6 +305,10 @@ "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResult.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchCatalogResultOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SearchResultType.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTag.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedPolicyTagOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomy.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SerializedTaxonomyOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestamps.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/SystemTimestampsOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TableSourceType.java", @@ -254,27 +322,38 @@ "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplate.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateField.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldEnumValueName.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldName.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateFieldOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateName.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TagTemplateOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Tags.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Taxonomy.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyName.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/TaxonomyOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/Timestamps.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryGroupRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateEntryRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdatePolicyTagRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateFieldRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequest.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTagTemplateRequestOrBuilder.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequest.java", + "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/UpdateTaxonomyRequestOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpec.java", "proto-google-cloud-datacatalog-v1/src/main/java/com/google/cloud/datacatalog/v1/ViewSpecOrBuilder.java", "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/common.proto", + "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/data_source.proto", "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/datacatalog.proto", "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/gcs_fileset_spec.proto", + "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanager.proto", + "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/policytagmanagerserialization.proto", "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/schema.proto", "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/search.proto", "proto-google-cloud-datacatalog-v1/src/main/proto/google/cloud/datacatalog/v1/table_spec.proto",