Skip to content
Permalink
Browse files
feat: spanner JSON type (#1260)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/4d5db7cf-fc22-48ae-84c6-bc8d1a1a2408/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

PiperOrigin-RevId: 381156241
Source-Link: googleapis/googleapis@fb5c4fb
Source-Link: googleapis/googleapis@02f6236
PiperOrigin-RevId: 380923948
Source-Link: googleapis/googleapis@370df45
  • Loading branch information
yoshi-automation committed Jun 24, 2021
1 parent 4593395 commit b2a56c68695b6209e20f9f86d83d7c5a0f39c7a8
@@ -161,6 +161,22 @@ public enum TypeCode implements com.google.protobuf.ProtocolMessageEnum {
* <code>NUMERIC = 10;</code>
*/
NUMERIC(10),
/**
*
*
* <pre>
* Encoded as a JSON-formatted 'string' as described in RFC 7159. The
* following rules will be applied when parsing JSON input:
* - Whitespace will be stripped from the document.
* - If a JSON object has duplicate keys, only the first key will be
* preserved.
* - Members of a JSON object are not guaranteed to have their order
* preserved. JSON array elements will have their order preserved.
* </pre>
*
* <code>JSON = 11;</code>
*/
JSON(11),
UNRECOGNIZED(-1),
;

@@ -292,6 +308,22 @@ public enum TypeCode implements com.google.protobuf.ProtocolMessageEnum {
* <code>NUMERIC = 10;</code>
*/
public static final int NUMERIC_VALUE = 10;
/**
*
*
* <pre>
* Encoded as a JSON-formatted 'string' as described in RFC 7159. The
* following rules will be applied when parsing JSON input:
* - Whitespace will be stripped from the document.
* - If a JSON object has duplicate keys, only the first key will be
* preserved.
* - Members of a JSON object are not guaranteed to have their order
* preserved. JSON array elements will have their order preserved.
* </pre>
*
* <code>JSON = 11;</code>
*/
public static final int JSON_VALUE = 11;

public final int getNumber() {
if (this == UNRECOGNIZED) {
@@ -339,6 +371,8 @@ public static TypeCode forNumber(int value) {
return STRUCT;
case 10:
return NUMERIC;
case 11:
return JSON;
default:
return null;
}
@@ -58,15 +58,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ructType\0223\n\006fields\030\001 \003(\0132#.google.spanne"
+ "r.v1.StructType.Field\032<\n\005Field\022\014\n\004name\030\001"
+ " \001(\t\022%\n\004type\030\002 \001(\0132\027.google.spanner.v1.T"
+ "ype*\233\001\n\010TypeCode\022\031\n\025TYPE_CODE_UNSPECIFIE"
+ "ype*\245\001\n\010TypeCode\022\031\n\025TYPE_CODE_UNSPECIFIE"
+ "D\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002\022\013\n\007FLOAT64\020\003\022\r\n"
+ "\tTIMESTAMP\020\004\022\010\n\004DATE\020\005\022\n\n\006STRING\020\006\022\t\n\005BY"
+ "TES\020\007\022\t\n\005ARRAY\020\010\022\n\n\006STRUCT\020\t\022\013\n\007NUMERIC\020"
+ "\nB\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"
+ "\n\022\010\n\004JSON\020\013B\257\001\n\025com.google.spanner.v1B\tT"
+ "ypeProtoP\001Z8google.golang.org/genproto/g"
+ "oogleapis/spanner/v1;spanner\252\002\027Google.Cl"
+ "oud.Spanner.V1\312\002\027Google\\Cloud\\Spanner\\V1"
+ "\352\002\032Google::Cloud::Spanner::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -128,4 +128,13 @@ enum TypeCode {
// <br>`[+-][Digits].Digits[ExponentIndicator[+-]Digits]`
// <br>(ExponentIndicator is `"e"` or `"E"`)
NUMERIC = 10;

// Encoded as a JSON-formatted 'string' as described in RFC 7159. The
// following rules will be applied when parsing JSON input:
// - Whitespace will be stripped from the document.
// - If a JSON object has duplicate keys, only the first key will be
// preserved.
// - Members of a JSON object are not guaranteed to have their order
// preserved. JSON array elements will have their order preserved.
JSON = 11;
}
@@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-spanner.git",
"sha": "0da851ba875a78c3d50042fe611e6e5204b6ceab"
"sha": "4593395d291f6e9370c2d3df2695cb28b7d27e8d"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
"sha": "fb5c4fbc1ded09e6958d6be7ca36a9221dc7e52f",
"internalRef": "381156241"
}
},
{

0 comments on commit b2a56c6

Please sign in to comment.