Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: regenerate client - add BigQueryDestination (#12)
* [CHANGE ME] Re-generated  to pick up changes in the API or client library generator.

* fix: allow protobuf interface changes
  • Loading branch information
yoshi-automation authored and chingor13 committed Oct 22, 2019
1 parent 579b6c6 commit 59f79a1
Show file tree
Hide file tree
Showing 25 changed files with 2,238 additions and 215 deletions.
10 changes: 8 additions & 2 deletions .kokoro/build.sh
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
;;
*)
;;
Expand Down
38 changes: 38 additions & 0 deletions .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
1 change: 1 addition & 0 deletions .kokoro/continuous/common.cfg
Expand Up @@ -4,6 +4,7 @@
action {
define_artifacts {
regex: "**/*sponge_log.xml"
regex: "**/*sponge_log.txt"
}
}

Expand Down
1 change: 1 addition & 0 deletions .kokoro/nightly/common.cfg
Expand Up @@ -4,6 +4,7 @@
action {
define_artifacts {
regex: "**/*sponge_log.xml"
regex: "**/*sponge_log.txt"
}
}

Expand Down
13 changes: 13 additions & 0 deletions .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"
}
1 change: 1 addition & 0 deletions .kokoro/presubmit/common.cfg
Expand Up @@ -4,6 +4,7 @@
action {
define_artifacts {
regex: "**/*sponge_log.xml"
regex: "**/*sponge_log.txt"
}
}

Expand Down
5 changes: 4 additions & 1 deletion .kokoro/release/snapshot.sh
Expand Up @@ -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"

