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/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 @@
+
+
+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- * 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
+ * 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+ * 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
* 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/