From 357e811f5d429cacfce597be9a3e739e659f604a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 17 Apr 2021 09:37:16 -0700 Subject: [PATCH] feat: new JSON type through BigQuery Write (#1013) Committer: @yirutang PiperOrigin-RevId: 368275477 Source-Author: Google APIs Source-Date: Tue Apr 13 12:51:14 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 95e7f055087a43f638ffd9a0f25ce36dbea87953 Source-Link: https://github.com/googleapis/googleapis/commit/95e7f055087a43f638ffd9a0f25ce36dbea87953 --- .../storage/v1beta2/TableFieldSchema.java | 22 +++++++++++++++++++ .../bigquery/storage/v1beta2/TableProto.java | 16 +++++++------- .../bigquery/storage/v1beta2/table.proto | 3 +++ synth.metadata | 22 ++++++------------- 4 files changed, 40 insertions(+), 23 deletions(-) diff --git a/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableFieldSchema.java b/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableFieldSchema.java index 369879d537..9814346e7d 100644 --- a/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableFieldSchema.java +++ b/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableFieldSchema.java @@ -306,6 +306,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * INTERVAL = 14; */ INTERVAL(14), + /** + * + * + *
+     * JSON, String
+     * 
+ * + * JSON = 15; + */ + JSON(15), UNRECOGNIZED(-1), ; @@ -459,6 +469,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * INTERVAL = 14; */ public static final int INTERVAL_VALUE = 14; + /** + * + * + *
+     * JSON, String
+     * 
+ * + * JSON = 15; + */ + public static final int JSON_VALUE = 15; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -514,6 +534,8 @@ public static Type forNumber(int value) { return BIGNUMERIC; case 14: return INTERVAL; + case 15: + return JSON; default: return null; } diff --git a/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableProto.java b/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableProto.java index faf88d105b..29abed0789 100644 --- a/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableProto.java +++ b/proto-google-cloud-bigquerystorage-v1beta2/src/main/java/com/google/cloud/bigquery/storage/v1beta2/TableProto.java @@ -49,25 +49,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ge.v1beta2\032\037google/api/field_behavior.pr" + "oto\"V\n\013TableSchema\022G\n\006fields\030\001 \003(\01327.goo" + "gle.cloud.bigquery.storage.v1beta2.Table" - + "FieldSchema\"\305\004\n\020TableFieldSchema\022\021\n\004name" + + "FieldSchema\"\317\004\n\020TableFieldSchema\022\021\n\004name" + "\030\001 \001(\tB\003\340A\002\022O\n\004type\030\002 \001(\0162<.google.cloud" + ".bigquery.storage.v1beta2.TableFieldSche" + "ma.TypeB\003\340A\002\022O\n\004mode\030\003 \001(\0162<.google.clou" + "d.bigquery.storage.v1beta2.TableFieldSch" + "ema.ModeB\003\340A\001\022L\n\006fields\030\004 \003(\01327.google.c" + "loud.bigquery.storage.v1beta2.TableField" - + "SchemaB\003\340A\001\022\030\n\013description\030\006 \001(\tB\003\340A\001\"\313\001" + + "SchemaB\003\340A\001\022\030\n\013description\030\006 \001(\tB\003\340A\001\"\325\001" + "\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006STRING\020\001" + "\022\t\n\005INT64\020\002\022\n\n\006DOUBLE\020\003\022\n\n\006STRUCT\020\004\022\t\n\005B" + "YTES\020\005\022\010\n\004BOOL\020\006\022\r\n\tTIMESTAMP\020\007\022\010\n\004DATE\020" + "\010\022\010\n\004TIME\020\t\022\014\n\010DATETIME\020\n\022\r\n\tGEOGRAPHY\020\013" + "\022\013\n\007NUMERIC\020\014\022\016\n\nBIGNUMERIC\020\r\022\014\n\010INTERVA" - + "L\020\016\"F\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\014\n\010NUL" - + "LABLE\020\001\022\014\n\010REQUIRED\020\002\022\014\n\010REPEATED\020\003B\207\001\n)" - + "com.google.cloud.bigquery.storage.v1beta" - + "2B\nTableProtoP\001ZLgoogle.golang.org/genpr" - + "oto/googleapis/cloud/bigquery/storage/v1" - + "beta2;storageb\006proto3" + + "L\020\016\022\010\n\004JSON\020\017\"F\n\004Mode\022\024\n\020MODE_UNSPECIFIE" + + "D\020\000\022\014\n\010NULLABLE\020\001\022\014\n\010REQUIRED\020\002\022\014\n\010REPEA" + + "TED\020\003B\207\001\n)com.google.cloud.bigquery.stor" + + "age.v1beta2B\nTableProtoP\001ZLgoogle.golang" + + ".org/genproto/googleapis/cloud/bigquery/" + + "storage/v1beta2;storageb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-bigquerystorage-v1beta2/src/main/proto/google/cloud/bigquery/storage/v1beta2/table.proto b/proto-google-cloud-bigquerystorage-v1beta2/src/main/proto/google/cloud/bigquery/storage/v1beta2/table.proto index 670a4a64a8..77ca829a4f 100644 --- a/proto-google-cloud-bigquerystorage-v1beta2/src/main/proto/google/cloud/bigquery/storage/v1beta2/table.proto +++ b/proto-google-cloud-bigquerystorage-v1beta2/src/main/proto/google/cloud/bigquery/storage/v1beta2/table.proto @@ -76,6 +76,9 @@ message TableFieldSchema { // Interval INTERVAL = 14; + + // JSON, String + JSON = 15; } enum Mode { diff --git a/synth.metadata b/synth.metadata index 32d4bad22c..6f51b3352d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,39 +11,31 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerystorage.git", - "sha": "42298848f5511cca98ffe04ac370e6760856b555" + "sha": "cc243d97a14df3c94133b0705d6e5d5ef92a8286" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "86c2fe6229f16e0f113a4cf9edea35d71895a6a6", - "internalRef": "367652775" + "sha": "95e7f055087a43f638ffd9a0f25ce36dbea87953", + "internalRef": "368275477" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "86c2fe6229f16e0f113a4cf9edea35d71895a6a6", - "internalRef": "367652775" + "sha": "95e7f055087a43f638ffd9a0f25ce36dbea87953", + "internalRef": "368275477" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "86c2fe6229f16e0f113a4cf9edea35d71895a6a6", - "internalRef": "367652775" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "86c2fe6229f16e0f113a4cf9edea35d71895a6a6", - "internalRef": "367652775" + "sha": "95e7f055087a43f638ffd9a0f25ce36dbea87953", + "internalRef": "368275477" } }, {