From df20cd9897e20ad6b3873817fc6053b6258f7c7b Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 22 Oct 2019 00:50:05 -0700 Subject: [PATCH 1/2] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- .kokoro/build.sh | 10 +- .kokoro/coerce_logs.sh | 38 + .kokoro/continuous/common.cfg | 1 + .kokoro/nightly/common.cfg | 1 + .kokoro/presubmit/clirr.cfg | 13 + .kokoro/presubmit/common.cfg | 1 + .kokoro/release/snapshot.sh | 5 +- .kokoro/release/stage.sh | 1 + .../com/google/cloud/asset/v1/AssetProto.java | 51 +- .../cloud/asset/v1/AssetServiceProto.java | 121 ++- .../v1/BatchGetAssetsHistoryRequest.java | 157 ++- ...BatchGetAssetsHistoryRequestOrBuilder.java | 44 +- .../cloud/asset/v1/BigQueryDestination.java | 898 ++++++++++++++++++ .../v1/BigQueryDestinationOrBuilder.java | 91 ++ .../google/cloud/asset/v1/ContentType.java | 44 + .../cloud/asset/v1/ExportAssetsRequest.java | 154 +-- .../v1/ExportAssetsRequestOrBuilder.java | 44 +- .../google/cloud/asset/v1/GcsDestination.java | 246 +++++ .../asset/v1/GcsDestinationOrBuilder.java | 37 + .../google/cloud/asset/v1/OutputConfig.java | 330 +++++++ .../cloud/asset/v1/OutputConfigOrBuilder.java | 40 + .../google/cloud/asset/v1/asset_service.proto | 87 +- .../proto/google/cloud/asset/v1/assets.proto | 8 +- synth.metadata | 12 +- 24 files changed, 2219 insertions(+), 215 deletions(-) create mode 100755 .kokoro/coerce_logs.sh create mode 100644 .kokoro/presubmit/clirr.cfg create mode 100644 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java create mode 100644 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 2ffb5ef7f..fa132f410 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -26,6 +26,7 @@ echo ${JOB_TYPE} mvn install -B -V \ -DskipTests=true \ + -Dclirr.skip=true \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true \ -T 1C @@ -37,8 +38,9 @@ fi case ${JOB_TYPE} in test) - mvn test -B + mvn test -B -Dclirr.skip=true bash ${KOKORO_GFILE_DIR}/codecov.sh + bash .kokoro/coerce_logs.sh ;; lint) mvn com.coveo:fmt-maven-plugin:check @@ -47,7 +49,11 @@ javadoc) mvn javadoc:javadoc javadoc:test-javadoc ;; integration) - mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify + mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -Dclirr.skip=true -fae verify + bash .kokoro/coerce_logs.sh + ;; +clirr) + mvn -B clirr:check ;; *) ;; diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 000000000..5cf7ba49e --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright 2019 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. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + echo "processing ${xml}" + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg index 777dcfe50..28df2685a 100644 --- a/.kokoro/continuous/common.cfg +++ b/.kokoro/continuous/common.cfg @@ -4,6 +4,7 @@ action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" } } diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg index 777dcfe50..28df2685a 100644 --- a/.kokoro/nightly/common.cfg +++ b/.kokoro/nightly/common.cfg @@ -4,6 +4,7 @@ action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" } } diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 000000000..ec572442e --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg index aa090e671..9d5e99e7a 100644 --- a/.kokoro/presubmit/common.cfg +++ b/.kokoro/presubmit/common.cfg @@ -4,6 +4,7 @@ action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" } } diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh index bf738c56d..098168a73 100755 --- a/.kokoro/release/snapshot.sh +++ b/.kokoro/release/snapshot.sh @@ -19,6 +19,9 @@ source $(dirname "$0")/common.sh MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml pushd $(dirname "$0")/../../ +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + setup_environment_secrets create_settings_xml_file "settings.xml" @@ -27,4 +30,4 @@ mvn clean install deploy -B \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} \ No newline at end of file + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index b1b1b01c6..3c482cbc5 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -28,6 +28,7 @@ create_settings_xml_file "settings.xml" mvn clean install deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java index 84b09d4f2..e29165900 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java @@ -54,27 +54,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n\"google/cloud/asset/v1/assets.proto\022\025go" + "ogle.cloud.asset.v1\032\034google/api/annotati" - + "ons.proto\032\032google/iam/v1/policy.proto\032\031g" - + "oogle/protobuf/any.proto\032\034google/protobu" - + "f/struct.proto\032\037google/protobuf/timestam" - + "p.proto\"\200\001\n\rTemporalAsset\0221\n\006window\030\001 \001(" - + "\0132!.google.cloud.asset.v1.TimeWindow\022\017\n\007" - + "deleted\030\002 \001(\010\022+\n\005asset\030\003 \001(\0132\034.google.cl" - + "oud.asset.v1.Asset\"j\n\nTimeWindow\022.\n\nstar" - + "t_time\030\001 \001(\0132\032.google.protobuf.Timestamp" - + "\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf.Tim" - + "estamp\"\207\001\n\005Asset\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_" - + "type\030\002 \001(\t\0221\n\010resource\030\003 \001(\0132\037.google.cl" - + "oud.asset.v1.Resource\022)\n\niam_policy\030\004 \001(" - + "\0132\025.google.iam.v1.Policy\"\240\001\n\010Resource\022\017\n" - + "\007version\030\001 \001(\t\022\036\n\026discovery_document_uri" - + "\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014resour" - + "ce_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001" - + "(\0132\027.google.protobuf.StructB\225\001\n\031com.goog" - + "le.cloud.asset.v1B\nAssetProtoP\001Z:google." - + "golang.org/genproto/googleapis/cloud/ass" - + "et/v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Go" - + "ogle\\Cloud\\Asset\\V1b\006proto3" + + "ons.proto\032\031google/api/resource.proto\032\032go" + + "ogle/iam/v1/policy.proto\032\031google/protobu" + + "f/any.proto\032\034google/protobuf/struct.prot" + + "o\032\037google/protobuf/timestamp.proto\"\200\001\n\rT" + + "emporalAsset\0221\n\006window\030\001 \001(\0132!.google.cl" + + "oud.asset.v1.TimeWindow\022\017\n\007deleted\030\002 \001(\010" + + "\022+\n\005asset\030\003 \001(\0132\034.google.cloud.asset.v1." + + "Asset\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\022,\n\010end_time\030" + + "\002 \001(\0132\032.google.protobuf.Timestamp\"\260\001\n\005As" + + "set\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0221\n" + + "\010resource\030\003 \001(\0132\037.google.cloud.asset.v1." + + "Resource\022)\n\niam_policy\030\004 \001(\0132\025.google.ia" + + "m.v1.Policy:\'\352A$\n\037cloudasset.googleapis." + + "com/Asset\022\001*\"\240\001\n\010Resource\022\017\n\007version\030\001 \001" + + "(\t\022\036\n\026discovery_document_uri\030\002 \001(\t\022\026\n\016di" + + "scovery_name\030\003 \001(\t\022\024\n\014resource_url\030\004 \001(\t" + + "\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001(\0132\027.google." + + "protobuf.StructB\230\001\n\031com.google.cloud.ass" + + "et.v1B\nAssetProtoP\001Z:google.golang.org/g" + + "enproto/googleapis/cloud/asset/v1;asset\370" + + "\001\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\Clou" + + "d\\Asset\\V1b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -88,6 +90,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.iam.v1.PolicyProto.getDescriptor(), com.google.protobuf.AnyProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), @@ -126,7 +129,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.iam.v1.PolicyProto.getDescriptor(); com.google.protobuf.AnyProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java index 1a00bb6d1..12110278d 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java @@ -51,6 +51,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_GcsDestination_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -62,43 +66,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n)google/cloud/asset/v1/asset_service.pr" + "oto\022\025google.cloud.asset.v1\032\034google/api/a" - + "nnotations.proto\032\"google/cloud/asset/v1/" - + "assets.proto\032#google/longrunning/operati" - + "ons.proto\032\037google/protobuf/timestamp.pro" - + "to\"\337\001\n\023ExportAssetsRequest\022\016\n\006parent\030\001 \001" - + "(\t\022-\n\tread_time\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\022\023\n\013asset_types\030\003 \003(\t\0228\n\014conten" - + "t_type\030\004 \001(\0162\".google.cloud.asset.v1.Con" - + "tentType\022:\n\routput_config\030\005 \001(\0132#.google" - + ".cloud.asset.v1.OutputConfig\"\201\001\n\024ExportA" - + "ssetsResponse\022-\n\tread_time\030\001 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022:\n\routput_config\030\002 " - + "\001(\0132#.google.cloud.asset.v1.OutputConfig" - + "\"\272\001\n\034BatchGetAssetsHistoryRequest\022\016\n\006par" - + "ent\030\001 \001(\t\022\023\n\013asset_names\030\002 \003(\t\0228\n\014conten" - + "t_type\030\003 \001(\0162\".google.cloud.asset.v1.Con" - + "tentType\022;\n\020read_time_window\030\004 \001(\0132!.goo" - + "gle.cloud.asset.v1.TimeWindow\"U\n\035BatchGe" - + "tAssetsHistoryResponse\0224\n\006assets\030\001 \003(\0132$" - + ".google.cloud.asset.v1.TemporalAsset\"_\n\014" - + "OutputConfig\022@\n\017gcs_destination\030\001 \001(\0132%." - + "google.cloud.asset.v1.GcsDestinationH\000B\r" - + "\n\013destination\"-\n\016GcsDestination\022\r\n\003uri\030\001" - + " \001(\tH\000B\014\n\nobject_uri*I\n\013ContentType\022\034\n\030C" - + "ONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022" - + "\016\n\nIAM_POLICY\020\0022\311\002\n\014AssetService\022\203\001\n\014Exp" - + "ortAssets\022*.google.cloud.asset.v1.Export" - + "AssetsRequest\032\035.google.longrunning.Opera" - + "tion\"(\202\323\344\223\002\"\"\035/v1/{parent=*/*}:exportAss" - + "ets:\001*\022\262\001\n\025BatchGetAssetsHistory\0223.googl" - + "e.cloud.asset.v1.BatchGetAssetsHistoryRe" - + "quest\0324.google.cloud.asset.v1.BatchGetAs" - + "setsHistoryResponse\".\202\323\344\223\002(\022&/v1/{parent" - + "=*/*}:batchGetAssetsHistoryB\234\001\n\031com.goog" - + "le.cloud.asset.v1B\021AssetServiceProtoP\001Z:" - + "google.golang.org/genproto/googleapis/cl" - + "oud/asset/v1;asset\252\002\025Google.Cloud.Asset." - + "V1\312\002\025Google\\Cloud\\Asset\\V1b\006proto3" + + "nnotations.proto\032\027google/api/client.prot" + + "o\032\037google/api/field_behavior.proto\032\031goog" + + "le/api/resource.proto\032\"google/cloud/asse" + + "t/v1/assets.proto\032#google/longrunning/op" + + "erations.proto\032\033google/protobuf/empty.pr" + + "oto\032 google/protobuf/field_mask.proto\032\037g" + + "oogle/protobuf/timestamp.proto\"\215\002\n\023Expor" + + "tAssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037" + + "cloudasset.googleapis.com/Asset\022-\n\tread_" + + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\023" + + "\n\013asset_types\030\003 \003(\t\0228\n\014content_type\030\004 \001(" + + "\0162\".google.cloud.asset.v1.ContentType\022?\n" + + "\routput_config\030\005 \001(\0132#.google.cloud.asse" + + "t.v1.OutputConfigB\003\340A\002\"\201\001\n\024ExportAssetsR" + + "esponse\022-\n\tread_time\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022:\n\routput_config\030\002 \001(\0132#." + + "google.cloud.asset.v1.OutputConfig\"\355\001\n\034B" + + "atchGetAssetsHistoryRequest\0227\n\006parent\030\001 " + + "\001(\tB\'\340A\002\372A!\022\037cloudasset.googleapis.com/A" + + "sset\022\023\n\013asset_names\030\002 \003(\t\022=\n\014content_typ" + + "e\030\003 \001(\0162\".google.cloud.asset.v1.ContentT" + + "ypeB\003\340A\001\022@\n\020read_time_window\030\004 \001(\0132!.goo" + + "gle.cloud.asset.v1.TimeWindowB\003\340A\001\"U\n\035Ba" + + "tchGetAssetsHistoryResponse\0224\n\006assets\030\001 " + + "\003(\0132$.google.cloud.asset.v1.TemporalAsse" + + "t\"\253\001\n\014OutputConfig\022@\n\017gcs_destination\030\001 " + + "\001(\0132%.google.cloud.asset.v1.GcsDestinati" + + "onH\000\022J\n\024bigquery_destination\030\002 \001(\0132*.goo" + + "gle.cloud.asset.v1.BigQueryDestinationH\000" + + "B\r\n\013destination\"C\n\016GcsDestination\022\r\n\003uri" + + "\030\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 \001(\tH\000B\014\n\nobject" + + "_uri\"N\n\023BigQueryDestination\022\024\n\007dataset\030\001" + + " \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003" + + " \001(\010*l\n\013ContentType\022\034\n\030CONTENT_TYPE_UNSP" + + "ECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY\020\002\022" + + "\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020\0052\363\003\n\014A" + + "ssetService\022\336\001\n\014ExportAssets\022*.google.cl" + + "oud.asset.v1.ExportAssetsRequest\032\035.googl" + + "e.longrunning.Operation\"\202\001\202\323\344\223\002\"\"\035/v1/{p" + + "arent=*/*}:exportAssets:\001*\312AW\n*google.cl" + + "oud.asset.v1.ExportAssetsResponse\022)googl" + + "e.cloud.asset.v1.ExportAssetsRequest\022\262\001\n" + + "\025BatchGetAssetsHistory\0223.google.cloud.as" + + "set.v1.BatchGetAssetsHistoryRequest\0324.go" + + "ogle.cloud.asset.v1.BatchGetAssetsHistor" + + "yResponse\".\202\323\344\223\002(\022&/v1/{parent=*/*}:batc" + + "hGetAssetsHistory\032M\312A\031cloudasset.googlea" + + "pis.com\322A.https://www.googleapis.com/aut" + + "h/cloud-platformB\234\001\n\031com.google.cloud.as" + + "set.v1B\021AssetServiceProtoP\001Z:google.gola" + + "ng.org/genproto/googleapis/cloud/asset/v" + + "1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Google" + + "\\Cloud\\Asset\\V1b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -112,8 +132,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( 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.asset.v1.AssetProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }, assigner); @@ -155,7 +180,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_OutputConfig_descriptor, new java.lang.String[] { - "GcsDestination", "Destination", + "GcsDestination", "BigqueryDestination", "Destination", }); internal_static_google_cloud_asset_v1_GcsDestination_descriptor = getDescriptor().getMessageTypes().get(5); @@ -163,16 +188,34 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_GcsDestination_descriptor, new java.lang.String[] { - "Uri", "ObjectUri", + "Uri", "UriPrefix", "ObjectUri", + }); + internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor, + new java.lang.String[] { + "Dataset", "Table", "Force", }); 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); + registry.add(com.google.longrunning.OperationsProto.operationInfo); 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.asset.v1.AssetProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java index f860e54d1..326a041c1 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java @@ -156,7 +156,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public java.lang.String getParent() { java.lang.Object ref = parent_; @@ -178,7 +180,9 @@ public java.lang.String getParent() { * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; @@ -202,7 +206,8 @@ public com.google.protobuf.ByteString getParentBytes() { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -221,7 +226,8 @@ public com.google.protobuf.ProtocolStringList getAssetNamesList() { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -240,7 +246,8 @@ public int getAssetNamesCount() { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -259,7 +266,8 @@ public java.lang.String getAssetNames(int index) { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -277,10 +285,12 @@ public com.google.protobuf.ByteString getAssetNamesBytes(int index) { * * *
-   * Required. The content type.
+   * Optional. The content type.
    * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getContentTypeValue() { return contentType_; @@ -289,10 +299,12 @@ public int getContentTypeValue() { * * *
-   * Required. The content type.
+   * Optional. The content type.
    * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.cloud.asset.v1.ContentType getContentType() { @SuppressWarnings("deprecation") @@ -315,7 +327,9 @@ public com.google.cloud.asset.v1.ContentType getContentType() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public boolean hasReadTimeWindow() { return readTimeWindow_ != null; @@ -332,7 +346,9 @@ public boolean hasReadTimeWindow() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { return readTimeWindow_ == null @@ -351,7 +367,9 @@ public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { return getReadTimeWindow(); @@ -769,7 +787,9 @@ public Builder mergeFrom( * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public java.lang.String getParent() { java.lang.Object ref = parent_; @@ -791,7 +811,9 @@ public java.lang.String getParent() { * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; @@ -813,7 +835,9 @@ public com.google.protobuf.ByteString getParentBytes() { * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public Builder setParent(java.lang.String value) { if (value == null) { @@ -833,7 +857,9 @@ public Builder setParent(java.lang.String value) { * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public Builder clearParent() { @@ -850,7 +876,9 @@ public Builder clearParent() { * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public Builder setParentBytes(com.google.protobuf.ByteString value) { if (value == null) { @@ -880,7 +908,8 @@ private void ensureAssetNamesIsMutable() { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -899,7 +928,8 @@ public com.google.protobuf.ProtocolStringList getAssetNamesList() { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -918,7 +948,8 @@ public int getAssetNamesCount() { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -937,7 +968,8 @@ public java.lang.String getAssetNames(int index) { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -956,7 +988,8 @@ public com.google.protobuf.ByteString getAssetNamesBytes(int index) { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -981,7 +1014,8 @@ public Builder setAssetNames(int index, java.lang.String value) { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -1006,7 +1040,8 @@ public Builder addAssetNames(java.lang.String value) { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -1028,7 +1063,8 @@ public Builder addAllAssetNames(java.lang.Iterable values) { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -1050,7 +1086,8 @@ public Builder clearAssetNames() { * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -1074,10 +1111,12 @@ public Builder addAssetNamesBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The content type.
+     * Optional. The content type.
      * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getContentTypeValue() { return contentType_; @@ -1086,10 +1125,12 @@ public int getContentTypeValue() { * * *
-     * Required. The content type.
+     * Optional. The content type.
      * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setContentTypeValue(int value) { contentType_ = value; @@ -1100,10 +1141,12 @@ public Builder setContentTypeValue(int value) { * * *
-     * Required. The content type.
+     * Optional. The content type.
      * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.cloud.asset.v1.ContentType getContentType() { @SuppressWarnings("deprecation") @@ -1115,10 +1158,12 @@ public com.google.cloud.asset.v1.ContentType getContentType() { * * *
-     * Required. The content type.
+     * Optional. The content type.
      * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { if (value == null) { @@ -1133,10 +1178,12 @@ public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { * * *
-     * Required. The content type.
+     * Optional. The content type.
      * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearContentType() { @@ -1163,7 +1210,9 @@ public Builder clearContentType() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public boolean hasReadTimeWindow() { return readTimeWindowBuilder_ != null || readTimeWindow_ != null; @@ -1180,7 +1229,9 @@ public boolean hasReadTimeWindow() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { if (readTimeWindowBuilder_ == null) { @@ -1203,7 +1254,9 @@ public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { if (readTimeWindowBuilder_ == null) { @@ -1230,7 +1283,9 @@ public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow.Builder builderForValue) { if (readTimeWindowBuilder_ == null) { @@ -1254,7 +1309,9 @@ public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow.Builder bu * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { if (readTimeWindowBuilder_ == null) { @@ -1285,7 +1342,9 @@ public Builder mergeReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearReadTimeWindow() { if (readTimeWindowBuilder_ == null) { @@ -1310,7 +1369,9 @@ public Builder clearReadTimeWindow() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.cloud.asset.v1.TimeWindow.Builder getReadTimeWindowBuilder() { @@ -1329,7 +1390,9 @@ public com.google.cloud.asset.v1.TimeWindow.Builder getReadTimeWindowBuilder() { * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { if (readTimeWindowBuilder_ != null) { @@ -1352,7 +1415,9 @@ public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder( * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.asset.v1.TimeWindow, diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java index 086479283..b7b53eb69 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java @@ -32,7 +32,9 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ java.lang.String getParent(); /** @@ -44,7 +46,9 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * "projects/my-project-id")", or a project number (such as "projects/12345"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ com.google.protobuf.ByteString getParentBytes(); @@ -56,7 +60,8 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -73,7 +78,8 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -90,7 +96,8 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -107,7 +114,8 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. * See [Resource * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - * and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + * and [Resource Name + * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) * for more info. * The request becomes a no-op if the asset name list is empty, and the max * size of the asset name list is 100 in one request. @@ -121,20 +129,24 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * * *
-   * Required. The content type.
+   * Optional. The content type.
    * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getContentTypeValue(); /** * * *
-   * Required. The content type.
+   * Optional. The content type.
    * 
* - * .google.cloud.asset.v1.ContentType content_type = 3; + * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.cloud.asset.v1.ContentType getContentType(); @@ -150,7 +162,9 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ boolean hasReadTimeWindow(); /** @@ -165,7 +179,9 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.cloud.asset.v1.TimeWindow getReadTimeWindow(); /** @@ -180,7 +196,9 @@ public interface BatchGetAssetsHistoryRequestOrBuilder * read_time_window. * * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4; + * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java new file mode 100644 index 000000000..830be2ca6 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java @@ -0,0 +1,898 @@ +/* + * Copyright 2019 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/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * A BigQuery destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BigQueryDestination} + */ +public final class BigQueryDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BigQueryDestination) + BigQueryDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryDestination.newBuilder() to construct. + private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryDestination() { + dataset_ = ""; + table_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryDestination( + 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(); + + dataset_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + table_ = s; + break; + } + case 24: + { + force_ = 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 { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BigQueryDestination.class, + com.google.cloud.asset.v1.BigQueryDestination.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_FIELD_NUMBER = 2; + private volatile java.lang.Object table_; + /** + * + * + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_; + /** + * + * + *
+   * If the destination table already exists and this flag is `TRUE`, the
+   * table will be overwritten by the contents of assets snapshot. If the flag
+   * is not set and the destination table already exists, the export call
+   * returns an error.
+   * 
+ * + * bool force = 3; + */ + public boolean getForce() { + return force_; + } + + 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 (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!getTableBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!getTableBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + 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.asset.v1.BigQueryDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BigQueryDestination other = + (com.google.cloud.asset.v1.BigQueryDestination) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getTable().equals(other.getTable())) return false; + if (getForce() != other.getForce()) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.BigQueryDestination 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.asset.v1.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.BigQueryDestination 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.asset.v1.BigQueryDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.BigQueryDestination 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.asset.v1.BigQueryDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.BigQueryDestination 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.asset.v1.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.BigQueryDestination 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.asset.v1.BigQueryDestination 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 BigQuery destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BigQueryDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BigQueryDestination) + com.google.cloud.asset.v1.BigQueryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BigQueryDestination.class, + com.google.cloud.asset.v1.BigQueryDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BigQueryDestination.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(); + dataset_ = ""; + + table_ = ""; + + force_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination build() { + com.google.cloud.asset.v1.BigQueryDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination buildPartial() { + com.google.cloud.asset.v1.BigQueryDestination result = + new com.google.cloud.asset.v1.BigQueryDestination(this); + result.dataset_ = dataset_; + result.table_ = table_; + result.force_ = force_; + 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.asset.v1.BigQueryDestination) { + return mergeFrom((com.google.cloud.asset.v1.BigQueryDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BigQueryDestination other) { + if (other == com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getTable().isEmpty()) { + table_ = other.table_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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.asset.v1.BigQueryDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BigQueryDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object table_ = ""; + /** + * + * + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + table_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearTable() { + + table_ = getDefaultInstance().getTable(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + table_ = value; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is not set and the destination table already exists, the export call
+     * returns an error.
+     * 
+ * + * bool force = 3; + */ + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is not set and the destination table already exists, the export call
+     * returns an error.
+     * 
+ * + * bool force = 3; + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is not set and the destination table already exists, the export call
+     * returns an error.
+     * 
+ * + * bool force = 3; + */ + public Builder clearForce() { + + force_ = false; + 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.asset.v1.BigQueryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BigQueryDestination) + private static final com.google.cloud.asset.v1.BigQueryDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BigQueryDestination(); + } + + public static com.google.cloud.asset.v1.BigQueryDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDestination(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.asset.v1.BigQueryDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java new file mode 100644 index 000000000..e55c4d1da --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2019 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/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface BigQueryDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BigQueryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + java.lang.String getTable(); + /** + * + * + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * If the destination table already exists and this flag is `TRUE`, the
+   * table will be overwritten by the contents of assets snapshot. If the flag
+   * is not set and the destination table already exists, the export call
+   * returns an error.
+   * 
+ * + * bool force = 3; + */ + boolean getForce(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java index 7b2cb1efb..277c28b5f 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java @@ -58,6 +58,26 @@ public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { * IAM_POLICY = 2; */ IAM_POLICY(2), + /** + * + * + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + ORG_POLICY(4), + /** + * + * + *
+   * The Cloud Access context mananger Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + ACCESS_POLICY(5), UNRECOGNIZED(-1), ; @@ -91,6 +111,26 @@ public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { * IAM_POLICY = 2; */ public static final int IAM_POLICY_VALUE = 2; + /** + * + * + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + public static final int ORG_POLICY_VALUE = 4; + /** + * + * + *
+   * The Cloud Access context mananger Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + public static final int ACCESS_POLICY_VALUE = 5; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -114,6 +154,10 @@ public static ContentType forNumber(int value) { return RESOURCE; case 2: return IAM_POLICY; + case 4: + return ORG_POLICY; + case 5: + return ACCESS_POLICY; default: return null; } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java index 2f9b5286a..6dee01aca 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java @@ -172,7 +172,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public java.lang.String getParent() { java.lang.Object ref = parent_; @@ -195,7 +197,9 @@ public java.lang.String getParent() { * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; @@ -267,9 +271,9 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -283,9 +287,9 @@ public com.google.protobuf.ProtocolStringList getAssetTypesList() { * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -299,9 +303,9 @@ public int getAssetTypesCount() { * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -315,9 +319,9 @@ public java.lang.String getAssetTypes(int index) { * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -369,7 +373,9 @@ public com.google.cloud.asset.v1.ContentType getContentType() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public boolean hasOutputConfig() { return outputConfig_ != null; @@ -382,7 +388,9 @@ public boolean hasOutputConfig() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { return outputConfig_ == null @@ -397,7 +405,9 @@ public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { return getOutputConfig(); @@ -841,7 +851,9 @@ public Builder mergeFrom( * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public java.lang.String getParent() { java.lang.Object ref = parent_; @@ -864,7 +876,9 @@ public java.lang.String getParent() { * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; @@ -887,7 +901,9 @@ public com.google.protobuf.ByteString getParentBytes() { * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public Builder setParent(java.lang.String value) { if (value == null) { @@ -908,7 +924,9 @@ public Builder setParent(java.lang.String value) { * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public Builder clearParent() { @@ -926,7 +944,9 @@ public Builder clearParent() { * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ public Builder setParentBytes(com.google.protobuf.ByteString value) { if (value == null) { @@ -1164,9 +1184,9 @@ private void ensureAssetTypesIsMutable() { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1180,9 +1200,9 @@ public com.google.protobuf.ProtocolStringList getAssetTypesList() { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1196,9 +1216,9 @@ public int getAssetTypesCount() { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1212,9 +1232,9 @@ public java.lang.String getAssetTypes(int index) { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1228,9 +1248,9 @@ public com.google.protobuf.ByteString getAssetTypesBytes(int index) { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1250,9 +1270,9 @@ public Builder setAssetTypes(int index, java.lang.String value) { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1272,9 +1292,9 @@ public Builder addAssetTypes(java.lang.String value) { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1291,9 +1311,9 @@ public Builder addAllAssetTypes(java.lang.Iterable values) { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1310,9 +1330,9 @@ public Builder clearAssetTypes() { * *
      * A list of asset types of which to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      * for all supported asset types.
      * 
* @@ -1424,7 +1444,9 @@ public Builder clearContentType() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public boolean hasOutputConfig() { return outputConfigBuilder_ != null || outputConfig_ != null; @@ -1437,7 +1459,9 @@ public boolean hasOutputConfig() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { if (outputConfigBuilder_ == null) { @@ -1456,7 +1480,9 @@ public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { if (outputConfigBuilder_ == null) { @@ -1479,7 +1505,9 @@ public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig.Builder builderForValue) { if (outputConfigBuilder_ == null) { @@ -1499,7 +1527,9 @@ public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig.Builder bu * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder mergeOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { if (outputConfigBuilder_ == null) { @@ -1526,7 +1556,9 @@ public Builder mergeOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearOutputConfig() { if (outputConfigBuilder_ == null) { @@ -1547,7 +1579,9 @@ public Builder clearOutputConfig() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1.OutputConfig.Builder getOutputConfigBuilder() { @@ -1562,7 +1596,9 @@ public com.google.cloud.asset.v1.OutputConfig.Builder getOutputConfigBuilder() { * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { if (outputConfigBuilder_ != null) { @@ -1581,7 +1617,9 @@ public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder( * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.asset.v1.OutputConfig, diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java index 94104714e..183538325 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java @@ -33,7 +33,9 @@ public interface ExportAssetsRequestOrBuilder * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ java.lang.String getParent(); /** @@ -46,7 +48,9 @@ public interface ExportAssetsRequestOrBuilder * or a folder number (such as "folders/123"). * * - * string parent = 1; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * */ com.google.protobuf.ByteString getParentBytes(); @@ -98,9 +102,9 @@ public interface ExportAssetsRequestOrBuilder * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -112,9 +116,9 @@ public interface ExportAssetsRequestOrBuilder * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -126,9 +130,9 @@ public interface ExportAssetsRequestOrBuilder * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -140,9 +144,9 @@ public interface ExportAssetsRequestOrBuilder * *
    * A list of asset types of which to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be returned.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
    * for all supported asset types.
    * 
* @@ -181,7 +185,9 @@ public interface ExportAssetsRequestOrBuilder * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ boolean hasOutputConfig(); /** @@ -192,7 +198,9 @@ public interface ExportAssetsRequestOrBuilder * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.asset.v1.OutputConfig getOutputConfig(); /** @@ -203,7 +211,9 @@ public interface ExportAssetsRequestOrBuilder * to. All results will be in newline delimited JSON format. * * - * .google.cloud.asset.v1.OutputConfig output_config = 5; + * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java index 0d2797d02..004d5bb70 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java @@ -70,6 +70,13 @@ private GcsDestination( objectUri_ = s; break; } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 2; + objectUri_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -109,6 +116,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public enum ObjectUriCase implements com.google.protobuf.Internal.EnumLite { URI(1), + URI_PREFIX(2), OBJECTURI_NOT_SET(0); private final int value; @@ -125,6 +133,8 @@ public static ObjectUriCase forNumber(int value) { switch (value) { case 1: return URI; + case 2: + return URI_PREFIX; case 0: return OBJECTURI_NOT_SET; default: @@ -201,6 +211,74 @@ public com.google.protobuf.ByteString getUriBytes() { } } + public static final int URI_PREFIX_FIELD_NUMBER = 2; + /** + * + * + *
+   * The uri prefix of all generated Cloud Storage objects. For example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. For example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + */ + public java.lang.String getUriPrefix() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + 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 (objectUriCase_ == 2) { + objectUri_ = s; + } + return s; + } + } + /** + * + * + *
+   * The uri prefix of all generated Cloud Storage objects. For example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. For example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + */ + public com.google.protobuf.ByteString getUriPrefixBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (objectUriCase_ == 2) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -218,6 +296,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (objectUriCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); } + if (objectUriCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); + } unknownFields.writeTo(output); } @@ -230,6 +311,9 @@ public int getSerializedSize() { if (objectUriCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); } + if (objectUriCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -250,6 +334,9 @@ public boolean equals(final java.lang.Object obj) { case 1: if (!getUri().equals(other.getUri())) return false; break; + case 2: + if (!getUriPrefix().equals(other.getUriPrefix())) return false; + break; case 0: default: } @@ -269,6 +356,10 @@ public int hashCode() { hash = (37 * hash) + URI_FIELD_NUMBER; hash = (53 * hash) + getUri().hashCode(); break; + case 2: + hash = (37 * hash) + URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getUriPrefix().hashCode(); + break; case 0: default: } @@ -449,6 +540,9 @@ public com.google.cloud.asset.v1.GcsDestination buildPartial() { if (objectUriCase_ == 1) { result.objectUri_ = objectUri_; } + if (objectUriCase_ == 2) { + result.objectUri_ = objectUri_; + } result.objectUriCase_ = objectUriCase_; onBuilt(); return result; @@ -507,6 +601,13 @@ public Builder mergeFrom(com.google.cloud.asset.v1.GcsDestination other) { onChanged(); break; } + case URI_PREFIX: + { + objectUriCase_ = 2; + objectUri_ = other.objectUri_; + onChanged(); + break; + } case OBJECTURI_NOT_SET: { break; @@ -680,6 +781,151 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
+     * The uri prefix of all generated Cloud Storage objects. For example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. For example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + */ + public java.lang.String getUriPrefix() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 2) { + objectUri_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The uri prefix of all generated Cloud Storage objects. For example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. For example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + */ + public com.google.protobuf.ByteString getUriPrefixBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (objectUriCase_ == 2) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The uri prefix of all generated Cloud Storage objects. For example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. For example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + */ + public Builder setUriPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + objectUriCase_ = 2; + objectUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The uri prefix of all generated Cloud Storage objects. For example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. For example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + */ + public Builder clearUriPrefix() { + if (objectUriCase_ == 2) { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The uri prefix of all generated Cloud Storage objects. For example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. For example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + */ + public Builder setUriPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + objectUriCase_ = 2; + objectUri_ = 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-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java index 83dec590c..9d919f252 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java @@ -52,5 +52,42 @@ public interface GcsDestinationOrBuilder */ com.google.protobuf.ByteString getUriBytes(); + /** + * + * + *
+   * The uri prefix of all generated Cloud Storage objects. For example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. For example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + */ + java.lang.String getUriPrefix(); + /** + * + * + *
+   * The uri prefix of all generated Cloud Storage objects. For example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. For example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + */ + com.google.protobuf.ByteString getUriPrefixBytes(); + public com.google.cloud.asset.v1.GcsDestination.ObjectUriCase getObjectUriCase(); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java index ed76d4d9a..d86a7f01b 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java @@ -79,6 +79,23 @@ private OutputConfig( destinationCase_ = 1; break; } + case 18: + { + com.google.cloud.asset.v1.BigQueryDestination.Builder subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = + ((com.google.cloud.asset.v1.BigQueryDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.asset.v1.BigQueryDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.BigQueryDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -118,6 +135,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public enum DestinationCase implements com.google.protobuf.Internal.EnumLite { GCS_DESTINATION(1), + BIGQUERY_DESTINATION(2), DESTINATION_NOT_SET(0); private final int value; @@ -134,6 +152,8 @@ public static DestinationCase forNumber(int value) { switch (value) { case 1: return GCS_DESTINATION; + case 2: + return BIGQUERY_DESTINATION; case 0: return DESTINATION_NOT_SET; default: @@ -194,6 +214,59 @@ public com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuil return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); } + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery. The resource/iam_policy field is converted
+   * to a record with each field to a column, except metadata to a single JSON
+   * string.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery. The resource/iam_policy field is converted
+   * to a record with each field to a column, except metadata to a single JSON
+   * string.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery. The resource/iam_policy field is converted
+   * to a record with each field to a column, except metadata to a single JSON
+   * string.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -211,6 +284,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { output.writeMessage(1, (com.google.cloud.asset.v1.GcsDestination) destination_); } + if (destinationCase_ == 2) { + output.writeMessage(2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); + } unknownFields.writeTo(output); } @@ -225,6 +301,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.asset.v1.GcsDestination) destination_); } + if (destinationCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -245,6 +326,9 @@ public boolean equals(final java.lang.Object obj) { case 1: if (!getGcsDestination().equals(other.getGcsDestination())) return false; break; + case 2: + if (!getBigqueryDestination().equals(other.getBigqueryDestination())) return false; + break; case 0: default: } @@ -264,6 +348,10 @@ public int hashCode() { hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; hash = (53 * hash) + getGcsDestination().hashCode(); break; + case 2: + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + break; case 0: default: } @@ -448,6 +536,13 @@ public com.google.cloud.asset.v1.OutputConfig buildPartial() { result.destination_ = gcsDestinationBuilder_.build(); } } + if (destinationCase_ == 2) { + if (bigqueryDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = bigqueryDestinationBuilder_.build(); + } + } result.destinationCase_ = destinationCase_; onBuilt(); return result; @@ -504,6 +599,11 @@ public Builder mergeFrom(com.google.cloud.asset.v1.OutputConfig other) { mergeGcsDestination(other.getGcsDestination()); break; } + case BIGQUERY_DESTINATION: + { + mergeBigqueryDestination(other.getBigqueryDestination()); + break; + } case DESTINATION_NOT_SET: { break; @@ -754,6 +854,236 @@ public com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuil return gcsDestinationBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.BigQueryDestination, + com.google.cloud.asset.v1.BigQueryDestination.Builder, + com.google.cloud.asset.v1.BigQueryDestinationOrBuilder> + bigqueryDestinationBuilder_; + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return bigqueryDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination(com.google.cloud.asset.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination( + com.google.cloud.asset.v1.BigQueryDestination.Builder builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder mergeBigqueryDestination(com.google.cloud.asset.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2 + && destination_ != com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.asset.v1.BigQueryDestination.newBuilder( + (com.google.cloud.asset.v1.BigQueryDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + bigqueryDestinationBuilder_.mergeFrom(value); + } + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + bigqueryDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1.BigQueryDestination.Builder getBigqueryDestinationBuilder() { + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder() { + if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery. The resource/iam_policy field is converted
+     * to a record with each field to a column, except metadata to a single JSON
+     * string.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.BigQueryDestination, + com.google.cloud.asset.v1.BigQueryDestination.Builder, + com.google.cloud.asset.v1.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + bigqueryDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.BigQueryDestination, + com.google.cloud.asset.v1.BigQueryDestination.Builder, + com.google.cloud.asset.v1.BigQueryDestinationOrBuilder>( + (com.google.cloud.asset.v1.BigQueryDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged(); + ; + return bigqueryDestinationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java index 17026bfae..bddca95de 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java @@ -54,5 +54,45 @@ public interface OutputConfigOrBuilder */ com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + /** + * + * + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery. The resource/iam_policy field is converted
+   * to a record with each field to a column, except metadata to a single JSON
+   * string.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + boolean hasBigqueryDestination(); + /** + * + * + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery. The resource/iam_policy field is converted
+   * to a record with each field to a column, except metadata to a single JSON
+   * string.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination(); + /** + * + * + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery. The resource/iam_policy field is converted
+   * to a record with each field to a column, except metadata to a single JSON
+   * string.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); + public com.google.cloud.asset.v1.OutputConfig.DestinationCase getDestinationCase(); } diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto index 0dfc2898b..33dde9cd3 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto @@ -18,8 +18,13 @@ syntax = "proto3"; package google.cloud.asset.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/asset/v1/assets.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Asset.V1"; @@ -29,9 +34,11 @@ option java_outer_classname = "AssetServiceProto"; option java_package = "com.google.cloud.asset.v1"; option php_namespace = "Google\\Cloud\\Asset\\V1"; - // Asset service definition. service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Exports assets with time and resource types to a given Cloud Storage // location. The output format is newline-delimited JSON. // This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you @@ -41,6 +48,10 @@ service AssetService { post: "/v1/{parent=*/*}:exportAssets" body: "*" }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1.ExportAssetsResponse" + metadata_type: "google.cloud.asset.v1.ExportAssetsRequest" + }; } // Batch gets the update history of assets that overlap a time window. @@ -63,7 +74,12 @@ message ExportAssetsRequest { // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id"), or a project number (such as "projects/12345"), // or a folder number (such as "folders/123"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // Timestamp to take an asset snapshot. This can only be set to a timestamp // between 2018-10-02 UTC (inclusive) and the current time. If not specified, @@ -73,9 +89,9 @@ message ExportAssetsRequest { google.protobuf.Timestamp read_time = 2; // A list of asset types of which to take a snapshot for. For example: - // "compute.googleapis.com/Disk". If specified, only matching assets will be returned. - // See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // "compute.googleapis.com/Disk". If specified, only matching assets will be + // returned. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) // for all supported asset types. repeated string asset_types = 3; @@ -85,7 +101,7 @@ message ExportAssetsRequest { // Required. Output configuration indicating where the results will be output // to. All results will be in newline delimited JSON format. - OutputConfig output_config = 5; + OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; } // The export asset response. This message is returned by the @@ -105,21 +121,27 @@ message BatchGetAssetsHistoryRequest { // Required. The relative name of the root asset. It can only be an // organization number (such as "organizations/123"), a project ID (such as // "projects/my-project-id")", or a project number (such as "projects/12345"). - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; // A list of the full names of the assets. For example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. // See [Resource // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // and [Resource Name Format](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/resource-name-format) + // and [Resource Name + // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) // for more info. // // The request becomes a no-op if the asset name list is empty, and the max // size of the asset name list is 100 in one request. repeated string asset_names = 2; - // Required. The content type. - ContentType content_type = 3; + // Optional. The content type. + ContentType content_type = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The time window for the asset history. Both start_time and // end_time are optional and if set, it must be after 2018-10-02 UTC. If @@ -127,7 +149,7 @@ message BatchGetAssetsHistoryRequest { // not set, the snapshot of the assets at end_time will be returned. The // returned results contain all temporal assets whose time window overlap with // read_time_window. - TimeWindow read_time_window = 4; + TimeWindow read_time_window = 4 [(google.api.field_behavior) = OPTIONAL]; } // Batch get assets history response. @@ -142,6 +164,12 @@ message OutputConfig { oneof destination { // Destination on Cloud Storage. GcsDestination gcs_destination = 1; + + // Destination on BigQuery. The output table stores the fields in asset + // proto as columns in BigQuery. The resource/iam_policy field is converted + // to a record with each field to a column, except metadata to a single JSON + // string. + BigQueryDestination bigquery_destination = 2; } } @@ -155,9 +183,40 @@ message GcsDestination { // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) // for more information. string uri = 1; + + // The uri prefix of all generated Cloud Storage objects. For example: + // "gs://bucket_name/object_name_prefix". Each object uri is in format: + // "gs://bucket_name/object_name_prefix// and only + // contains assets for that type. starts from 0. For example: + // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is + // the first shard of output objects containing all + // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be + // returned if file with the same name "gs://bucket_name/object_name_prefix" + // already exists. + string uri_prefix = 2; } } +// A BigQuery destination. +message BigQueryDestination { + // Required. The BigQuery dataset in format + // "projects/projectId/datasets/datasetId", to which the snapshot result + // should be exported. If this dataset does not exist, the export call returns + // an error. + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery table to which the snapshot result should be + // written. If this table does not exist, a new table with the given name + // will be created. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + + // If the destination table already exists and this flag is `TRUE`, the + // table will be overwritten by the contents of assets snapshot. If the flag + // is not set and the destination table already exists, the export call + // returns an error. + bool force = 3; +} + // Asset content type. enum ContentType { // Unspecified content type. @@ -168,4 +227,10 @@ enum ContentType { // The actual IAM policy set on a resource. IAM_POLICY = 2; + + // The Cloud Organization Policy set on an asset. + ORG_POLICY = 4; + + // The Cloud Access context mananger Policy set on an asset. + ACCESS_POLICY = 5; } diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto index f6a8108c0..e689b7618 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto @@ -18,11 +18,13 @@ syntax = "proto3"; package google.cloud.asset.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Asset.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; option java_multiple_files = true; @@ -30,7 +32,6 @@ option java_outer_classname = "AssetProto"; option java_package = "com.google.cloud.asset.v1"; option php_namespace = "Google\\Cloud\\Asset\\V1"; - // Temporal asset. In addition to the asset, the temporal asset includes the // status of the asset and valid from and to time of it. message TemporalAsset { @@ -57,6 +58,11 @@ message TimeWindow { // Cloud asset. This includes all Google Cloud Platform resources, // Cloud IAM policies, and other non-GCP assets. message Asset { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + // The full name of the asset. For example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. // See [Resource diff --git a/synth.metadata b/synth.metadata index 76b4a9d07..e439ec5d0 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-10T08:03:14.487982Z", + "updateTime": "2019-10-22T07:50:05.643304Z", "sources": [ { "generator": { "name": "artman", - "version": "0.38.0", - "dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf" + "version": "0.40.2", + "dockerImage": "googleapis/artman@sha256:3b8f7d9b4c206843ce08053474f5c64ae4d388ff7d995e68b59fb65edf73eeb9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "10f91fa12f70e8e0209a45fc10807ed1f77c7e4e", - "internalRef": "273826591" + "sha": "4f34b95cc7deda8e141a50339a53fe8bb35d778d", + "internalRef": "275954662" } }, { "template": { "name": "java_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], From b64677c519c0f8df78546507a1e58513e35c0ee1 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 22 Oct 2019 10:00:54 -0700 Subject: [PATCH 2/2] fix: allow protobuf interface changes --- .../clirr-ignored-differences.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 proto-google-cloud-asset-v1/clirr-ignored-differences.xml diff --git a/proto-google-cloud-asset-v1/clirr-ignored-differences.xml b/proto-google-cloud-asset-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000..f67eda51c --- /dev/null +++ b/proto-google-cloud-asset-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/asset/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/asset/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/asset/v1/*OrBuilder + boolean has*(*) + +