diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java
index 944ab742a1..3c62b7ea1b 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java
@@ -57,6 +57,21 @@ public enum TypeAnnotationCode implements com.google.protobuf.ProtocolMessageEnu
* PG_NUMERIC = 2;
*/
PG_NUMERIC(2),
+ /**
+ *
+ *
+ *
+ * PostgreSQL compatible JSONB type. This annotation needs to be applied to + * [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON] + * type code to specify that values of this type should be treated as + * PostgreSQL JSONB values. Currently this annotation is always needed for + * [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled + * Spanner databases. + *+ * + *
PG_JSONB = 3;
+ */
+ PG_JSONB(3),
UNRECOGNIZED(-1),
;
@@ -85,6 +100,21 @@ public enum TypeAnnotationCode implements com.google.protobuf.ProtocolMessageEnu
* PG_NUMERIC = 2;
*/
public static final int PG_NUMERIC_VALUE = 2;
+ /**
+ *
+ *
+ * + * PostgreSQL compatible JSONB type. This annotation needs to be applied to + * [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON] + * type code to specify that values of this type should be treated as + * PostgreSQL JSONB values. Currently this annotation is always needed for + * [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled + * Spanner databases. + *+ * + *
PG_JSONB = 3;
+ */
+ public static final int PG_JSONB_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
@@ -114,6 +144,8 @@ public static TypeAnnotationCode forNumber(int value) {
return TYPE_ANNOTATION_CODE_UNSPECIFIED;
case 2:
return PG_NUMERIC;
+ case 3:
+ return PG_JSONB;
default:
return null;
}
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java
index 29e9151b32..ebca4e75d3 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java
@@ -63,13 +63,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\004BOOL\020\001\022\t\n\005INT64\020\002\022\013\n\007FLOAT64\020\003\022\r\n\tTIMES"
+ "TAMP\020\004\022\010\n\004DATE\020\005\022\n\n\006STRING\020\006\022\t\n\005BYTES\020\007\022"
+ "\t\n\005ARRAY\020\010\022\n\n\006STRUCT\020\t\022\013\n\007NUMERIC\020\n\022\010\n\004J"
- + "SON\020\013*J\n\022TypeAnnotationCode\022$\n TYPE_ANNO"
+ + "SON\020\013*X\n\022TypeAnnotationCode\022$\n TYPE_ANNO"
+ "TATION_CODE_UNSPECIFIED\020\000\022\016\n\nPG_NUMERIC\020"
- + "\002B\257\001\n\025com.google.spanner.v1B\tTypeProtoP\001"
- + "Z8google.golang.org/genproto/googleapis/"
- + "spanner/v1;spanner\252\002\027Google.Cloud.Spanne"
- + "r.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google:"
- + ":Cloud::Spanner::V1b\006proto3"
+ + "\002\022\014\n\010PG_JSONB\020\003B\257\001\n\025com.google.spanner.v"
+ + "1B\tTypeProtoP\001Z8google.golang.org/genpro"
+ + "to/googleapis/spanner/v1;spanner\252\002\027Googl"
+ + "e.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Spanne"
+ + "r\\V1\352\002\032Google::Cloud::Spanner::V1b\006proto"
+ + "3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto
index 126e4a0c2f..712ec187fc 100644
--- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto
+++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto
@@ -163,4 +163,12 @@ enum TypeAnnotationCode {
// [NUMERIC][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with PostgreSQL-enabled
// Spanner databases.
PG_NUMERIC = 2;
+
+ // PostgreSQL compatible JSONB type. This annotation needs to be applied to
+ // [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON]
+ // type code to specify that values of this type should be treated as
+ // PostgreSQL JSONB values. Currently this annotation is always needed for
+ // [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled
+ // Spanner databases.
+ PG_JSONB = 3;
}