Expand All @@ -27,4 +30,4 @@ mvn clean install deploy -B \
-DperformRelease=true \
-Dgpg.executable=gpg \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgpg.homedir=${GPG_HOMEDIR}
-Dgpg.homedir=${GPG_HOMEDIR}
1 change: 1 addition & 0 deletions .kokoro/release/stage.sh
Expand Up @@ -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} \
Expand Down
19 changes: 19 additions & 0 deletions proto-google-cloud-asset-v1/clirr-ignored-differences.xml
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/asset/v1/*OrBuilder</className>
<method>* get*(*)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/asset/v1/*OrBuilder</className>
<method>boolean contains*(*)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/asset/v1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>
</differences>
Expand Up @@ -54,27 +54,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
java.lang.String[] descriptorData = {
"\n\"google/cloud/asset/v1/assets.proto\022\025go"
+ "ogle.cloud.asset.v1\032\034google/api/annotati"
+ "ons.proto\032\032google/iam/v1/policy.proto\032\031g"
+ "oogle/protobuf/any.proto\032\034google/protobu"
+ "f/struct.proto\032\037google/protobuf/timestam"
+ "p.proto\"\200\001\n\rTemporalAsset\0221\n\006window\030\001 \001("
+ "\0132!.google.cloud.asset.v1.TimeWindow\022\017\n\007"
+ "deleted\030\002 \001(\010\022+\n\005asset\030\003 \001(\0132\034.google.cl"
+ "oud.asset.v1.Asset\"j\n\nTimeWindow\022.\n\nstar"
+ "t_time\030\001 \001(\0132\032.google.protobuf.Timestamp"
+ "\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf.Tim"
+ "estamp\"\207\001\n\005Asset\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_"
+ "type\030\002 \001(\t\0221\n\010resource\030\003 \001(\0132\037.google.cl"
+ "oud.asset.v1.Resource\022)\n\niam_policy\030\004 \001("
+ "\0132\025.google.iam.v1.Policy\"\240\001\n\010Resource\022\017\n"
+ "\007version\030\001 \001(\t\022\036\n\026discovery_document_uri"
+ "\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014resour"
+ "ce_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001"
+ "(\0132\027.google.protobuf.StructB\225\001\n\031com.goog"
+ "le.cloud.asset.v1B\nAssetProtoP\001Z:google."
+ "golang.org/genproto/googleapis/cloud/ass"
+ "et/v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Go"
+ "ogle\\Cloud\\Asset\\V1b\006proto3"
+ "ons.proto\032\031google/api/resource.proto\032\032go"
+ "ogle/iam/v1/policy.proto\032\031google/protobu"
+ "f/any.proto\032\034google/protobuf/struct.prot"
+ "o\032\037google/protobuf/timestamp.proto\"\200\001\n\rT"
+ "emporalAsset\0221\n\006window\030\001 \001(\0132!.google.cl"
+ "oud.asset.v1.TimeWindow\022\017\n\007deleted\030\002 \001(\010"
+ "\022+\n\005asset\030\003 \001(\0132\034.google.cloud.asset.v1."
+ "Asset\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(\0132"
+ "\032.google.protobuf.Timestamp\022,\n\010end_time\030"
+ "\002 \001(\0132\032.google.protobuf.Timestamp\"\260\001\n\005As"
+ "set\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0221\n"
+ "\010resource\030\003 \001(\0132\037.google.cloud.asset.v1."
+ "Resource\022)\n\niam_policy\030\004 \001(\0132\025.google.ia"
+ "m.v1.Policy:\'\352A$\n\037cloudasset.googleapis."
+ "com/Asset\022\001*\"\240\001\n\010Resource\022\017\n\007version\030\001 \001"
+ "(\t\022\036\n\026discovery_document_uri\030\002 \001(\t\022\026\n\016di"
+ "scovery_name\030\003 \001(\t\022\024\n\014resource_url\030\004 \001(\t"
+ "\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001(\0132\027.google."
+ "protobuf.StructB\230\001\n\031com.google.cloud.ass"
+ "et.v1B\nAssetProtoP\001Z:google.golang.org/g"
+ "enproto/googleapis/cloud/asset/v1;asset\370"
+ "\001\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\Clou"
+ "d\\Asset\\V1b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
Expand All @@ -88,6 +90,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.AnnotationsProto.getDescriptor(),
com.google.api.ResourceProto.getDescriptor(),
com.google.iam.v1.PolicyProto.getDescriptor(),
com.google.protobuf.AnyProto.getDescriptor(),
com.google.protobuf.StructProto.getDescriptor(),
Expand Down Expand Up @@ -126,7 +129,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
new java.lang.String[] {
"Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data",
});
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.ResourceProto.resource);
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
descriptor, registry);
com.google.api.AnnotationsProto.getDescriptor();
com.google.api.ResourceProto.getDescriptor();
com.google.iam.v1.PolicyProto.getDescriptor();
com.google.protobuf.AnyProto.getDescriptor();
com.google.protobuf.StructProto.getDescriptor();
Expand Down
Expand Up @@ -51,6 +51,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_asset_v1_GcsDestination_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable;

public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
Expand All @@ -62,43 +66,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
java.lang.String[] descriptorData = {
"\n)google/cloud/asset/v1/asset_service.pr"
+ "oto\022\025google.cloud.asset.v1\032\034google/api/a"
+ "nnotations.proto\032\"google/cloud/asset/v1/"
+ "assets.proto\032#google/longrunning/operati"
+ "ons.proto\032\037google/protobuf/timestamp.pro"
+ "to\"\337\001\n\023ExportAssetsRequest\022\016\n\006parent\030\001 \001"
+ "(\t\022-\n\tread_time\030\002 \001(\0132\032.google.protobuf."
+ "Timestamp\022\023\n\013asset_types\030\003 \003(\t\0228\n\014conten"
+ "t_type\030\004 \001(\0162\".google.cloud.asset.v1.Con"
+ "tentType\022:\n\routput_config\030\005 \001(\0132#.google"
+ ".cloud.asset.v1.OutputConfig\"\201\001\n\024ExportA"
+ "ssetsResponse\022-\n\tread_time\030\001 \001(\0132\032.googl"
+ "e.protobuf.Timestamp\022:\n\routput_config\030\002 "
+ "\001(\0132#.google.cloud.asset.v1.OutputConfig"
+ "\"\272\001\n\034BatchGetAssetsHistoryRequest\022\016\n\006par"
+ "ent\030\001 \001(\t\022\023\n\013asset_names\030\002 \003(\t\0228\n\014conten"
+ "t_type\030\003 \001(\0162\".google.cloud.asset.v1.Con"
+ "tentType\022;\n\020read_time_window\030\004 \001(\0132!.goo"
+ "gle.cloud.asset.v1.TimeWindow\"U\n\035BatchGe"
+ "tAssetsHistoryResponse\0224\n\006assets\030\001 \003(\0132$"
+ ".google.cloud.asset.v1.TemporalAsset\"_\n\014"
+ "OutputConfig\022@\n\017gcs_destination\030\001 \001(\0132%."
+ "google.cloud.asset.v1.GcsDestinationH\000B\r"
+ "\n\013destination\"-\n\016GcsDestination\022\r\n\003uri\030\001"
+ " \001(\tH\000B\014\n\nobject_uri*I\n\013ContentType\022\034\n\030C"
+ "ONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022"
+ "\016\n\nIAM_POLICY\020\0022\311\002\n\014AssetService\022\203\001\n\014Exp"
+ "ortAssets\022*.google.cloud.asset.v1.Export"
+ "AssetsRequest\032\035.google.longrunning.Opera"
+ "tion\"(\202\323\344\223\002\"\"\035/v1/{parent=*/*}:exportAss"
+ "ets:\001*\022\262\001\n\025BatchGetAssetsHistory\0223.googl"
+ "e.cloud.asset.v1.BatchGetAssetsHistoryRe"
+ "quest\0324.google.cloud.asset.v1.BatchGetAs"
+ "setsHistoryResponse\".\202\323\344\223\002(\022&/v1/{parent"
+ "=*/*}:batchGetAssetsHistoryB\234\001\n\031com.goog"
+ "le.cloud.asset.v1B\021AssetServiceProtoP\001Z:"
+ "google.golang.org/genproto/googleapis/cl"
+ "oud/asset/v1;asset\252\002\025Google.Cloud.Asset."
+ "V1\312\002\025Google\\Cloud\\Asset\\V1b\006proto3"
+ "nnotations.proto\032\027google/api/client.prot"
+ "o\032\037google/api/field_behavior.proto\032\031goog"
+ "le/api/resource.proto\032\"google/cloud/asse"
+ "t/v1/assets.proto\032#google/longrunning/op"
+ "erations.proto\032\033google/protobuf/empty.pr"
+ "oto\032 google/protobuf/field_mask.proto\032\037g"
+ "oogle/protobuf/timestamp.proto\"\215\002\n\023Expor"
+ "tAssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037"
+ "cloudasset.googleapis.com/Asset\022-\n\tread_"
+ "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\023"
+ "\n\013asset_types\030\003 \003(\t\0228\n\014content_type\030\004 \001("
+ "\0162\".google.cloud.asset.v1.ContentType\022?\n"
+ "\routput_config\030\005 \001(\0132#.google.cloud.asse"
+ "t.v1.OutputConfigB\003\340A\002\"\201\001\n\024ExportAssetsR"
+ "esponse\022-\n\tread_time\030\001 \001(\0132\032.google.prot"
+ "obuf.Timestamp\022:\n\routput_config\030\002 \001(\0132#."
+ "google.cloud.asset.v1.OutputConfig\"\355\001\n\034B"
+ "atchGetAssetsHistoryRequest\0227\n\006parent\030\001 "
+ "\001(\tB\'\340A\002\372A!\022\037cloudasset.googleapis.com/A"
+ "sset\022\023\n\013asset_names\030\002 \003(\t\022=\n\014content_typ"
+ "e\030\003 \001(\0162\".google.cloud.asset.v1.ContentT"
+ "ypeB\003\340A\001\022@\n\020read_time_window\030\004 \001(\0132!.goo"
+ "gle.cloud.asset.v1.TimeWindowB\003\340A\001\"U\n\035Ba"
+ "tchGetAssetsHistoryResponse\0224\n\006assets\030\001 "
+ "\003(\0132$.google.cloud.asset.v1.TemporalAsse"
+ "t\"\253\001\n\014OutputConfig\022@\n\017gcs_destination\030\001 "
+ "\001(\0132%.google.cloud.asset.v1.GcsDestinati"
+ "onH\000\022J\n\024bigquery_destination\030\002 \001(\0132*.goo"
+ "gle.cloud.asset.v1.BigQueryDestinationH\000"
+ "B\r\n\013destination\"C\n\016GcsDestination\022\r\n\003uri"
+ "\030\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 \001(\tH\000B\014\n\nobject"
+ "_uri\"N\n\023BigQueryDestination\022\024\n\007dataset\030\001"
+ " \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003"
+ " \001(\010*l\n\013ContentType\022\034\n\030CONTENT_TYPE_UNSP"
+ "ECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY\020\002\022"
+ "\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020\0052\363\003\n\014A"
+ "ssetService\022\336\001\n\014ExportAssets\022*.google.cl"
+ "oud.asset.v1.ExportAssetsRequest\032\035.googl"
+ "e.longrunning.Operation\"\202\001\202\323\344\223\002\"\"\035/v1/{p"
+ "arent=*/*}:exportAssets:\001*\312AW\n*google.cl"
+ "oud.asset.v1.ExportAssetsResponse\022)googl"
+ "e.cloud.asset.v1.ExportAssetsRequest\022\262\001\n"
+ "\025BatchGetAssetsHistory\0223.google.cloud.as"
+ "set.v1.BatchGetAssetsHistoryRequest\0324.go"
+ "ogle.cloud.asset.v1.BatchGetAssetsHistor"
+ "yResponse\".\202\323\344\223\002(\022&/v1/{parent=*/*}:batc"
+ "hGetAssetsHistory\032M\312A\031cloudasset.googlea"
+ "pis.com\322A.https://www.googleapis.com/aut"
+ "h/cloud-platformB\234\001\n\031com.google.cloud.as"
+ "set.v1B\021AssetServiceProtoP\001Z:google.gola"
+ "ng.org/genproto/googleapis/cloud/asset/v"
+ "1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Google"
+ "\\Cloud\\Asset\\V1b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
Expand All @@ -112,8 +132,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.AnnotationsProto.getDescriptor(),
com.google.api.ClientProto.getDescriptor(),
com.google.api.FieldBehaviorProto.getDescriptor(),
com.google.api.ResourceProto.getDescriptor(),
com.google.cloud.asset.v1.AssetProto.getDescriptor(),
com.google.longrunning.OperationsProto.getDescriptor(),
com.google.protobuf.EmptyProto.getDescriptor(),
com.google.protobuf.FieldMaskProto.getDescriptor(),
com.google.protobuf.TimestampProto.getDescriptor(),
},
assigner);
Expand Down Expand Up @@ -155,24 +180,42 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_asset_v1_OutputConfig_descriptor,
new java.lang.String[] {
"GcsDestination", "Destination",
"GcsDestination", "BigqueryDestination", "Destination",
});
internal_static_google_cloud_asset_v1_GcsDestination_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_asset_v1_GcsDestination_descriptor,
new java.lang.String[] {
"Uri", "ObjectUri",
"Uri", "UriPrefix", "ObjectUri",
});
internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor,
new java.lang.String[] {
"Dataset", "Table", "Force",
});
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.ClientProto.defaultHost);
registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
registry.add(com.google.api.AnnotationsProto.http);
registry.add(com.google.api.ClientProto.oauthScopes);
registry.add(com.google.api.ResourceProto.resourceReference);
registry.add(com.google.longrunning.OperationsProto.operationInfo);
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
descriptor, registry);
com.google.api.AnnotationsProto.getDescriptor();
com.google.api.ClientProto.getDescriptor();
com.google.api.FieldBehaviorProto.getDescriptor();
com.google.api.ResourceProto.getDescriptor();
com.google.cloud.asset.v1.AssetProto.getDescriptor();
com.google.longrunning.OperationsProto.getDescriptor();
com.google.protobuf.EmptyProto.getDescriptor();
com.google.protobuf.FieldMaskProto.getDescriptor();
com.google.protobuf.TimestampProto.getDescriptor();
}

Expand Down

0 comments on commit 59f79a1

Please sign in to comment.