From acb2206e4dbe0b94c4ebbbe6bd924a258469f836 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 6 Jul 2021 12:40:25 -0700 Subject: [PATCH] feat: add new FieldBehavior NON_EMPTY_DEFAULT (#191) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/79ee364c-3d61-4718-bec0-086f2d2124fa/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 382337225 Source-Link: https://github.com/googleapis/googleapis/commit/aa136fa6649f7d999bf3873d0e5fca75cb2354a5 --- .../java/com/google/api/FieldBehavior.java | 28 +++++++++++++++++++ .../com/google/api/FieldBehaviorProto.java | 15 +++++----- .../proto/google/api/field_behavior.proto | 6 ++++ synth.metadata | 6 ++-- 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/proto-google-common-protos/src/main/java/com/google/api/FieldBehavior.java b/proto-google-common-protos/src/main/java/com/google/api/FieldBehavior.java index f92f01d5..9b2fd462 100644 --- a/proto-google-common-protos/src/main/java/com/google/api/FieldBehavior.java +++ b/proto-google-common-protos/src/main/java/com/google/api/FieldBehavior.java @@ -116,6 +116,19 @@ public enum FieldBehavior implements com.google.protobuf.ProtocolMessageEnum { * UNORDERED_LIST = 6; */ UNORDERED_LIST(6), + /** + * + * + *
+   * Denotes that this field returns a non-empty default value if not set.
+   * This indicates that if the user provides the empty value in a request,
+   * a non-empty value will be returned. The user will not be aware of what
+   * non-empty value to expect.
+   * 
+ * + * NON_EMPTY_DEFAULT = 7; + */ + NON_EMPTY_DEFAULT(7), UNRECOGNIZED(-1), ; @@ -203,6 +216,19 @@ public enum FieldBehavior implements com.google.protobuf.ProtocolMessageEnum { * UNORDERED_LIST = 6; */ public static final int UNORDERED_LIST_VALUE = 6; + /** + * + * + *
+   * Denotes that this field returns a non-empty default value if not set.
+   * This indicates that if the user provides the empty value in a request,
+   * a non-empty value will be returned. The user will not be aware of what
+   * non-empty value to expect.
+   * 
+ * + * NON_EMPTY_DEFAULT = 7; + */ + public static final int NON_EMPTY_DEFAULT_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -242,6 +268,8 @@ public static FieldBehavior forNumber(int value) { return IMMUTABLE; case 6: return UNORDERED_LIST; + case 7: + return NON_EMPTY_DEFAULT; default: return null; } diff --git a/proto-google-common-protos/src/main/java/com/google/api/FieldBehaviorProto.java b/proto-google-common-protos/src/main/java/com/google/api/FieldBehaviorProto.java index a5653b82..07ab7e51 100644 --- a/proto-google-common-protos/src/main/java/com/google/api/FieldBehaviorProto.java +++ b/proto-google-common-protos/src/main/java/com/google/api/FieldBehaviorProto.java @@ -65,15 +65,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n\037google/api/field_behavior.proto\022\ngoogl" + "e.api\032 google/protobuf/descriptor.proto*" - + "\217\001\n\rFieldBehavior\022\036\n\032FIELD_BEHAVIOR_UNSP" + + "\246\001\n\rFieldBehavior\022\036\n\032FIELD_BEHAVIOR_UNSP" + "ECIFIED\020\000\022\014\n\010OPTIONAL\020\001\022\014\n\010REQUIRED\020\002\022\017\n" + "\013OUTPUT_ONLY\020\003\022\016\n\nINPUT_ONLY\020\004\022\r\n\tIMMUTA" - + "BLE\020\005\022\022\n\016UNORDERED_LIST\020\006:Q\n\016field_behav" - + "ior\022\035.google.protobuf.FieldOptions\030\234\010 \003(" - + "\0162\031.google.api.FieldBehaviorBp\n\016com.goog" - + "le.apiB\022FieldBehaviorProtoP\001ZAgoogle.gol" - + "ang.org/genproto/googleapis/api/annotati" - + "ons;annotations\242\002\004GAPIb\006proto3" + + "BLE\020\005\022\022\n\016UNORDERED_LIST\020\006\022\025\n\021NON_EMPTY_D" + + "EFAULT\020\007:Q\n\016field_behavior\022\035.google.prot" + + "obuf.FieldOptions\030\234\010 \003(\0162\031.google.api.Fi" + + "eldBehaviorBp\n\016com.google.apiB\022FieldBeha" + + "viorProtoP\001ZAgoogle.golang.org/genproto/" + + "googleapis/api/annotations;annotations\242\002" + + "\004GAPIb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-common-protos/src/main/proto/google/api/field_behavior.proto b/proto-google-common-protos/src/main/proto/google/api/field_behavior.proto index ee836185..c4abe3b6 100644 --- a/proto-google-common-protos/src/main/proto/google/api/field_behavior.proto +++ b/proto-google-common-protos/src/main/proto/google/api/field_behavior.proto @@ -81,4 +81,10 @@ enum FieldBehavior { // in any arbitrary order, rather than the order the user originally // provided. Additionally, the list's order may or may not be stable. UNORDERED_LIST = 6; + + // Denotes that this field returns a non-empty default value if not set. + // This indicates that if the user provides the empty value in a request, + // a non-empty value will be returned. The user will not be aware of what + // non-empty value to expect. + NON_EMPTY_DEFAULT = 7; } diff --git a/synth.metadata b/synth.metadata index 98e1dfe6..b99734ad 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-common-protos.git", - "sha": "a07fab7b05f993d850680cdee12087178f281c62" + "sha": "1086c1cb870e49bc4b68992d293176909bc58a2d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ba89dace27923254d96ab8339b831dc996e2112f", - "internalRef": "377318673" + "sha": "aa136fa6649f7d999bf3873d0e5fca75cb2354a5", + "internalRef": "382337225" } }, {