8
8
import java .util .Map ;
9
9
import java .util .Objects ;
10
10
import java .util .Optional ;
11
+ import java .util .function .Consumer ;
11
12
import java .util .function .Function ;
12
13
import java .util .stream .Collectors ;
13
14
import javax .annotation .Generated ;
@@ -450,7 +451,8 @@ public SubTypeOne polymorphicTypeWithoutSubTypes() {
450
451
* Returns the value of the EnumType property for this object.
451
452
* <p>
452
453
* If the service returns an enum value that is not available in the current SDK version, {@link #enumType} will
453
- * return {@link EnumType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from {@link #enumTypeString}.
454
+ * return {@link EnumType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
455
+ * {@link #enumTypeString}.
454
456
* </p>
455
457
*
456
458
* @return The value of the EnumType property for this object.
@@ -464,7 +466,8 @@ public EnumType enumType() {
464
466
* Returns the value of the EnumType property for this object.
465
467
* <p>
466
468
* If the service returns an enum value that is not available in the current SDK version, {@link #enumType} will
467
- * return {@link EnumType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from {@link #enumTypeString}.
469
+ * return {@link EnumType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
470
+ * {@link #enumTypeString}.
468
471
* </p>
469
472
*
470
473
* @return The value of the EnumType property for this object.
@@ -1063,6 +1066,24 @@ public interface Builder extends CopyableBuilder<Builder, AllTypesRequest> {
1063
1066
*/
1064
1067
Builder structWithNestedTimestampMember (StructWithTimestamp structWithNestedTimestampMember );
1065
1068
1069
+ /**
1070
+ * Sets the value of the StructWithNestedTimestampMember property for this object.
1071
+ *
1072
+ * This is a convenience that creates an instance of the {@link StructWithTimestamp.Builder} avoiding the need
1073
+ * to create one manually via {@link StructWithTimestamp#builder()}.
1074
+ *
1075
+ * When the {@link Consumer} completes, {@link StructWithTimestamp.Builder#build()} is called immediately and
1076
+ * its result is passed to {@link #structWithNestedTimestampMember(StructWithTimestamp)}.
1077
+ *
1078
+ * @param structWithNestedTimestampMember
1079
+ * a consumer that will call methods on {@link StructWithTimestamp.Builder}
1080
+ * @return Returns a reference to this object so that method calls can be chained together.
1081
+ * @see #structWithNestedTimestampMember(StructWithTimestamp)
1082
+ */
1083
+ default Builder structWithNestedTimestampMember (Consumer <StructWithTimestamp .Builder > structWithNestedTimestampMember ) {
1084
+ return structWithNestedTimestampMember (StructWithTimestamp .builder ().apply (structWithNestedTimestampMember ).build ());
1085
+ }
1086
+
1066
1087
/**
1067
1088
* Sets the value of the BlobArg property for this object.
1068
1089
* <p>
@@ -1085,6 +1106,24 @@ public interface Builder extends CopyableBuilder<Builder, AllTypesRequest> {
1085
1106
*/
1086
1107
Builder structWithNestedBlob (StructWithNestedBlobType structWithNestedBlob );
1087
1108
1109
+ /**
1110
+ * Sets the value of the StructWithNestedBlob property for this object.
1111
+ *
1112
+ * This is a convenience that creates an instance of the {@link StructWithNestedBlobType.Builder} avoiding the
1113
+ * need to create one manually via {@link StructWithNestedBlobType#builder()}.
1114
+ *
1115
+ * When the {@link Consumer} completes, {@link StructWithNestedBlobType.Builder#build()} is called immediately
1116
+ * and its result is passed to {@link #structWithNestedBlob(StructWithNestedBlobType)}.
1117
+ *
1118
+ * @param structWithNestedBlob
1119
+ * a consumer that will call methods on {@link StructWithNestedBlobType.Builder}
1120
+ * @return Returns a reference to this object so that method calls can be chained together.
1121
+ * @see #structWithNestedBlob(StructWithNestedBlobType)
1122
+ */
1123
+ default Builder structWithNestedBlob (Consumer <StructWithNestedBlobType .Builder > structWithNestedBlob ) {
1124
+ return structWithNestedBlob (StructWithNestedBlobType .builder ().apply (structWithNestedBlob ).build ());
1125
+ }
1126
+
1088
1127
/**
1089
1128
* Sets the value of the BlobMap property for this object.
1090
1129
*
@@ -1121,6 +1160,24 @@ public interface Builder extends CopyableBuilder<Builder, AllTypesRequest> {
1121
1160
*/
1122
1161
Builder recursiveStruct (RecursiveStructType recursiveStruct );
1123
1162
1163
+ /**
1164
+ * Sets the value of the RecursiveStruct property for this object.
1165
+ *
1166
+ * This is a convenience that creates an instance of the {@link RecursiveStructType.Builder} avoiding the need
1167
+ * to create one manually via {@link RecursiveStructType#builder()}.
1168
+ *
1169
+ * When the {@link Consumer} completes, {@link RecursiveStructType.Builder#build()} is called immediately and
1170
+ * its result is passed to {@link #recursiveStruct(RecursiveStructType)}.
1171
+ *
1172
+ * @param recursiveStruct
1173
+ * a consumer that will call methods on {@link RecursiveStructType.Builder}
1174
+ * @return Returns a reference to this object so that method calls can be chained together.
1175
+ * @see #recursiveStruct(RecursiveStructType)
1176
+ */
1177
+ default Builder recursiveStruct (Consumer <RecursiveStructType .Builder > recursiveStruct ) {
1178
+ return recursiveStruct (RecursiveStructType .builder ().apply (recursiveStruct ).build ());
1179
+ }
1180
+
1124
1181
/**
1125
1182
* Sets the value of the PolymorphicTypeWithSubTypes property for this object.
1126
1183
*
@@ -1130,6 +1187,24 @@ public interface Builder extends CopyableBuilder<Builder, AllTypesRequest> {
1130
1187
*/
1131
1188
Builder polymorphicTypeWithSubTypes (BaseType polymorphicTypeWithSubTypes );
1132
1189
1190
+ /**
1191
+ * Sets the value of the PolymorphicTypeWithSubTypes property for this object.
1192
+ *
1193
+ * This is a convenience that creates an instance of the {@link BaseType.Builder} avoiding the need to create
1194
+ * one manually via {@link BaseType#builder()}.
1195
+ *
1196
+ * When the {@link Consumer} completes, {@link BaseType.Builder#build()} is called immediately and its result is
1197
+ * passed to {@link #polymorphicTypeWithSubTypes(BaseType)}.
1198
+ *
1199
+ * @param polymorphicTypeWithSubTypes
1200
+ * a consumer that will call methods on {@link BaseType.Builder}
1201
+ * @return Returns a reference to this object so that method calls can be chained together.
1202
+ * @see #polymorphicTypeWithSubTypes(BaseType)
1203
+ */
1204
+ default Builder polymorphicTypeWithSubTypes (Consumer <BaseType .Builder > polymorphicTypeWithSubTypes ) {
1205
+ return polymorphicTypeWithSubTypes (BaseType .builder ().apply (polymorphicTypeWithSubTypes ).build ());
1206
+ }
1207
+
1133
1208
/**
1134
1209
* Sets the value of the PolymorphicTypeWithoutSubTypes property for this object.
1135
1210
*
@@ -1139,6 +1214,24 @@ public interface Builder extends CopyableBuilder<Builder, AllTypesRequest> {
1139
1214
*/
1140
1215
Builder polymorphicTypeWithoutSubTypes (SubTypeOne polymorphicTypeWithoutSubTypes );
1141
1216
1217
+ /**
1218
+ * Sets the value of the PolymorphicTypeWithoutSubTypes property for this object.
1219
+ *
1220
+ * This is a convenience that creates an instance of the {@link SubTypeOne.Builder} avoiding the need to create
1221
+ * one manually via {@link SubTypeOne#builder()}.
1222
+ *
1223
+ * When the {@link Consumer} completes, {@link SubTypeOne.Builder#build()} is called immediately and its result
1224
+ * is passed to {@link #polymorphicTypeWithoutSubTypes(SubTypeOne)}.
1225
+ *
1226
+ * @param polymorphicTypeWithoutSubTypes
1227
+ * a consumer that will call methods on {@link SubTypeOne.Builder}
1228
+ * @return Returns a reference to this object so that method calls can be chained together.
1229
+ * @see #polymorphicTypeWithoutSubTypes(SubTypeOne)
1230
+ */
1231
+ default Builder polymorphicTypeWithoutSubTypes (Consumer <SubTypeOne .Builder > polymorphicTypeWithoutSubTypes ) {
1232
+ return polymorphicTypeWithoutSubTypes (SubTypeOne .builder ().apply (polymorphicTypeWithoutSubTypes ).build ());
1233
+ }
1234
+
1142
1235
/**
1143
1236
* Sets the value of the EnumType property for this object.
1144
1237
*
@@ -1545,7 +1638,7 @@ public final Builder structWithNestedTimestampMember(StructWithTimestamp structW
1545
1638
1546
1639
public final void setStructWithNestedTimestampMember (StructWithTimestamp .BuilderImpl structWithNestedTimestampMember ) {
1547
1640
this .structWithNestedTimestampMember = structWithNestedTimestampMember != null ? structWithNestedTimestampMember
1548
- .build () : null ;
1641
+ .build () : null ;
1549
1642
}
1550
1643
1551
1644
public final ByteBuffer getBlobArg () {
0 commit comments